mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
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:
parent
2b915a53e9
commit
8acf6d3e94
@ -408,7 +408,7 @@ class CommonDbSourceService(
|
|||||||
schema_definition = inspector.get_view_definition(
|
schema_definition = inspector.get_view_definition(
|
||||||
table_name, schema_name
|
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(
|
schema_definition = inspector.get_table_ddl(
|
||||||
self.connection, table_name, schema_name
|
self.connection, table_name, schema_name
|
||||||
)
|
)
|
||||||
@ -420,11 +420,11 @@ class CommonDbSourceService(
|
|||||||
return schema_definition
|
return schema_definition
|
||||||
|
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
logger.warning("Schema definition not implemented")
|
logger.debug("Schema definition not implemented")
|
||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.debug(traceback.format_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
|
return None
|
||||||
|
|
||||||
def is_partition( # pylint: disable=unused-argument
|
def is_partition( # pylint: disable=unused-argument
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
"includeDDL": {
|
"includeDDL": {
|
||||||
"description": "Optional configuration to toggle the DDL Statements ingestion.",
|
"description": "Optional configuration to toggle the DDL Statements ingestion.",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"default": false,
|
||||||
"title": "Include DDL Statements"
|
"title": "Include DDL Statements"
|
||||||
},
|
},
|
||||||
"overrideMetadata":{
|
"overrideMetadata":{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user