I used pyhive to connect hive to use Presto.
May I know the partitions of the hive tables before presto has executed the sql?
I used pyhive to connect hive to use Presto.
May I know the partitions of the hive tables before presto has executed the sql?
You can use the below presto query to get partitions.
presto> select * from db_name."table_name$partitions";
p_regionkey
-------------
1
2
3
The result of SHOW PARTITIONS on hive is below.
hive> show partitions table_name;
p_regionkey=1
p_regionkey=2
p_regionkey=3
SHOW PARTITIONS on presto was removed on 0.209. https://trino.io/docs/current/release/release-0.209.html
Please try the SHOW PARTITIONS command: https://teradata.github.io/presto/docs/0.167-t/sql/show-partitions.html For example: SHOW PARTITIONS FROM table_name;