vincbeck commented on code in PR #41304:
URL: https://github.com/apache/airflow/pull/41304#discussion_r1719709485
##########
tests/system/providers/amazon/aws/example_dynamodb_to_s3.py:
##########
@@ -162,18 +171,39 @@ def delete_dynamodb_table(table_name: str):
# [END howto_transfer_dynamodb_to_s3_segmented]
export_time = get_export_time(table_name)
- # [START howto_transfer_dynamodb_to_s3_in_some_point_in_time]
- backup_db_to_point_in_time = DynamoDBToS3Operator(
- task_id="backup_db_to_point_in_time",
+ latest_export_time = get_latest_export_time(table_name)
+ # [START howto_transfer_dynamodb_to_s3_in_some_point_in_time_full_export]
+ backup_db_to_point_in_time_full_export = DynamoDBToS3Operator(
+ task_id="backup_db_to_point_in_time_full_export",
dynamodb_table_name=table_name,
- file_size=1000,
s3_bucket_name=bucket_name,
+ point_in_time_export=True,
export_time=export_time,
s3_key_prefix=f"{S3_KEY_PREFIX}-3-",
)
- # [END howto_transfer_dynamodb_to_s3_in_some_point_in_time]
+ # [END howto_transfer_dynamodb_to_s3_in_some_point_in_time_full_export]
+
+ # [START
howto_transfer_dynamodb_to_s3_in_some_point_in_time_incremental_export]
+ backup_db_to_point_in_time_incremental_export = DynamoDBToS3Operator(
+ task_id="backup_db_to_point_in_time_incremental_export",
+ dynamodb_table_name=table_name,
+ s3_bucket_name=bucket_name,
+ point_in_time_export=True,
+ s3_key_prefix=f"{S3_KEY_PREFIX}-4-",
+ export_table_to_point_in_time_kwargs={
+ "ExportType": "INCREMENTAL_EXPORT",
+ "IncrementalExportSpecification": {
+ "ExportFromTime": export_time,
+ "ExportToTime": latest_export_time,
Review Comment:
"error: Difference between "from" time and "to" is less than 15 minutes" is
the most scary. That means we need to wait for 15 minutes so that we can create
the incremental export. In that case we dont want to run it as part of the
system test, so either we delete it from the system test, or we, somehow, skip
it
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]