MINOR: Make Include ddl disabled by default (#17450)

* MINOR: Make Include ddl disabled by default

* make schema def failure warning debug

* Add missing condition

---------

Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com>
Co-authored-by: Pablo Takara <pjt1991@gmail.com>
This commit is contained in:
Mayur Singal 2024-08-19 17:37:18 +05:30 committed by GitHub
parent 2b915a53e9
commit 8acf6d3e94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -408,7 +408,7 @@ class CommonDbSourceService(
schema_definition = inspector.get_view_definition(
table_name, schema_name
)
elif hasattr(inspector, "get_table_ddl"):
elif hasattr(inspector, "get_table_ddl") and self.source_config.includeDDL:
schema_definition = inspector.get_table_ddl(
self.connection, table_name, schema_name
)
@ -420,11 +420,11 @@ class CommonDbSourceService(
return schema_definition
except NotImplementedError:
logger.warning("Schema definition not implemented")
logger.debug("Schema definition not implemented")
except Exception as exc:
logger.debug(traceback.format_exc())
logger.warning(f"Failed to fetch schema definition for {table_name}: {exc}")
logger.debug(f"Failed to fetch schema definition for {table_name}: {exc}")
return None
def is_partition( # pylint: disable=unused-argument

View File

@ -93,7 +93,7 @@
"includeDDL": {
"description": "Optional configuration to toggle the DDL Statements ingestion.",
"type": "boolean",
"default": true,
"default": false,
"title": "Include DDL Statements"
},
"overrideMetadata":{