From ec3f3ab7be38d926be6cdf504e817844de244a75 Mon Sep 17 00:00:00 2001 From: mayurinehate Date: Wed, 2 Nov 2022 11:51:03 +0530 Subject: [PATCH] fix(ingest): fix schema field urns with empty field path --- metadata-ingestion/src/datahub/ingestion/source/tableau.py | 3 --- .../src/datahub/ingestion/source/tableau_common.py | 7 ------- .../integration/tableau/setup/workbooksConnection_all.json | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/tableau.py b/metadata-ingestion/src/datahub/ingestion/source/tableau.py index c7f86a9c8f8ffa..ca41cee443b763 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/tableau.py +++ b/metadata-ingestion/src/datahub/ingestion/source/tableau.py @@ -53,7 +53,6 @@ clean_query, custom_sql_graphql_query, embedded_datasource_graphql_query, - get_field_value_in_sheet, get_unique_custom_sql, make_table_urn, published_datasource_graphql_query, @@ -1325,8 +1324,6 @@ def populate_sheet_upstream_fields( field.get("datasource")["id"] if field.get("datasource") else None ) if name and upstream_ds_id: - name = get_field_value_in_sheet(field, "name") - input_fields.append( InputField( schemaFieldUrn=builder.make_schema_field_urn( diff --git a/metadata-ingestion/src/datahub/ingestion/source/tableau_common.py b/metadata-ingestion/src/datahub/ingestion/source/tableau_common.py index 26a7e8de228fbd..3c2b49d466c195 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/tableau_common.py +++ b/metadata-ingestion/src/datahub/ingestion/source/tableau_common.py @@ -574,13 +574,6 @@ def make_description_from_params(description, formula): return final_description -def get_field_value_in_sheet(field, field_name): - if field.get("__typename", "") == "DatasourceField": - field = field.get("remoteField") or {} - - return field.get(field_name, "") - - def get_unique_custom_sql(custom_sql_list: List[dict]) -> List[dict]: unique_custom_sql = [] for custom_sql in custom_sql_list: diff --git a/metadata-ingestion/tests/integration/tableau/setup/workbooksConnection_all.json b/metadata-ingestion/tests/integration/tableau/setup/workbooksConnection_all.json index 516208cbd59270..3eb0bd05a03e2a 100644 --- a/metadata-ingestion/tests/integration/tableau/setup/workbooksConnection_all.json +++ b/metadata-ingestion/tests/integration/tableau/setup/workbooksConnection_all.json @@ -4178,7 +4178,7 @@ "remoteField": { "__typename": "ColumnField", "id": "ca23efe0-5a93-344a-3f69-ec777ee1b318", - "name": "customer_first_name", + "name": "", "description": null, "folderName": null, "dataCategory": "NOMINAL",