Skip to content

Commit 8798042

Browse files
author
Oleksandr Bazarnov
committed
enabled the reduce_commons: True for Connector Builder case
1 parent 66fe38e commit 8798042

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

airbyte_cdk/sources/declarative/parsers/manifest_deduplicator.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,17 @@ def _reference_schemas(manifest: ManifestType) -> None:
124124
"""
125125

126126
# create the ref tag to each stream in the manifest
127-
if STREAMS_TAG in manifest:
127+
if STREAMS_TAG in manifest.keys():
128128
for stream in manifest[STREAMS_TAG]:
129129
stream_name = stream.get("name")
130130
# reference the stream schema for the stream to where it's storred
131-
if stream_name in manifest[SCHEMAS_TAG].keys():
132-
stream[SCHEMA_LOADER_TAG][SCHEMA_TAG] = _create_schema_ref(stream_name)
133-
else:
134-
raise ManifestDeduplicationException(
135-
f"Stream {stream_name} not found in `schemas`. Please check the manifest."
136-
)
131+
if SCHEMAS_TAG in manifest.keys():
132+
if stream_name in manifest[SCHEMAS_TAG].keys():
133+
stream[SCHEMA_LOADER_TAG][SCHEMA_TAG] = _create_schema_ref(stream_name)
134+
else:
135+
raise ManifestDeduplicationException(
136+
f"Stream {stream_name} not found in `schemas`. Please check the manifest."
137+
)
137138

138139

139140
def _replace_duplicates_with_refs(manifest: ManifestType, duplicates: DuplicatesType) -> None:

0 commit comments

Comments
 (0)