Skip to content

Commit afc67fd

Browse files
committed
don't modify the original schema when we run transforms
1 parent 19f4cf7 commit afc67fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

airbyte_cdk/sources/declarative/requesters/query_properties/property_selector/json_schema_property_selector.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
2-
2+
import copy
33
from dataclasses import InitVar, dataclass, field
44
from typing import Any, List, Mapping, Optional, Set
55

@@ -42,11 +42,13 @@ def select(self) -> Optional[Set[str]]:
4242
if self.configured_stream is None:
4343
return None
4444

45-
schema_properties = self.configured_stream.stream.json_schema.get("properties", {})
45+
schema_properties = copy.deepcopy(
46+
self.configured_stream.stream.json_schema.get("properties", {})
47+
)
4648
if self.properties_transformations:
4749
for transformation in self.properties_transformations:
4850
transformation.transform(
49-
schema_properties, # type: ignore # record has type Mapping[str, Any], but Dict[str, Any] expected
51+
record=schema_properties,
5052
config=self.config,
5153
)
5254
return set(schema_properties.keys())

0 commit comments

Comments
 (0)