Skip to content

Commit

Permalink
CDK: Fix 'emitted_at' from 'seconds * 1000' to correct milliseconds. (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
yevhenii-ldv authored Nov 29, 2021
1 parent b727bb2 commit afaa963
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions airbyte-cdk/python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.1.37
Fix `emitted_at` from `seconds * 1000` to correct milliseconds.

## 0.1.36
Fix broken logger in streams: add logger inheritance for streams from `airbyte`.

Expand Down
2 changes: 1 addition & 1 deletion airbyte-cdk/python/airbyte_cdk/sources/abstract_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _get_stream_transformer_and_schema(self, stream_name: str) -> Tuple[TypeTran
return stream_instance.transformer, stream_instance.get_json_schema()

def _as_airbyte_record(self, stream_name: str, data: Mapping[str, Any]):
now_millis = int(datetime.now().timestamp()) * 1000
now_millis = int(datetime.now().timestamp() * 1000)
transformer, schema = self._get_stream_transformer_and_schema(stream_name)
# Transform object fields according to config. Most likely you will
# need it to normalize values against json schema. By default no action
Expand Down
2 changes: 1 addition & 1 deletion airbyte-cdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="airbyte-cdk",
version="0.1.36",
version="0.1.37",
description="A framework for writing Airbyte Connectors.",
long_description=README,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit afaa963

Please sign in to comment.