question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Presto not able query Hive partition external table

See original GitHub issue

I have created the External table on hive from hadoop path with year and month partitions. I have connected the hive with presto. I am able to query the data in hive, but the same table is not returning the data with presto(returning 0 rows). Presto: 0.213 presto:retaildemov2> select * from customer; customer_id | account_num | lname | fname | mi | address1 | address2 | address3 | address4 | city | state_province | postal_code | country | customer_region_id | phone1 | phone2 | birthdate | marital_sta -------------+-------------+-------+-------+----+----------+----------+----------+----------+------+----------------+-------------+---------+--------------------+--------+--------+-----------+------------ (0 rows)

num_cars_owned | integer | | fullname | varchar | | event_ts | timestamp | | year | varchar | partition key | month | varchar | partition key |

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
friendofasquidcommented, Jul 20, 2021

Hello from 2021.

At some point, looks like Presto has added system.sync_partition_metadata which should remove the need to run msck repair in Hive / Spark / Athena.

0reactions
yuzhucommented, Jun 26, 2020

i have noticed that after msck repair, i needed to run a select query in hive before presto can pick up the change and show results for select queries… no idea why though…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use presto to query hive table, some tables fail to query but ...
I created some external tables in hive, I query these tables through the hive client, and all the tables look normal.
Read more >
Hive Connector — Presto 0.278 Documentation
The Hive connector allows querying data stored in a Hive data warehouse. Hive is a combination of ... Enable writes to non-managed (external)...
Read more >
11.2. Hive Connector — Presto 0.141t Documentation
The Hive connector allows querying data stored in a Hive data warehouse. ... Presto does not support creating external tables in Hive (both...
Read more >
Create EXTERNAL table in Presto - Google Groups
If your data is in s3, just put the s3 path in hdfs_path, Presto has its own S3FileSystem. Should be able to query...
Read more >
CREATE TABLE - Amazon Athena - AWS Documentation
CREATE EXTERNAL TABLE [IF NOT EXISTS] [db_name.]table_name [(col_name data_type [COMMENT col_comment] [, ...] )] [COMMENT table_comment] [PARTITIONED BY ( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found