diff --git a/ingestion/src/metadata/ingestion/models/patch_request.py b/ingestion/src/metadata/ingestion/models/patch_request.py index ce51647717c..f7fc2236e85 100644 --- a/ingestion/src/metadata/ingestion/models/patch_request.py +++ b/ingestion/src/metadata/ingestion/models/patch_request.py @@ -94,6 +94,7 @@ ALLOWED_COMMON_PATCH_FIELDS = { "tableConstraints": True, "tablePartition": True, "location": True, + "locationPath": True, "schemaDefinition": True, "sampleData": True, "fileFormat": True, diff --git a/ingestion/src/metadata/ingestion/source/database/databricks/metadata.py b/ingestion/src/metadata/ingestion/source/database/databricks/metadata.py index b288cb00d61..31b511575b2 100644 --- a/ingestion/src/metadata/ingestion/source/database/databricks/metadata.py +++ b/ingestion/src/metadata/ingestion/source/database/databricks/metadata.py @@ -125,7 +125,7 @@ def _get_table_columns(self, connection, table_name, schema, db_name): query = DATABRICKS_GET_TABLE_COMMENTS.format( database_name=db_name, schema_name=schema, table_name=table_name ) - cursor = get_table_comment_result( + rows = get_table_comment_result( self, connection=connection, query=query, @@ -134,8 +134,6 @@ def _get_table_columns(self, connection, table_name, schema, db_name): schema=schema, ) - rows = cursor.fetchall() - except exc.OperationalError as e: # Does the table exist? regex_fmt = r"TExecuteStatementResp.*SemanticException.*Table not found {}" diff --git a/ingestion/src/metadata/utils/sqlalchemy_utils.py b/ingestion/src/metadata/utils/sqlalchemy_utils.py index 1c1e33e7687..747a8522fa4 100644 --- a/ingestion/src/metadata/utils/sqlalchemy_utils.py +++ b/ingestion/src/metadata/utils/sqlalchemy_utils.py @@ -180,7 +180,7 @@ def get_table_comment_results( """ self.table_comment_result: Dict[Tuple[str, str], str] = {} self.current_db: str = database - result = connection.execute(query) + result = connection.execute(query).fetchall() self.table_comment_result[(table_name, schema)] = result