fix(ingest/redshift): fix bug in lineage v2 table renames (#9967)

This commit is contained in:
Harshal Sheth 2024-03-04 04:31:11 -08:00 committed by GitHub
parent 1b4f31bcfe
commit 70adf73081
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,3 +1,4 @@
import collections
import logging import logging
import traceback import traceback
from typing import Callable, Dict, Iterable, List, Optional, Set, Tuple, Union from typing import Callable, Dict, Iterable, List, Optional, Set, Tuple, Union
@ -116,7 +117,9 @@ class RedshiftSqlLineageV2:
table_renames, _ = self._lineage_v1._process_table_renames( table_renames, _ = self._lineage_v1._process_table_renames(
database=self.database, database=self.database,
connection=connection, connection=connection,
all_tables={}, all_tables=collections.defaultdict(
lambda: collections.defaultdict(set)
),
) )
for new_urn, original_urn in table_renames.items(): for new_urn, original_urn in table_renames.items():
self.aggregator.add_table_rename( self.aggregator.add_table_rename(