airbyte-cdk 6.36.3__py3-none-any.whl → 6.36.4__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/datetime/datetime_parser.py +7 -1
- airbyte_cdk/sources/declarative/declarative_component_schema.yaml +2 -0
- {airbyte_cdk-6.36.3.dist-info → airbyte_cdk-6.36.4.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.36.3.dist-info → airbyte_cdk-6.36.4.dist-info}/RECORD +8 -8
- {airbyte_cdk-6.36.3.dist-info → airbyte_cdk-6.36.4.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.36.3.dist-info → airbyte_cdk-6.36.4.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.36.3.dist-info → airbyte_cdk-6.36.4.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.36.3.dist-info → airbyte_cdk-6.36.4.dist-info}/entry_points.txt +0 -0
@@ -31,7 +31,8 @@ class DatetimeParser:
|
|
31
31
|
return datetime.datetime.fromtimestamp(float(date), tz=datetime.timezone.utc)
|
32
32
|
elif format == "%ms":
|
33
33
|
return self._UNIX_EPOCH + datetime.timedelta(milliseconds=int(date))
|
34
|
-
|
34
|
+
elif "%_ms" in format:
|
35
|
+
format = format.replace("%_ms", "%f")
|
35
36
|
parsed_datetime = datetime.datetime.strptime(str(date), format)
|
36
37
|
if self._is_naive(parsed_datetime):
|
37
38
|
return parsed_datetime.replace(tzinfo=datetime.timezone.utc)
|
@@ -48,6 +49,11 @@ class DatetimeParser:
|
|
48
49
|
if format == "%ms":
|
49
50
|
# timstamp() returns a float representing the number of seconds since the unix epoch
|
50
51
|
return str(int(dt.timestamp() * 1000))
|
52
|
+
if "%_ms" in format:
|
53
|
+
_format = format.replace("%_ms", "%f")
|
54
|
+
milliseconds = int(dt.microsecond / 1000)
|
55
|
+
formatted_dt = dt.strftime(_format).replace(dt.strftime("%f"), "%03d" % milliseconds)
|
56
|
+
return formatted_dt
|
51
57
|
else:
|
52
58
|
return dt.strftime(format)
|
53
59
|
|
@@ -844,6 +844,7 @@ definitions:
|
|
844
844
|
* **%M**: Minute (zero-padded) - `00`, `01`, ..., `59`
|
845
845
|
* **%S**: Second (zero-padded) - `00`, `01`, ..., `59`
|
846
846
|
* **%f**: Microsecond (zero-padded to 6 digits) - `000000`
|
847
|
+
* **%_ms**: Millisecond (zero-padded to 3 digits) - `000`
|
847
848
|
* **%z**: UTC offset - `(empty)`, `+0000`, `-04:00`
|
848
849
|
* **%Z**: Time zone name - `(empty)`, `UTC`, `GMT`
|
849
850
|
* **%j**: Day of the year (zero-padded) - `001`, `002`, ..., `366`
|
@@ -2401,6 +2402,7 @@ definitions:
|
|
2401
2402
|
* **%M**: Minute (zero-padded) - `00`, `01`, ..., `59`
|
2402
2403
|
* **%S**: Second (zero-padded) - `00`, `01`, ..., `59`
|
2403
2404
|
* **%f**: Microsecond (zero-padded to 6 digits) - `000000`, `000001`, ..., `999999`
|
2405
|
+
* **%_ms**: Millisecond (zero-padded to 3 digits) - `000`, `001`, ..., `999`
|
2404
2406
|
* **%z**: UTC offset - `(empty)`, `+0000`, `-04:00`
|
2405
2407
|
* **%Z**: Time zone name - `(empty)`, `UTC`, `GMT`
|
2406
2408
|
* **%j**: Day of the year (zero-padded) - `001`, `002`, ..., `366`
|
@@ -69,9 +69,9 @@ airbyte_cdk/sources/declarative/concurrency_level/__init__.py,sha256=5XUqrmlstYl
|
|
69
69
|
airbyte_cdk/sources/declarative/concurrency_level/concurrency_level.py,sha256=YIwCTCpOr_QSNW4ltQK0yUGWInI8PKNY216HOOegYLk,2101
|
70
70
|
airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=KBF9wdPC5KauFwg9dv4pFHLz01ZMwbMvN5ZCcZgiBEE,25424
|
71
71
|
airbyte_cdk/sources/declarative/datetime/__init__.py,sha256=l9LG7Qm6e5r_qgqfVKnx3mXYtg1I9MmMjomVIPfU4XA,177
|
72
|
-
airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=
|
72
|
+
airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=0qs4hhmh_XOy2B4MHCn2qVMM79C6MizIBqnvpZj1aSE,2923
|
73
73
|
airbyte_cdk/sources/declarative/datetime/min_max_datetime.py,sha256=0BHBtDNQZfvwM45-tY5pNlTcKAFSGGNxemoi0Jic-0E,5785
|
74
|
-
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=
|
74
|
+
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=OVRQ19uAhIvUOzn0SnNmOpszLUULpCoSsrcGVVY6Bd0,145499
|
75
75
|
airbyte_cdk/sources/declarative/declarative_source.py,sha256=nF7wBqFd3AQmEKAm4CnIo29CJoQL562cJGSCeL8U8bA,1531
|
76
76
|
airbyte_cdk/sources/declarative/declarative_stream.py,sha256=venZjfpvtqr3oFSuvMBWtn4h9ayLhD4L65ACuXCDZ64,10445
|
77
77
|
airbyte_cdk/sources/declarative/decoders/__init__.py,sha256=JHb_0d3SE6kNY10mxA5YBEKPeSbsWYjByq1gUQxepoE,953
|
@@ -360,9 +360,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
360
360
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
361
361
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
362
362
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
363
|
-
airbyte_cdk-6.36.
|
364
|
-
airbyte_cdk-6.36.
|
365
|
-
airbyte_cdk-6.36.
|
366
|
-
airbyte_cdk-6.36.
|
367
|
-
airbyte_cdk-6.36.
|
368
|
-
airbyte_cdk-6.36.
|
363
|
+
airbyte_cdk-6.36.4.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
364
|
+
airbyte_cdk-6.36.4.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
365
|
+
airbyte_cdk-6.36.4.dist-info/METADATA,sha256=GA6LdYLCN0e8BOIqchm7f1Zk-kA6saHnzIEGxGlQns8,6010
|
366
|
+
airbyte_cdk-6.36.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
367
|
+
airbyte_cdk-6.36.4.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
|
368
|
+
airbyte_cdk-6.36.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|