phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <>
Subject Re: Searching a string in Phoenix view in all columns
Date Thu, 16 Aug 2018 14:11:50 GMT
SQL doesn't work like this.

You can use the DatabaseMetaData class, obtained off of the JDBC 
Connection class, to inspect the available columns for a query. However, 
I'd caution you against constructing a massive disjunction, e.g.

select * from demotable where colA like ".." or colB like ".." or colC ....

If this is your usage pattern, I'd suggest that you need to go back to 
the drawing board to re-think how you structure your data so that it's 
in a more optimal form to execute this kind of search.

On 8/16/18 12:46 AM, Lalit Jadhav wrote:
> I have a phoenix view of HBase table with n number of columns. I want to 
> search a string consider "Foo". But it can be in any columns. (Need to 
> scan all columns)  Let me know what query I can fire to retrieve the 
> desired outcome.
> For Example:
> SELECT * FROM DemoTable
> WHERE Any Column LIKE 'Something%'
> Note: Column names are not known.
> -- 
> Regards,
> *Lalit Jadhav,*
> *Database Group Lead.*
> /Everything happens to everybody sooner or later if there is time enough/

View raw message