Skip to content

Commit

Permalink
feat(ingest): use trino python client with sqlalchemy, supports pytho…
Browse files Browse the repository at this point in the history
…n3.6 (#3888)
  • Loading branch information
mayurinehate committed Jan 31, 2022
1 parent e29d2cb commit faac911
Show file tree
Hide file tree
Showing 8 changed files with 536 additions and 557 deletions.
28 changes: 6 additions & 22 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,8 @@ def get_long_description():
"snowflake-usage": snowflake_common | {"more-itertools>=8.12.0"},
"sqlalchemy": sql_common,
"superset": {"requests"},
"trino": sql_common
| {
# SQLAlchemy support is coming up in trino python client
# subject to PR merging - https://github.com/trinodb/trino-python-client/pull/81.
# PR is from same author as that of sqlalchemy-trino library below.
"sqlalchemy-trino"
},
"starburst-trino-usage": sql_common
| {
# SQLAlchemy support is coming up in trino python client
# subject to PR merging - https://github.com/trinodb/trino-python-client/pull/81.
# PR is from same author as that of sqlalchemy-trino library below.
"sqlalchemy-trino"
},
"trino": sql_common | {"trino"},
"starburst-trino-usage": sql_common | {"trino"},
"nifi": {"requests"},
}

Expand Down Expand Up @@ -227,7 +215,9 @@ def get_long_description():
"redash",
"redshift",
"redshift-usage",
"data-lake"
"data-lake",
"trino",
"starburst-trino-usage",
# airflow is added below
]
for dependency in plugins[plugin]
Expand All @@ -236,14 +226,8 @@ def get_long_description():

if is_py37_or_newer:
# The lookml plugin only works on Python 3.7 or newer.
# The trino plugin only works on Python 3.7 or newer.
# The trino plugin can be supported on Python 3.6 with minimal changes to opensource sqlalchemy-trino sourcecode.
base_dev_requirements = base_dev_requirements.union(
{
dependency
for plugin in ["lookml", "trino", "starburst-trino-usage"]
for dependency in plugins[plugin]
}
{dependency for plugin in ["lookml"] for dependency in plugins[plugin]}
)

dev_requirements = {
Expand Down
2 changes: 0 additions & 2 deletions metadata-ingestion/source_docs/trino.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ For context on getting started with ingestion, check out our [metadata ingestion

To install this plugin, run `pip install 'acryl-datahub[trino]'`.

Note! This plugin uses a package that requires Python 3.7+!

## Capabilities

This plugin extracts the following:
Expand Down

0 comments on commit faac911

Please sign in to comment.