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/looker): update for Looker query API breaking change #9865

Merged
merged 7 commits into from
Feb 16, 2024

Conversation

feldjay
Copy link
Contributor

@feldjay feldjay commented Feb 15, 2024

See patch notice here https://cloud.google.com/looker/docs/best-practices/query-id-update-instructions

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 ingestion PR or Issue related to the ingestion of metadata community-contribution PR or Issue raised by member(s) of DataHub Community labels Feb 15, 2024
@@ -1199,7 +1199,9 @@ def extract_independent_looks(self) -> Iterable[MetadataWorkUnit]:
logger.info(f"query_id is None for look {look.title}({look.id})")
continue

query: Query = self.looker_api.get_query(look.query_id, query_fields)
query: Query = self.looker_api.look(look.id, fields="query").query
filtered_query_dict = {key: getattr(query, key) for key in query_fields if hasattr(query, key)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add a comment explaining why we need this filtering step?

Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

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

LGTM

@hsheth2
Copy link
Collaborator

hsheth2 commented Feb 15, 2024

@feldjay looks like there's some lint issues

src/datahub/ingestion/source/looker/looker_lib_wrapper.py:261: error: Incompatible return value type (got "LookWithQuery", expected "Look")  [return-value]
src/datahub/ingestion/source/looker/looker_source.py:1202: error: "Look" has no attribute "query"; maybe "query_id"?  [attr-defined]
src/datahub/ingestion/source/looker/looker_source.py:1202: error: Argument 1 to "get_look" of "LookerAPI" has incompatible type "Optional[str]"; expected "str"  [arg-type]

@hsheth2 hsheth2 changed the title Fix (ingest): Update looker source for Looker query API breaking change fix(ingest/looker): update for Looker query API breaking change Feb 16, 2024
@hsheth2 hsheth2 merged commit cda34b5 into datahub-project:master Feb 16, 2024
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants