Skip to content

Commit f54a841

Browse files
committed
IO: Implement suggestions by CodeRabbit
1 parent 7dd337f commit f54a841

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

cratedb_toolkit/io/kinesis/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ def kinesis_relay(source_url: URL, target_url: str, recipe: TransformationType =
2424

2525
ka = KinesisRelay(str(source_url), target_url, recipe=parsed_recipe)
2626
ka.start(once=once)
27+
28+
return True

cratedb_toolkit/io/router.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ def save_table(
139139
"""
140140
source_url = source.dburi
141141
target_url_obj = URL(target.url)
142-
_ = transformation # reserved by contract
142+
143+
# Note: The `transformation` parameter is not respected yet, but required by contract.
144+
if transformation is not None:
145+
raise OperationFailed("Export transformations are not supported yet")
143146

144147
if target_url_obj.scheme.startswith("deltalake") or target_url_obj.scheme.endswith("deltalake"):
145148
from cratedb_toolkit.io.deltalake import to_deltalake

examples/cdc/aws/kinesis_put.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
def main():
1010

1111
# Address of the Kinesis stream.
12+
# Note: Credentials and region are suitable for use with LocalStack ootb.
13+
# It is acceptable for local development examples, so please adjust when diverting to streams on AWS.
1214
kinesis_url = URL("kinesis://LSIAQAAAAAAVNCBMPNSG:dummy@localhost:4566/cdc-stream?region=eu-central-1")
1315

1416
# DynamoDB CDC data payload example.

tests/cluster/test_import.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@pytest.mark.skipif(
1010
os.getenv("FORCE", "no") != "yes",
1111
reason="Only works when invoked exclusively, using "
12-
"`FORCE=yes pytest --no-cov tests/io/test_import.py -k managed_csv_local`. "
12+
"`FORCE=yes pytest --no-cov tests/cluster/test_import.py -k test_csv_import_local`. "
1313
"Otherwise croaks per `AssertionError: ERROR: The following arguments are required: --url`. "
1414
"We don't know why.",
1515
)

0 commit comments

Comments
 (0)