Skip to content

Added support for DynamoDB data jobs#597

Open
juanpardo wants to merge 7 commits intomasterfrom
jp/dynamodb-import-support
Open

Added support for DynamoDB data jobs#597
juanpardo wants to merge 7 commits intomasterfrom
jp/dynamodb-import-support

Conversation

@juanpardo
Copy link
Contributor

Summary of the changes / Why this is an improvement

Added support for DynamoDB data jobs

Checklist

@juanpardo juanpardo requested review from plaharanne and tomach March 9, 2026 10:03
@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f2bb8a64-de0f-4919-84d2-3e3b08c59135

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jp/dynamodb-import-support
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can validate your CodeRabbit configuration file in your editor.

If your editor has YAML language server, you can enable auto-completion and validation by adding # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json at the top of your CodeRabbit configuration file.

@amotl
Copy link
Member

amotl commented Mar 9, 2026

I would also like to add data loading support for DynamoDB to the SDK. This patch makes it easy to learn about relevant ingredients. Thank you! I am looking forward to the upcoming release.

}
if args.endpoint:
extra_body["dynamodb"]["endpoint"] = args.endpoint
if args.kinesis_stream_name:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be a validation that kinesis_stream_name is required if ingestion_type is IMPORT_AND_CDC or CDC_ONLY?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I just added a check

@juanpardo juanpardo force-pushed the jp/dynamodb-import-support branch from f501061 to 10571bb Compare March 10, 2026 09:51
@juanpardo juanpardo requested a review from tomach March 10, 2026 10:41
extra_body["ingestion_type"] = args.ingestion_type
if "CDC" in extra_body.get("ingestion_type", ""):
if not args.kinesis_stream_name:
raise Exception(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raising a plain Exception here will print a full stack trace I think? maybe raise a ValueError so the error looks a bit better? sth like

raise ValueError(
    "--kinesis-stream-name must be set when using CDC ingestion types."
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raising any exception leads to a stack trace, so I had to end up using a controlled error exit

Comment on lines +175 to +184
``clusters import-jobs create from-dynamodb``
=============================================

.. argparse::
:module: croud.__main__
:func: get_parser
:prog: croud
:path: clusters import-jobs create from-dynamodb

.. code-block:: console
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to change the titles level.
I've also added a note about the waiting to finish like the others, but actually I don't know how it behave. I let you fix the text I suggested if it is not accurate.

Suggested change
``clusters import-jobs create from-dynamodb``
=============================================
.. argparse::
:module: croud.__main__
:func: get_parser
:prog: croud
:path: clusters import-jobs create from-dynamodb
.. code-block:: console
``clusters import-jobs create from-dynamodb``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
For IMPORT_ONLY, this command will wait for the operation to finish or fail.
.. argparse::
:module: croud.__main__
:func: get_parser
:prog: croud
:path: clusters import-jobs create from-dynamodb
Example
^^^^^^^
.. code-block:: console

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this, thanks!

@juanpardo juanpardo requested review from plaharanne and tomach March 13, 2026 10:53

For IMPORT_ONLY, this command will wait for the operation to finish or fail.
When --ingestion-type is set to CDC_ONLY or IMPORT_AND_CDC, the command will not finish
and even when the last CDC event is processed, it will remain waiting for new CDC events to come.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should change a bit the command behavior when it's CDC (and for MongoDB as well) to make it just start the importJob and not wait at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you wait for the import part to finish in an IMPORT_AND_CDC job though? Happy to discuss what the best behaviour would be for MongoDB and DynamoDB, but perhaps we can do it in a separate issue :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, it can be done in a separate issue. Will you create it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants