Remove the double quotes and try single quote. Double quotes refers to an identifier…
Cheers, John Leach > On Oct 5, 2016, at 9:21 AM, Mich Talebzadeh <mich.talebza...@gmail.com> wrote: > > Hi, > > I have this Hbase table already populated > > create 'tsco','stock_daily' > > and populated using > $HBASE_HOME/bin/hbase org.apache.hadoop.hbase.mapreduce.ImportTsv > -Dimporttsv.separator=',' -Dimporttsv.columns="HBASE_ROW_KEY, > stock_info:stock,stock_info:ticker,stock_daily:Date,stock_daily:open,stock_daily:high,stock_daily:low,stock_daily:close,stock_daily:volume" > tsco hdfs://rhes564:9000/data/stocks/tsco.csv > This works OK. In Hbase I have > > hbase(main):176:0> scan 'tsco', LIMIT => 1 > ROW COLUMN+CELL > TSCO-1-Apr-08 > column=stock_daily:Date, timestamp=1475525222488, value=1-Apr-08 > TSCO-1-Apr-08 > column=stock_daily:close, timestamp=1475525222488, value=405.25 > TSCO-1-Apr-08 > column=stock_daily:high, timestamp=1475525222488, value=406.75 > TSCO-1-Apr-08 > column=stock_daily:low, timestamp=1475525222488, value=379.25 > TSCO-1-Apr-08 > column=stock_daily:open, timestamp=1475525222488, value=380.00 > TSCO-1-Apr-08 > column=stock_daily:stock, timestamp=1475525222488, value=TESCO PLC > TSCO-1-Apr-08 > column=stock_daily:ticker, timestamp=1475525222488, value=TSCO > TSCO-1-Apr-08 > column=stock_daily:volume, timestamp=1475525222488, value=49664486 > > In Phoenix I have a view "tsco" created on Hbase table as follows: > > 0: jdbc:phoenix:rhes564:2181> create view "tsco" (PK VARCHAR PRIMARY KEY, > "stock_daily"."Date" VARCHAR, "stock_daily"."close" VARCHAR, > "stock_daily"."high" VARCHAR, "stock_daily"."low" VARCHAR, > "stock_daily"."open" VARCHAR, "stock_daily"."ticker" VARCHAR, > "stock_daily"."stock" VARCHAR, "stock_daily"."volume" VARCHAR) > > So all good. > > This works > > 0: jdbc:phoenix:rhes564:2181> select "Date","volume" from "tsco" limit 2; > +-----------+-----------+ > | Date | volume | > +-----------+-----------+ > | 1-Apr-08 | 49664486 | > | 1-Apr-09 | 24877341 | > +-----------+-----------+ > 2 rows selected (0.011 seconds) > > However, I don't seem to be able to use where clause! > > 0: jdbc:phoenix:rhes564:2181> select "Date","volume" from "tsco" where > "Date" = "1-Apr-08"; > Error: ERROR 504 (42703): Undefined column. columnName=1-Apr-08 > (state=42703,code=504) > org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): > Undefined column. columnName=1-Apr-08 > > Why does it think a predicate "1-Apr-08" is a column. > > Any ideas? > > Thanks > > > > Dr Mich Talebzadeh > > > > LinkedIn * > https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw > <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>* > > > > http://talebzadehmich.wordpress.com > > > *Disclaimer:* Use it at your own risk. Any and all responsibility for any > loss, damage or destruction of data or any other property which may arise > from relying on this email's technical content is explicitly disclaimed. > The author will in no case be liable for any monetary damages arising from > such loss, damage or destruction.