mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-03 04:10:43 +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
|
||||
for ref_table in e.referencedTables:
|
||||
destination_table_str = str(e.destinationTable)
|
||||
ref_table_str = str(ref_table)
|
||||
destination_table_str = str(e.destinationTable.remove_extras())
|
||||
ref_table_str = str(ref_table.remove_extras())
|
||||
if ref_table_str != destination_table_str:
|
||||
lineage_map[destination_table_str].add(ref_table_str)
|
||||
return lineage_map
|
||||
@ -294,7 +294,14 @@ class BigQuerySource(SQLAlchemySource):
|
||||
) -> str:
|
||||
assert 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(
|
||||
self, schema: str, entity: str
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user