You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/12/06 13:24:26 UTC
[GitHub] [airflow] snjypl opened a new pull request, #28158: Fix Type Error while using dynamodb_to_s3 operator
snjypl opened a new pull request, #28158:
URL: https://github.com/apache/airflow/pull/28158
Fixes https://github.com/apache/airflow/issues/28103
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal merged pull request #28158: Fix Type Error while using DynamoDBToS3Operator
Posted by GitBox <gi...@apache.org>.
eladkal merged PR #28158:
URL: https://github.com/apache/airflow/pull/28158
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on a diff in pull request #28158: Fix Type Error while using dynamodb_to_s3 operator
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28158:
URL: https://github.com/apache/airflow/pull/28158#discussion_r1041340212
##########
airflow/providers/amazon/aws/transfers/dynamodb_to_s3.py:
##########
@@ -36,8 +37,18 @@
from airflow.utils.context import Context
+class JSONEncoder(json.JSONEncoder):
+ """Custom json encoder implementation"""
+
+ def default(self, obj):
+ """Convert decimal objects in a json serializable format."""
+ if isinstance(obj, Decimal):
+ return float(obj)
+ return json.JSONEncoder.default(self, obj)
Review Comment:
```suggestion
return super().default(self, obj)
```
##########
airflow/providers/amazon/aws/transfers/dynamodb_to_s3.py:
##########
@@ -36,8 +37,18 @@
from airflow.utils.context import Context
+class JSONEncoder(json.JSONEncoder):
+ """Custom json encoder implementation"""
+
+ def default(self, obj):
+ """Convert decimal objects in a json serializable format."""
+ if isinstance(obj, Decimal):
+ return float(obj)
+ return json.JSONEncoder.default(self, obj)
Review Comment:
```suggestion
return super().default(obj)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org