diff --git a/metadata-ingestion/setup.py b/metadata-ingestion/setup.py index 7552650fa40ef3..5ff62dd02fbc3f 100644 --- a/metadata-ingestion/setup.py +++ b/metadata-ingestion/setup.py @@ -166,7 +166,6 @@ *sqlglot_lib, "GitPython>2", "python-liquid", - *sqlglot_lib, } bigquery_common = { diff --git a/metadata-ingestion/src/datahub/ingestion/source/redshift/lineage.py b/metadata-ingestion/src/datahub/ingestion/source/redshift/lineage.py index 34bfccadcaa77d..dadb06b6a95e26 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/redshift/lineage.py +++ b/metadata-ingestion/src/datahub/ingestion/source/redshift/lineage.py @@ -53,7 +53,7 @@ ) from datahub.metadata.urns import DatasetUrn from datahub.sql_parsing.schema_resolver import SchemaResolver -from datahub.sql_parsing.sqlglot_utils import parse_statement +from datahub.sql_parsing.sqlglot_utils import get_dialect, parse_statement from datahub.utilities import memory_footprint from datahub.utilities.dedup_list import deduplicate_list @@ -129,7 +129,7 @@ def parse_alter_table_rename(default_schema: str, query: str) -> Tuple[str, str, Parses an ALTER TABLE ... RENAME TO ... query and returns the schema, previous table name, and new table name. """ - parsed_query = parse_statement(query, dialect="redshift") + parsed_query = parse_statement(query, dialect=get_dialect("redshift")) assert isinstance(parsed_query, sqlglot.exp.AlterTable) prev_name = parsed_query.this.name rename_clause = parsed_query.args["actions"][0]