-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DynamoDB: Get CDC event to SQL translator right, improve KCLv2 launcher
- CDC-to-SQL - Provides concise interface: `DynamoCDCTranslatorCrateDB(table_name="foobar").to_sql(cdc_event)` - Uses `boto3.dynamodb.types.TypeDeserializer` to handle all data types of DynamoDB without further ado - Uses `simplejson` to convert `Decimal` types without further ado - Improve KCLv2 launcher: Use environment variables for configuration: `CDC_SQLALCHEMY_URL`, `CDC_TABLE_NAME`, `CDC_LOGFILE` - Turn off metrics logging to CloudWatch? - Update backlog
- Loading branch information
Showing
11 changed files
with
313 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,24 @@ | ||
# DynamoDB CDC processing backlog | ||
|
||
## Iteration +1 | ||
- Improve type mapping. | ||
- Use SQLAlchemy for generating and submitting SQL statement. | ||
- Improve efficiency by using bulk operations when applicable. | ||
- [x] Improve type mapping | ||
- [x] Generalize CDC event -> SQL translator | ||
- [ ] Distill into a Lambda variant | ||
- [ ] Automation! | ||
- [ ] DDL: CREATE TABLE <tablename> (data OBJECT(DYNAMIC)); | ||
- [ ] Wrap KCL launcher into manager component | ||
|
||
CREATE TABLE transactions (data OBJECT(DYNAMIC)); | ||
CREATE TABLE transactions (id INT) WITH (column_policy = 'dynamic'); | ||
## Iteration +2 | ||
- [ ] Performance improvements (simdjson?) | ||
- [ ] Use SQLAlchemy for generating and submitting SQL statement | ||
- [ ] Improve efficiency by using bulk operations when applicable | ||
|
||
## Research | ||
- https://pypi.org/project/core-cdc | ||
- https://github.com/sshd123/pypgoutput | ||
- https://pypi.org/project/pypg-cdc/ | ||
- https://github.com/hcevikGA/dynamo-wrapper | ||
- https://pypi.org/project/dynamo-pandas/ | ||
- https://aws.amazon.com/de/blogs/opensource/announcing-partiql-one-query-language-for-all-your-data/ | ||
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ql-reference.html | ||
- https://partiql.org/dql/overview.html |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
python amazon_kclpy_helper.py --print_command --java /usr/bin/java --properties "$1" --log-configuration logback.xml | ||
#!/bin/sh | ||
|
||
# Configure record processor. | ||
export CDC_SQLALCHEMY_URL=crate:// | ||
export CDC_TABLE_NAME=transactions | ||
export CDC_LOGFILE=dynamodb_cdc_processor.log | ||
|
||
# Invoke KCL launcher. | ||
KCLPY_PATH=$(python -c 'import amazon_kclpy; print(amazon_kclpy.__path__[0])') | ||
/usr/bin/java \ | ||
-DstreamName=dynamodb-cdc-nested \ | ||
-cp "${KCLPY_PATH}/jars/*" \ | ||
software.amazon.kinesis.multilang.MultiLangDaemon \ | ||
--properties-file "$1" \ | ||
--log-configuration logback.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
amazon-kclpy==2.1.5 | ||
awscli==1.33.* | ||
boto3<1.35 | ||
simplejson<4 |
Empty file.
Oops, something went wrong.