diff --git a/pyatlan/generator/templates/methods/attribute/table_partition.jinja2 b/pyatlan/generator/templates/methods/attribute/table_partition.jinja2 index de067679..24da0b88 100644 --- a/pyatlan/generator/templates/methods/attribute/table_partition.jinja2 +++ b/pyatlan/generator/templates/methods/attribute/table_partition.jinja2 @@ -27,9 +27,9 @@ connection_qn, connector_name = AtlanConnectorType.get_connector_name( table_qualified_name, "table_qualified_name", 6 ) - + fields = table_qualified_name.split("/") - + connection_qualified_name = connection_qualified_name or connection_qn database_name = database_name or fields[3] schema_name = schema_name or fields[4] @@ -39,8 +39,7 @@ or f"{connection_qualified_name}/{database_name}" ) schema_qualified_name = ( - schema_qualified_name - or f"{connection_qualified_name}/{database_name}" + schema_qualified_name or f"{connection_qualified_name}/{database_name}" ) qualified_name = f"{schema_qualified_name}/{name}" @@ -56,4 +55,4 @@ connection_qualified_name=connection_qualified_name, table_name=table_name, table_qualified_name=table_qualified_name, - ) + ) \ No newline at end of file diff --git a/pyatlan/model/assets/core/table_partition.py b/pyatlan/model/assets/core/table_partition.py index b84bca90..d718f3da 100644 --- a/pyatlan/model/assets/core/table_partition.py +++ b/pyatlan/model/assets/core/table_partition.py @@ -489,9 +489,9 @@ def creator( connection_qn, connector_name = AtlanConnectorType.get_connector_name( table_qualified_name, "table_qualified_name", 6 ) - + fields = table_qualified_name.split("/") - + connection_qualified_name = connection_qualified_name or connection_qn database_name = database_name or fields[3] schema_name = schema_name or fields[4] @@ -501,8 +501,7 @@ def creator( or f"{connection_qualified_name}/{database_name}" ) schema_qualified_name = ( - schema_qualified_name - or f"{connection_qualified_name}/{database_name}" + schema_qualified_name or f"{connection_qualified_name}/{database_name}" ) qualified_name = f"{schema_qualified_name}/{name}"