mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 05:03:10 +00:00
parent
831cccf71e
commit
40bd3bd3fa
@ -247,6 +247,7 @@ class QuicksightSource(DashboardServiceSource):
|
||||
**data_source["RelationalTable"]
|
||||
)
|
||||
except (KeyError, ValidationError) as err:
|
||||
data_source_resp = None
|
||||
yield Either(
|
||||
left=StackTraceError(
|
||||
name="Lineage",
|
||||
@ -257,7 +258,7 @@ class QuicksightSource(DashboardServiceSource):
|
||||
stackTrace=traceback.format_exc(),
|
||||
)
|
||||
)
|
||||
|
||||
if data_source_resp:
|
||||
schema_name = data_source_resp.schema_name
|
||||
table_name = data_source_resp.table_name
|
||||
|
||||
@ -283,14 +284,19 @@ class QuicksightSource(DashboardServiceSource):
|
||||
DataSourceId=data_source_id,
|
||||
)
|
||||
).DataSource
|
||||
if data_source_resp and data_source_resp.DataSourceParameters:
|
||||
if (
|
||||
data_source_resp
|
||||
and data_source_resp.DataSourceParameters
|
||||
):
|
||||
data_source_dict = data_source_resp.DataSourceParameters
|
||||
for db in data_source_dict.keys() or []:
|
||||
from_fqn = fqn.build(
|
||||
self.metadata,
|
||||
entity_type=Table,
|
||||
service_name=db_service_name,
|
||||
database_name=data_source_dict[db].get("Database"),
|
||||
database_name=data_source_dict[db].get(
|
||||
"Database"
|
||||
),
|
||||
schema_name=schema_name,
|
||||
table_name=table_name,
|
||||
skip_es_search=True,
|
||||
@ -309,7 +315,10 @@ class QuicksightSource(DashboardServiceSource):
|
||||
entity=Dashboard,
|
||||
fqn=to_fqn,
|
||||
)
|
||||
if from_entity is not None and to_entity is not None:
|
||||
if (
|
||||
from_entity is not None
|
||||
and to_entity is not None
|
||||
):
|
||||
yield self._get_add_lineage_request(
|
||||
to_entity=to_entity, from_entity=from_entity
|
||||
)
|
||||
|
@ -50,12 +50,12 @@ class DashboardResp(BaseModel):
|
||||
RequestId: Optional[str] = None
|
||||
|
||||
|
||||
class DataSource(BaseModel):
|
||||
class DataSourceModel(BaseModel):
|
||||
DataSourceId: str
|
||||
DataSourceParameters: Optional[dict] = None
|
||||
|
||||
|
||||
class DescribeDataSourceResponse(BaseModel):
|
||||
DataSource: Optional[DataSource] = None
|
||||
DataSource: Optional[DataSourceModel] = None
|
||||
RequestId: Optional[str] = None
|
||||
Status: Optional[int] = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user