airbyte-cdk 6.42.0__py3-none-any.whl → 6.42.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airbyte_cdk/sources/declarative/interpolation/macros.py +8 -4
- airbyte_cdk/sources/declarative/transformations/add_fields.py +3 -1
- {airbyte_cdk-6.42.0.dist-info → airbyte_cdk-6.42.2.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.42.0.dist-info → airbyte_cdk-6.42.2.dist-info}/RECORD +8 -8
- {airbyte_cdk-6.42.0.dist-info → airbyte_cdk-6.42.2.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.42.0.dist-info → airbyte_cdk-6.42.2.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.42.0.dist-info → airbyte_cdk-6.42.2.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.42.0.dist-info → airbyte_cdk-6.42.2.dist-info}/entry_points.txt +0 -0
@@ -156,7 +156,7 @@ def duration(datestring: str) -> Union[datetime.timedelta, isodate.Duration]:
|
|
156
156
|
|
157
157
|
|
158
158
|
def format_datetime(
|
159
|
-
dt: Union[str, datetime.datetime], format: str, input_format: Optional[str] = None
|
159
|
+
dt: Union[str, datetime.datetime, int], format: str, input_format: Optional[str] = None
|
160
160
|
) -> str:
|
161
161
|
"""
|
162
162
|
Converts datetime to another format
|
@@ -170,9 +170,13 @@ def format_datetime(
|
|
170
170
|
"""
|
171
171
|
if isinstance(dt, datetime.datetime):
|
172
172
|
return dt.strftime(format)
|
173
|
-
|
174
|
-
|
175
|
-
|
173
|
+
|
174
|
+
if isinstance(dt, int):
|
175
|
+
dt_datetime = DatetimeParser().parse(dt, input_format if input_format else "%s")
|
176
|
+
else:
|
177
|
+
dt_datetime = (
|
178
|
+
datetime.datetime.strptime(dt, input_format) if input_format else str_to_datetime(dt)
|
179
|
+
)
|
176
180
|
return DatetimeParser().format(dt=dt_datetime, format=format)
|
177
181
|
|
178
182
|
|
@@ -139,7 +139,9 @@ class AddFields(RecordTransformation):
|
|
139
139
|
valid_types = (parsed_field.value_type,) if parsed_field.value_type else None
|
140
140
|
value = parsed_field.value.eval(config, valid_types=valid_types, **kwargs)
|
141
141
|
is_empty_condition = not self.condition
|
142
|
-
if is_empty_condition or self._filter_interpolator.eval(
|
142
|
+
if is_empty_condition or self._filter_interpolator.eval(
|
143
|
+
config, value=value, path=parsed_field.path, **kwargs
|
144
|
+
):
|
143
145
|
dpath.new(record, parsed_field.path, value)
|
144
146
|
|
145
147
|
def __eq__(self, other: Any) -> bool:
|
@@ -108,7 +108,7 @@ airbyte_cdk/sources/declarative/interpolation/interpolated_nested_mapping.py,sha
|
|
108
108
|
airbyte_cdk/sources/declarative/interpolation/interpolated_string.py,sha256=CQkHqGlfa87G6VYMtBAQWin7ECKpfMdrDcg0JO5_rhc,3212
|
109
109
|
airbyte_cdk/sources/declarative/interpolation/interpolation.py,sha256=9IoeuWam3L6GyN10L6U8xNWXmkt9cnahSDNkez1OmFY,982
|
110
110
|
airbyte_cdk/sources/declarative/interpolation/jinja.py,sha256=UQeuS4Vpyp4hlOn-R3tRyeBX0e9IoV6jQ6gH-Jz8lY0,7182
|
111
|
-
airbyte_cdk/sources/declarative/interpolation/macros.py,sha256=
|
111
|
+
airbyte_cdk/sources/declarative/interpolation/macros.py,sha256=CF2L_r73TCd1Wssq9_tjFPb4c872QM8oW6NL-DIR0h4,5226
|
112
112
|
airbyte_cdk/sources/declarative/manifest_declarative_source.py,sha256=kFfyVpX-babuF4YzUHm7xfx_3M4M-GwJsrOWuez1z9Q,18894
|
113
113
|
airbyte_cdk/sources/declarative/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
114
114
|
airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migration.py,sha256=iemy3fKLczcU0-Aor7tx5jcT6DRedKMqyK7kCOp01hg,3924
|
@@ -186,7 +186,7 @@ airbyte_cdk/sources/declarative/stream_slicers/__init__.py,sha256=sI9vhc95RwJYOn
|
|
186
186
|
airbyte_cdk/sources/declarative/stream_slicers/declarative_partition_generator.py,sha256=RW1Q44ml-VWeMl4lNcV6EfyzrzCZkjj-hd0Omx_n_n4,3405
|
187
187
|
airbyte_cdk/sources/declarative/stream_slicers/stream_slicer.py,sha256=SOkIPBi2Wu7yxIvA15yFzUAB95a3IzA8LPq5DEqHQQc,725
|
188
188
|
airbyte_cdk/sources/declarative/transformations/__init__.py,sha256=CPJ8TlMpiUmvG3624VYu_NfTzxwKcfBjM2Q2wJ7fkSA,919
|
189
|
-
airbyte_cdk/sources/declarative/transformations/add_fields.py,sha256=
|
189
|
+
airbyte_cdk/sources/declarative/transformations/add_fields.py,sha256=Eg1jQtRObgzxbtySTQs5uEZIjEklsoHFxYSPf78x6Ng,5420
|
190
190
|
airbyte_cdk/sources/declarative/transformations/dpath_flatten_fields.py,sha256=I8oXPAOFhBV1mW_ufMn8Ii7oMbtect0sfLcpBNrKzzw,2374
|
191
191
|
airbyte_cdk/sources/declarative/transformations/flatten_fields.py,sha256=yT3owG6rMKaRX-LJ_T-jSTnh1B5NoAHyH4YZN9yOvE8,1758
|
192
192
|
airbyte_cdk/sources/declarative/transformations/keys_replace_transformation.py,sha256=vbIn6ump-Ut6g20yMub7PFoPBhOKVtrHSAUdcOUdLfw,1999
|
@@ -359,9 +359,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
359
359
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
360
360
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
361
361
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
362
|
-
airbyte_cdk-6.42.
|
363
|
-
airbyte_cdk-6.42.
|
364
|
-
airbyte_cdk-6.42.
|
365
|
-
airbyte_cdk-6.42.
|
366
|
-
airbyte_cdk-6.42.
|
367
|
-
airbyte_cdk-6.42.
|
362
|
+
airbyte_cdk-6.42.2.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
363
|
+
airbyte_cdk-6.42.2.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
364
|
+
airbyte_cdk-6.42.2.dist-info/METADATA,sha256=S2UFHNN-dpAO6OdorZ6PazSnNpFctAlRsq_su2MJKqE,6071
|
365
|
+
airbyte_cdk-6.42.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
366
|
+
airbyte_cdk-6.42.2.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
|
367
|
+
airbyte_cdk-6.42.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|