Hi,
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(SQLExceptionCode.java:396)
        at 
org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
        at 
org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1810)
        at 
org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:785)   
     at 
org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:186)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:322)      
  at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:314) 
       at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)        at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:312)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1435)    
    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)

Reply via email to