Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ingest/tableau): fix tableau native CLL for snowflake, add type annotations #8779

Merged

Conversation

mayurinehate
Copy link
Collaborator

  1. Snowflake schema field urns should be lowercased . Issue reported on slack thread
  2. Fix empty workbook response in chart graphql api. Issue reported on slack thread
  3. Add type annotations across snowflake and tableau sources to improve mypy coverage.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Sep 4, 2023
@mayurinehate mayurinehate changed the title fix(ingest/tableau): fix tableau native CLL for snowflake, better type handling fix(ingest/tableau): fix tableau native CLL for snowflake, add type annotations Sep 4, 2023
@@ -1086,9 +1093,12 @@ def get_upstream_columns_of_fields_in_datasource(
and upstream_table_id
and upstream_table_id in table_id_to_urn.keys()
):
parent_dataset_urn = table_id_to_urn[upstream_table_id]
if self.is_snowflake_urn(parent_dataset_urn):
name = name.lower()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix for tableau native CLL with snowflake upstream

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a comment explaining that the snowflake source lowercases column names, so this behavior is to match that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

f"/{workbook[tableau_constant.NAME].replace('/', REPLACE_SLASH_CHAR)}"
]
)
browse_paths = self.get_browse_paths_aspect(workbook)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix for handling null workbook dict returned in chart graphql api response

@@ -2378,32 +2386,8 @@ def emit_dashboard(
if wu is not None:
yield wu

project_luid: Optional[str] = self._get_workbook_project_luid(workbook)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for handling empty workbook dict returned in dashboard graphql api response

dataset_urn: str,
fine_upstreams: List[FineGrainedLineage],
column_with_upstreams: Dict,
) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding these annotations

@@ -1086,9 +1093,12 @@ def get_upstream_columns_of_fields_in_datasource(
and upstream_table_id
and upstream_table_id in table_id_to_urn.keys()
):
parent_dataset_urn = table_id_to_urn[upstream_table_id]
if self.is_snowflake_urn(parent_dataset_urn):
name = name.lower()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a comment explaining that the snowflake source lowercases column names, so this behavior is to match that?

@hsheth2 hsheth2 merged commit 8bf28bf into datahub-project:master Sep 6, 2023
58 checks passed
spadhi7 added a commit to spadhi7/datahub that referenced this pull request Oct 4, 2023
* tag 'v0.11.0': (188 commits)
  fix(spark-test): upgrade gradle and fix spark smoke test (datahub-project#8777)
  fix(gms): Fixed Recently Viewed section for users with '@' in the URN. (datahub-project#8754)
  feat: add feedback widget (datahub-project#8732)
  fix(custom-search): fix custom search to be able to use unquoted query (datahub-project#8805)
  docs(db-retention): update with default setting (datahub-project#8797)
  feat(openapi): entity endpoints & analytics raw (datahub-project#8537)
  feat(search): Also de-duplicate the field queries based on field names (datahub-project#8788)
  fix(ingest): drop `wrap_aspect_as_workunit` method (datahub-project#8766)
  feat(ingest): drop sql_metadata parser (datahub-project#8765)
  docs: minor fix on versioning navbar and dropdown (datahub-project#8790)
  chore(ingest): upgrade sqlglot fork (datahub-project#8775)
  docs: add datahub source to integrations page (datahub-project#8787)
  fix(ingest/bigquery): fix partition and median queries for profiling (datahub-project#8778)
  fix(ingest/tableau): fix tableau native CLL for snowflake, add type annotations (datahub-project#8779)
  refactor(ingest): Add support for group-owners in dataflow entities (datahub-project#8154)
  feat(systemMetadata): Adding a lastRunId field system metadata  (datahub-project#8672)
  feat(airflow-plugin): add package type information (datahub-project#8795)
  fix(ingest/datahub): Support postgres; build(postgres): Modernize postgres docker setup (datahub-project#8762)
  docs(session): add documentation for session token duration and fix default (datahub-project#8791)
  chore(analytics): bump version (datahub-project#8786)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants