Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partitioned By result in empty table #237

Open
bofie opened this issue Nov 11, 2022 · 0 comments
Open

Partitioned By result in empty table #237

bofie opened this issue Nov 11, 2022 · 0 comments

Comments

@bofie
Copy link

bofie commented Nov 11, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant