Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ingest/sql): add default dialect support to SqlQueriesSource #11285

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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}")
Expand Down