Yes. If you're starting from a blank slate, please use the Phoenix SQL
statements to create tables, not the HBase shell.
On 3/5/18 4:33 AM, Dominic Egger wrote:
Hi Phoenix Users
So I have a somewhat baffling errors. I have create a view on the
follwoing HBase Table:
create 'xx:yy', {NAME => 'columns', COMPRESSION => 'SNAPPY'} , {SPLITS
=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd',
'e', 'f'] }
So far this worked very well. But when I want to create an Index on this
view I get the following error:
create index crea_dat_load_idx on PADASA.SENDUNGSDACH_3M_SNAP
(SND_SENDUNG_CREA_DAT);
Error: ERROR 601 (42P00): Syntax error. Encountered "columns" at line 1,
column 104. (state=42P00,code=601)
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00):
Syntax error. Encountered "columns" at line 1, column 104.
at
org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
at
org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
at
org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1185)
at
org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1268)
at
org.apache.phoenix.jdbc.PhoenixStatement.compileMutation(PhoenixStatement.java:1300)
at
org.apache.phoenix.compile.PostIndexDDLCompiler.compile(PostIndexDDLCompiler.java:120)
at
org.apache.phoenix.schema.MetaDataClient.buildIndex(MetaDataClient.java:1025)
at
org.apache.phoenix.schema.MetaDataClient.createIndex(MetaDataClient.java:1345)
at
org.apache.phoenix.compile.CreateIndexCompiler$1.execute(CreateIndexCompiler.java:85)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:338)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:326)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:324)
at
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1345)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:808)
at sqlline.SqlLine.begin(SqlLine.java:681)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: NoViableAltException(27@[])
at
org.apache.phoenix.parse.PhoenixSQLParser.select_list(PhoenixSQLParser.java:5110)
at
org.apache.phoenix.parse.PhoenixSQLParser.single_select(PhoenixSQLParser.java:4404)
at
org.apache.phoenix.parse.PhoenixSQLParser.unioned_selects(PhoenixSQLParser.java:4521)
at
org.apache.phoenix.parse.PhoenixSQLParser.select_node(PhoenixSQLParser.java:4586)
at
org.apache.phoenix.parse.PhoenixSQLParser.upsert_node(PhoenixSQLParser.java:4750)
at
org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:775)
at
org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:500)
at
org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
... 18 more
When using !tables the index shows up as perpetually "building"
Does phoenix create some more SQL statements when a create index is
executed? It seems the column family name is throwing it off somehow.
Has anyone encountered this before?
Environment info:
CDH 5.9.0
Phoenix 4.7.0
All the best and thanks!
Best Dominic Egger