Hive-JSON-Serde
Hive-JSON-Serde copied to clipboard
Partitioned By result in empty table
hi @rcongiu
I did
CREATE EXTERNAL TABLE `XXX`(
`ABC` string COMMENT 'from deserializer')
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES ( 'ignore.malformed.json' = 'true')
STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'
LOCATION 'a hdfs folder';
which can generate the table with data populated
but when I added partitioned by
CREATE EXTERNAL TABLE `XXX`(
`ABC` string COMMENT 'from deserializer')
PARTITIONED BY (`partition_year` string, `partition_month` string, `partition_day` string)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES ( 'ignore.malformed.json' = 'true')
STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'
LOCATION 'a hdfs folder';
It always returned "OK" but the table is empty. Do you know why that might happen? Thanks