Skip to content

Commit

Permalink
fix(ingest): fix schema field urns with empty field path
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurinehate committed Nov 2, 2022
1 parent b4687ff commit ec3f3ab
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions metadata-ingestion/src/datahub/ingestion/source/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4178,7 +4178,7 @@
"remoteField": {
"__typename": "ColumnField",
"id": "ca23efe0-5a93-344a-3f69-ec777ee1b318",
"name": "customer_first_name",
"name": "",
"description": null,
"folderName": null,
"dataCategory": "NOMINAL",
Expand Down

0 comments on commit ec3f3ab

Please sign in to comment.