mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-08 09:08:34 +00:00
Add exception handling for tableau sheets (#11429)
* Add exception handling for tableau sheets * remove meating
This commit is contained in:
parent
3ce6e102e6
commit
6ddf7034ae
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user