john_rhodes
03/22/2023, 4:42 PMfor stream_map_key, stream_def in self.stream_maps_dict.items():
stream_alias: str = stream_map_key
source_stream: str = stream_map_key
Within the for loop, the following is later executed, and it is altering the stream definition:
if MAPPER_SOURCE_OPTION in stream_def:
source_stream = stream_def.pop(MAPPER_SOURCE_OPTION)
if source_stream != stream_name:
# Not a match
continue
if MAPPER_ALIAS_OPTION in stream_def:
stream_alias = stream_def.pop(MAPPER_ALIAS_OPTION)
When I altered the for loop locally to make a copy of the stream definition, the alias configuration was maintained and we got the expected outcome.
for stream_map_key, y in self.stream_maps_dict.items():
stream_def = dict(y)
stream_alias: str = stream_map_key
source_stream: str = stream_map_key
Would anyone else agree that the intent was to copy the stream definition? Any other thoughts or questions, please let me know. Thank you!edgar_ramirez_mondragon
03/22/2023, 8:35 PMaaronsteers
03/22/2023, 11:35 PM