diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql_queries.py b/metadata-ingestion/src/datahub/ingestion/source/sql_queries.py index 138430a68fcb9d..f3e8e774e4388f 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql_queries.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql_queries.py @@ -66,6 +66,10 @@ class SqlQueriesSourceConfig(PlatformInstanceConfigMixin, EnvConfigMixin): description="The default schema to use for unqualified table names", default=None, ) + default_dialect: Optional[str] = Field( + description="The SQL dialect to use when parsing queries. Overrides automatic dialect detection.", + default=None, + ) class SqlQueriesSourceReport(SourceReport): @@ -177,6 +181,7 @@ def _process_query(self, entry: "QueryEntry") -> Iterable[MetadataWorkUnit]: schema_resolver=self.schema_resolver, default_db=self.config.default_db, default_schema=self.config.default_schema, + default_dialect=self.config.default_dialect, ) if result.debug_info.table_error: logger.info(f"Error parsing table lineage, {result.debug_info.table_error}")