Created 07-11-2017 06:40 AM
When i create Internal table with phoenix i got error " Syntax error. Encountered "BY" "
create table phoenix_table ( . . . . . . . . > s1 CHAR(10), . . . . . . . . > i1 INTEGER, . . . . . . . . > f1 FLOAT, . . . . . . . . > d1 DOUBLE . . . . . . . . > ) . . . . . . . . > STORED BY 'org.apache.phoenix.hive.PhoenixStorageHandler' . . . . . . . . > TBLPROPERTIES ( . . . . . . . . > "phoenix.table.name" = "phoenix_table", . . . . . . . . > "phoenix.zookeeper.quorum" = "localhost", . . . . . . . . > "phoenix.zookeeper.znode.parent" = "/hbase", . . . . . . . . > "phoenix.zookeeper.client.port" = "2181", . . . . . . . . > "phoenix.rowkeys" = "s1, i1", . . . . . . . . > "phoenix.column.mapping" = "s1:s1, i1:i1, f1:f1, d1:d1", . . . . . . . . > "phoenix.table.options" = "SALT_BUCKETS=10, DATA_BLOCK_ENCODING='DIFF'" . . . . . . . . > );
Created 07-11-2017 10:23 AM
Are you creating table from phoenix sqlline or hive?
When you create table from Phoenix client or sqlline then you don't need to provide all the information PhoenixStoragehandler and table properties.
Created 07-11-2017 10:23 AM
Are you creating table from phoenix sqlline or hive?
When you create table from Phoenix client or sqlline then you don't need to provide all the information PhoenixStoragehandler and table properties.
Created 07-11-2017 01:32 PM
Phoenix Hive integration is there from Phoenix 4.8, if you are trying to create phoenix table using hive then that is the way. But if you need to create a phoenix table on top of hbase, as @Rajeshbabu Chintaguntla said you don't need to use phoenix storage handler. And passing the table properties is not required.