@@ -160,6 +160,20 @@ def to_configured_catalog(
160160 }
161161)
162162
163+ # Manifest with component definition with value containing tab characters
164+ # which would cause YAML ScannerError (tabs cannot start tokens in YAML)
165+ _MANIFEST_WITH_TAB_SCANNER_ERROR = deepcopy (_MANIFEST )
166+ _MANIFEST_WITH_TAB_SCANNER_ERROR ["dynamic_streams" ][0 ]["components_resolver" ][
167+ "components_mapping"
168+ ].append (
169+ {
170+ "type" : "ComponentMappingDefinition" ,
171+ "create_or_update" : True ,
172+ "field_path" : ["retriever" , "requester" , "$parameters" , "custom_query" ],
173+ "value" : "SELECT\n \t campaign.name,\n \t campaign.id\n FROM campaign" , # Contains tab characters
174+ }
175+ )
176+
163177
164178@pytest .mark .parametrize (
165179 "manifest, config, expected_exception, expected_stream_names" ,
@@ -173,8 +187,15 @@ def to_configured_catalog(
173187 ),
174188 (_MANIFEST_WITH_STREAM_CONFIGS_LIST , _CONFIG , None , ["item_1" , "item_2" , "default_item" ]),
175189 (_MANIFEST_WITH_SCANNER_ERROR , _CONFIG , None , ["item_1" , "item_2" , "default_item" ]),
190+ (_MANIFEST_WITH_TAB_SCANNER_ERROR , _CONFIG , None , ["item_1" , "item_2" , "default_item" ]),
191+ ],
192+ ids = [
193+ "no_duplicates" ,
194+ "duplicates" ,
195+ "stream_configs_list" ,
196+ "scanner_error" ,
197+ "tab_scanner_error" ,
176198 ],
177- ids = ["no_duplicates" , "duplicates" , "stream_configs_list" , "scanner_error" ],
178199)
179200def test_dynamic_streams_read_with_config_components_resolver (
180201 manifest , config , expected_exception , expected_stream_names
0 commit comments