phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Does phoenix support creating table without primary key?
Date Fri, 22 Dec 2017 03:06:04 GMT
I created a phoenix without specifying primary key, it returned me error.I am new to Phoenix,
so I am asking can phoenix support creating table without pk? In business side, my data could
be not unique.

0: jdbc:phoenix:esg08:2181> create table t_p(a integer, b varchar);Error: ERROR 509 (42888):
The table does not have a primary key. tableName=T_P (state=42888,code=509)java.sql.SQLException:
ERROR 509 (42888): The table does not have a primary key. tableName=T_P        at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(
       at org.apache.phoenix.exception.SQLExceptionInfo.buildException(
       at org.apache.phoenix.schema.MetaDataClient.createTableInternal(
       at org.apache.phoenix.schema.MetaDataClient.createTable(  
     at org.apache.phoenix.compile.CreateTableCompiler$2.execute(
       at org.apache.phoenix.jdbc.PhoenixStatement$     
  at org.apache.phoenix.jdbc.PhoenixStatement$        at        at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(
       at org.apache.phoenix.jdbc.PhoenixStatement.execute(   
    at sqlline.Commands.execute(        at sqlline.Commands.sql(
       at sqlline.SqlLine.dispatch(        at sqlline.SqlLine.begin(
       at sqlline.SqlLine.start(        at sqlline.SqlLine.main(
View raw message