Skip to content

Commit

Permalink
fix(ingest) redshift: Adding missing dependencies and relaxing sqlalc…
Browse files Browse the repository at this point in the history
…hemy dependency (#5284)

Relaxing sqlalchemy deps to make our plugins work with Airflow 2.3
  • Loading branch information
treff7es authored Jun 29, 2022
1 parent fb1b1db commit d812fd1
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_long_description():

sql_common = {
# Required for all SQL sources.
"sqlalchemy==1.3.24",
"sqlalchemy>=1.3.24,<2.0.0",
# Required for SQL profiling.
"great-expectations>=0.14.11,<0.15.3",
# datahub does not depend on Jinja2 directly but great expectations does. With Jinja2 3.1.0 GE 0.14.11 is breaking
Expand All @@ -107,6 +107,11 @@ def get_long_description():
"botocore!=1.23.0",
}

path_spec_common = {
"parse>=1.19.0",
"wcmatch",
}

looker_common = {
# Looker Python SDK
"looker-sdk==22.2.1"
Expand All @@ -121,6 +126,14 @@ def get_long_description():
"protobuf<=3.20.1",
}

redshift_common = {
"sqlalchemy-redshift",
"psycopg2-binary",
"GeoAlchemy2",
"sqllineage==1.3.5",
*path_spec_common,
}

snowflake_common = {
# Snowflake plugin utilizes sql common
*sql_common,
Expand Down Expand Up @@ -158,11 +171,7 @@ def get_long_description():
"azure-identity==1.10.0",
}

s3_base = {
*data_lake_base,
"moto[s3]",
"wcmatch",
}
s3_base = {*data_lake_base, "moto[s3]", *path_spec_common}

delta_lake = {
*s3_base,
Expand All @@ -173,6 +182,7 @@ def get_long_description():
"sqlparse",
}


# Note: for all of these, framework_common will be added.
plugins: Dict[str, Set[str]] = {
# Sink plugins.
Expand Down Expand Up @@ -249,16 +259,8 @@ def get_long_description():
| {"psycopg2-binary", "acryl-pyhive[hive]>=0.6.12", "pymysql>=1.0.2"},
"pulsar": {"requests"},
"redash": {"redash-toolbelt", "sql-metadata", "sqllineage==1.3.5"},
"redshift": sql_common
| {"sqlalchemy-redshift", "psycopg2-binary", "GeoAlchemy2", "sqllineage==1.3.5"},
"redshift-usage": sql_common
| usage_common
| {
"sqlalchemy-redshift",
"psycopg2-binary",
"GeoAlchemy2",
"sqllineage==1.3.5",
},
"redshift": sql_common | redshift_common,
"redshift-usage": sql_common | usage_common | redshift_common,
"sagemaker": aws_common,
"snowflake": snowflake_common,
"snowflake-usage": snowflake_common
Expand Down Expand Up @@ -454,7 +456,7 @@ def get_long_description():
entry_points = {
"console_scripts": ["datahub = datahub.entrypoints:main"],
"datahub.ingestion.source.plugins": [
"csv-enricher = datahub.ingestion.source.csv_enricher:CSVEnricherSource",
"csv-enricher = datahub.ingestion.source.csv_enricher:CSVEnricherSource",
"file = datahub.ingestion.source.file:GenericFileSource",
"sqlalchemy = datahub.ingestion.source.sql.sql_generic:SQLAlchemyGenericSource",
"athena = datahub.ingestion.source.sql.athena:AthenaSource",
Expand Down

0 comments on commit d812fd1

Please sign in to comment.