mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-11 08:52:58 +00:00
feat(ingest): bigquery - support snapshot and partition tables during ingest & lineage (#3695)
This commit is contained in:
parent
1d7ec8dba8
commit
3cc4e76748
@ -187,8 +187,8 @@ class BigQuerySource(SQLAlchemySource):
|
|||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
for ref_table in e.referencedTables:
|
for ref_table in e.referencedTables:
|
||||||
destination_table_str = str(e.destinationTable)
|
destination_table_str = str(e.destinationTable.remove_extras())
|
||||||
ref_table_str = str(ref_table)
|
ref_table_str = str(ref_table.remove_extras())
|
||||||
if ref_table_str != destination_table_str:
|
if ref_table_str != destination_table_str:
|
||||||
lineage_map[destination_table_str].add(ref_table_str)
|
lineage_map[destination_table_str].add(ref_table_str)
|
||||||
return lineage_map
|
return lineage_map
|
||||||
@ -294,7 +294,14 @@ class BigQuerySource(SQLAlchemySource):
|
|||||||
) -> str:
|
) -> str:
|
||||||
assert inspector
|
assert inspector
|
||||||
project_id = self._get_project_id(inspector)
|
project_id = self._get_project_id(inspector)
|
||||||
return f"{project_id}.{schema}.{entity}"
|
trimmed_table_name = (
|
||||||
|
BigQueryTableRef.from_spec_obj(
|
||||||
|
{"projectId": project_id, "datasetId": schema, "tableId": entity}
|
||||||
|
)
|
||||||
|
.remove_extras()
|
||||||
|
.table
|
||||||
|
)
|
||||||
|
return f"{project_id}.{schema}.{trimmed_table_name}"
|
||||||
|
|
||||||
def standardize_schema_table_names(
|
def standardize_schema_table_names(
|
||||||
self, schema: str, entity: str
|
self, schema: str, entity: str
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user