Skip to content

Commit 82ea1ee

Browse files
committed
Chore: Update dependencies and relax dependency pinning
1 parent 0c6861e commit 82ea1ee

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lorrystream/process/kinesis_cratedb_lambda.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# requires-python = ">=3.9"
2626
# dependencies = [
2727
# "commons-codec",
28-
# "sqlalchemy-cratedb==0.38.0",
28+
# "sqlalchemy-cratedb>=0.38.0",
2929
# ]
3030
# ///
3131
import base64
@@ -38,7 +38,7 @@
3838
from commons_codec.exception import UnknownOperationError
3939
from commons_codec.model import ColumnTypeMapStore
4040
from commons_codec.transform.aws_dms import DMSTranslatorCrateDB
41-
from commons_codec.transform.dynamodb import DynamoCDCTranslatorCrateDB
41+
from commons_codec.transform.dynamodb import DynamoDBCDCTranslator
4242
from sqlalchemy.util import asbool
4343

4444
LOG_LEVEL: str = os.environ.get("LOG_LEVEL", "INFO")
@@ -79,7 +79,7 @@
7979
if MESSAGE_FORMAT == "dms":
8080
cdc = DMSTranslatorCrateDB(column_types=column_types)
8181
elif MESSAGE_FORMAT == "dynamodb":
82-
cdc = DynamoCDCTranslatorCrateDB(table_name=SINK_TABLE)
82+
cdc = DynamoDBCDCTranslator(table_name=SINK_TABLE)
8383

8484
# Create the database connection outside the handler to allow
8585
# connections to be re-used by subsequent function invocations.
@@ -121,8 +121,8 @@ def handler(event, context):
121121
logger.debug(f"Record Data: {record_data}")
122122

123123
# Process record.
124-
sql = cdc.to_sql(record_data)
125-
connection.execute(sa.text(sql))
124+
operation = cdc.to_sql(record_data)
125+
connection.execute(sa.text(operation.statement), operation.parameters)
126126
connection.commit()
127127

128128
# Bookkeeping.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ dependencies = [
9797
"pika<1.4",
9898
"simplejson<4",
9999
"sqlalchemy==2.0.*",
100-
"sqlalchemy-cratedb==0.38.0",
100+
"sqlalchemy-cratedb>=0.38.0",
101101
"streamz",
102102
"tomli",
103103
"toolz",
@@ -109,7 +109,7 @@ optional-dependencies.carabas = [
109109
"aiobotocore==2.13.*", # for async-kinesis
110110
"async-kinesis<1.2",
111111
"aws-lambda-layer<0.6",
112-
"boto3>=1.34,<1.36", # for async-kinesis
112+
"boto3>=1.34,<1.36", # for async-kinesis
113113
"cottonformation<1.2",
114114
"localstack[base-runtime]<3.7",
115115
]

0 commit comments

Comments
 (0)