There is nothing wrong with your SQL statement. This works on CLI fine and I tried the following. Your issue seems to be related to the underlying metadata store.
CREATE TABLE page_view(viewTime INT, userid BIGINT, page_url STRING, referrer_url STRING, ip STRING COMMENT 'IP Address of the User') COMMENT 'This is the page view table' PARTITIONED BY(dt STRING, country STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' STORED AS SEQUENCEFILE; 1. What metastore are you using? 2. Can you do simple command such as 'show tables;' or select * from any existing table? On Thu, Jun 7, 2012 at 5:41 AM, soham sardar <sohamsardart...@gmail.com>wrote: > I am not able to create a table in the hive interactive shell > > > the command given is > > hive>CREATE TABLE page_view(viewTime INT, userid BIGINT, page_url STRING, > referrer_url STRING, ip STRING COMMENT 'IP Address of the User') COMMENT > 'This is the hive>page view table' PARTITIONED BY(dt STRING, country > STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' STORED AS > SEQUENCEFILE; > > > > and the error is > > > hive> CREATE TABLE page_view(viewTime INT, userid BIGINT, > > page_url STRING, referrer_url STRING, > > ip STRING COMMENT 'IP Address of the User') > > COMMENT 'This is the page view table' > > PARTITIONED BY(dt STRING, country STRING) > > ROW FORMAT DELIMITED > > FIELDS TERMINATED BY '\001' > > STORED AS SEQUENCEFILE; > * > > > FAILED: Error in metadata: javax.jdo.JDODataStoreException: Required table > missing : "`DATABASE_PARAMS`" in Catalog "" Schema "". DataNucleus requires > this table to perform its persistence operations. Either your MetaData is > incorrect, or you need to enable "datanucleus.autoCreateTables" > NestedThrowables: > org.datanucleus.store.rdbms.exceptions.MissingTableException: Required > table missing : "`DATABASE_PARAMS`" in Catalog "" Schema "". DataNucleus > requires this table to perform its persistence operations. Either your > MetaData is incorrect, or you need to enable "datanucleus.autoCreateTables" > FAILED: Execution Error, return code 1 from > org.apache.hadoop.hive.ql.exec.DDLTask* > >