Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Extending full_table replication mode to optionally support Filtering. Dynamodb already supports the "FilterExpression", and "ExpressionAttributeValues" options as part of the scan table command. This PR passes through these options from Metadata (catalog) over to client.scan() via scan_params.
Manual QA steps
Step1: Update the catalog.json metadata section
Here's an example table definition from catalog.json updated to have the FilterExpression
{"table_name": "my-table-name", "stream": "my-table-name", "tap_stream_id": "my-table-name", "metadata": [{"breadcrumb": [], "metadata": {"table-key-properties": ["model_name", "created_date"], "row-count": 562522, "selected": true, "replication-method": "FULL_TABLE", "FilterExpression": "begins_with(created_date, :dt)", "ExpressionAttributeValues": "{\":dt\":{\"S\":\"2020-03-27\"}}"}}], "schema": {"type": "object"}}
Step2: Run the tap using the modified catalog.json
bin/tap-dynamodb --config tap-dynamodb/config.json --catalog tap-dynamodb/catalog.json
Step3: Expected result, the source table "my-table-name" is scanned based on attribute "created_date" values beginning with "2020-03-27"
Risks
Rollback steps