diff --git a/ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py b/ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py index b24b469a8bb..28cf50ebbb6 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py @@ -11,7 +11,6 @@ """ Wrapper module of TableauServerConnection client """ -import json from typing import Any, Callable, Dict, List from cached_property import cached_property @@ -94,9 +93,12 @@ class TableauClient: data_model_graphql_result = self._client.metadata_graphql_query( query=TABLEAU_SHEET_QUERY_BY_ID.format(id=sheet_id) ) - return TableauSheets( - **json.loads(data_model_graphql_result.text).get("data", []) - ) + + if data_model_graphql_result: + resp = data_model_graphql_result.json() + if resp and resp.get("data"): + return TableauSheets(**resp.get("data")) + return TableauSheets(sheets=[]) def sign_out(self) -> None: self._client.sign_out()