Closed pPanda-beta closed 4 years ago
sorry for the delay, here is the pr (https://github.com/lyft/amundsendatabuilder/pull/312) /
^^ @pPanda-beta you could pull the change to your test env to unblock.
@feng-tao : Due to huge amount of initial bootstrap works, we moved to amundsen with atlas instead of native. But I can say this will definitely allow people, to work with their own type of hive metastore database. Thanks for the PR.
This sql query only works with mysql innodb
https://github.com/lyft/amundsendatabuilder/blob/21a763add3c00c34b4f4c2d9809f59e50fb264c8/databuilder/extractor/hive_table_metadata_extractor.py#L28-L52
Expected Behavior
It extracts table info from metastore db
Current Behavior
It breaks when the syntax is not supported by the database engine
Possible Solution
First of all, HiveTableMetadataExtractor.SQL_STATEMENT should be configurable and customisable (metastore db type, hive version,...) Currently its hardocded https://github.com/lyft/amundsendatabuilder/blob/21a763add3c00c34b4f4c2d9809f59e50fb264c8/databuilder/extractor/hive_table_metadata_extractor.py#L66-L67
IF(...)
is not standard,CASE WHEN(...) THEN(...) ELSE (...) END
is standardI can raise a PR if you want.
Here is a sample for postgres:
Unfortunately there is no option to override it so I had to rewrite entire HiveTableMetadataExtractor class
(a few hacks are there, `HiveTableMetadataExtractor.SQL_STATEMENT = "My own sql as in python nothing is immutable " )
Steps to Reproduce
Run hive_sample_dag with hive metastore powered by postgres
Screenshots (if appropriate)
Context
Your Environment
Amundsen version used: dockerimages : neo4j:3.3.0 elasticsearch:6.7.0 amundsendev/amundsen-search:2.4.0 amundsendev/amundsen-metadata:2.5.4 amundsendev/amundsen-frontend:2.1.1 Pypi: amundsen-databuilder==2.6.4
Data warehouse stores: Docker images: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8 bde2020/hadoop-datanode:2.0.0-hadoop2.7.4-java8 bde2020/hive:2.3.2-postgresql-metastore bde2020/hive-metastore-postgresql:2.3.0
Deployment (k8s or native): docker-compose
Link to your fork or repository: