@@ -61,34 +61,40 @@ class DynamoDBToS3Operator(BaseOperator):
6161 To parallelize the replication, users can create multiple tasks of DynamoDBToS3Operator.
6262 For instance to replicate with parallelism of 2, create two tasks like:
6363
64- .. code-block::
65-
66- op1 = DynamoDBToS3Operator(
67- task_id='replicator-1',
68- dynamodb_table_name='hello',
69- dynamodb_scan_kwargs={
70- 'TotalSegments': 2,
71- 'Segment': 0,
72- },
73- ...
74- )
75-
76- op2 = DynamoDBToS3Operator(
77- task_id='replicator-2',
78- dynamodb_table_name='hello',
79- dynamodb_scan_kwargs={
80- 'TotalSegments': 2,
81- 'Segment': 1,
82- },
83- ...
84- )
64+ .. code-block:: python
65+
66+ op1 = DynamoDBToS3Operator(
67+ task_id='replicator-1',
68+ dynamodb_table_name='hello',
69+ dynamodb_scan_kwargs={
70+ 'TotalSegments': 2,
71+ 'Segment': 0,
72+ },
73+ ...
74+ )
75+
76+ op2 = DynamoDBToS3Operator(
77+ task_id='replicator-2',
78+ dynamodb_table_name='hello',
79+ dynamodb_scan_kwargs={
80+ 'TotalSegments': 2,
81+ 'Segment': 1,
82+ },
83+ ...
84+ )
8585
8686 :param dynamodb_table_name: Dynamodb table to replicate data from
87+ :type dynamodb_table_name: str
8788 :param s3_bucket_name: S3 bucket to replicate data to
89+ :type s3_bucket_name: str
8890 :param file_size: Flush file to s3 if file size >= file_size
91+ :type file_size: int
8992 :param dynamodb_scan_kwargs: kwargs pass to <https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Table.scan> # noqa: E501 pylint: disable=line-too-long
93+ :type dynamodb_scan_kwargs: Optional[Dict[str, Any]]
9094 :param s3_key_prefix: Prefix of s3 object key
95+ :type s3_key_prefix: Optional[str]
9196 :param process_func: How we transforms a dynamodb item to bytes. By default we dump the json
97+ :type process_func: Callable[[Dict[str, Any]], bytes]
9298 """
9399
94100 @apply_defaults
0 commit comments