Skip to content

Commit

Permalink
feat(ingest): add connectivity check for Looker (#2902)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhu authored Jul 16, 2021
1 parent 49de7ab commit dc72ecd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion metadata-ingestion/src/datahub/ingestion/source/looker.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,13 @@ def _get_looker_client(self):
os.environ["LOOKERSDK_CLIENT_SECRET"] = self.source_config.client_secret
os.environ["LOOKERSDK_BASE_URL"] = self.source_config.base_url

return looker_sdk.init31()
client = looker_sdk.init31()

# try authenticating current user to check connectivity
# (since it's possible to initialize an invalid client without any complaints)
client.me()

return client

def get_workunits(self) -> Iterable[MetadataWorkUnit]:
client = self._get_looker_client()
Expand Down

0 comments on commit dc72ecd

Please sign in to comment.