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

Surface partitions metadata #852

Closed
jefffeng opened this issue Jul 30, 2016 · 2 comments
Closed

Surface partitions metadata #852

jefffeng opened this issue Jul 30, 2016 · 2 comments
Labels
airbnb Airbnb related enhancement:request Enhancement request submitted by anyone from the community sqllab Namespace | Anything related to the SQL Lab

Comments

@jefffeng
Copy link

No description provided.

@jefffeng jefffeng added enhancement:request Enhancement request submitted by anyone from the community airbnb Airbnb related sqllab Namespace | Anything related to the SQL Lab labels Jul 30, 2016
@bkyryliuk
Copy link
Member

From: #887
PyHive provides a nice API to access the partition metadata.
Inspector get_indexes function that provides the indexes and the partition information.
By the way, displaying the indexes is a nice feature too.

More information can be found here:
http://pythonhosted.org/PyHive/pyhive.html#module-pyhive.sqlalchemy_backports

from sqlalchemy import *
from sqlalchemy.engine import create_engine
from sqlalchemy.schema import *
engine = create_engine('presto://localhost:${port_number}/hive/default')
insp = inspect(engine)
insp.get_indexes('${table_name}', '${schema_name}')

[{u'unique': False, u'column_names': [u'ds'], u'name': u'partition'}]

@bkyryliuk
Copy link
Member

@mistercrunch implemented it.

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
merge to test feat: Results table on Explore view apache#11854
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
merge to test feat: Results table on Explore view apache#11854
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
merge to test feat: Results table on Explore view apache#11854
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
merge to test feat: Results table on Explore view apache#11854
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airbnb Airbnb related enhancement:request Enhancement request submitted by anyone from the community sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

No branches or pull requests

3 participants