Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/cluster/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Currently the following data formats are supported:
- JSON (JSON-Lines, JSON Arrays, and JSON Documents)
- Parquet
- MongoDB collection
- DynamoDB

:::{note}
If you don't have a dataset prepared, we also provide sample data to let
Expand Down
120 changes: 120 additions & 0 deletions docs/cluster/integrations/dynamo-cdc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
(integrations-dynamo-cdc)=
# DynamoDB CDC

CrateDB Cloud enables continuous data ingestion from DynamoDB using Change Data
Capture (CDC), providing real-time synchronization of your data.

## Key Concepts

The DynamoDB CDC integration in CrateDB Cloud allows you to keep your data
synchronized between a DynamoDB table and your CrateDB Cloud cluster
in real-time.

### How It Works

The integration functions in two main stages:

1. **Initial Sync:**
The integration performs a complete scan of your DynamoDB table.

2. **Continuous Sync:**
The integration uses a Kinesis Data Stream to read changes from your DynamoDB table.
Please note the Kinesis Data Stream needs to be set up before you can use this stage.
You can refer to the AWS documentation page
[Getting started with Kinesis Data Streams for Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/kds_gettingstarted.html)
to complete your setup.

### Data Consistency and Mode

For continuous sync, CrateDB Cloud uses a Kinesis Data Stream. This provides full items
that are then written as either full inserts or full upserts to ensure data consistency.
Directly reading CDC events from DynamoDB is limited to 1 day of history. By using
a Kinesis Data Stream you can choose the retention policy that best suits your needs.

---

## Create a new Integration
A DynamoDB integration allows you to sync a single table from DynamoDB. You can reuse an existing Cloud secret across multiple integrations
to continuously sync data from multiple DynamoDB tables.

Supported authentication methods:
- AWS Access Key and Access secret pair.

### Optional setup for CDC
This setup is only required if you want to enable the Continuous Sync.
Please note that running a Kinesis data stream has additional costs that AWS will charge you directly.

#### Set up a Kinesis Data Stream for CDC in AWS
1. In the **AWS console**, go to **DynamoDB**.
2. Go to **Tables**.
3. Click on the table name you want to use.
4. Click on the **Exports and streams** tab.
5. On the **Amazon Kinesis data stream details** section, click the button **Turn On**.
6. Click the **Create new** button right to **Destination Kinesis data stream**.
7. Fill in the **Data stream name**. Please note you will need this name later when setting up the integration in CrateDB Cloud.
8. Choose the capacity that best suits your needs.
8. Choose a **Maximum record size** that can hold more than two times your biggest DynamoDB table items.
9. Click the button **Create data stream**.
10. The Kinesis data stream has now been created. If you want to change its retention policy (recommended), click on the tab **Configuration**, then click on **Edit** under the **Data retention** section.
11. Select the data retention that suits you. At least 7 days is recommended. Please note the data retention period will have an impact on the cost of the Kinesis Data Stream.
12. Back to the **Stream to an Amazon Kinesis data stream** DynamoDB page, select the newly created Kinesis Stream from the list.
13. Click on **Turn on stream**.


### Set Up Integration in CrateDB Cloud

Follow these steps in the CrateDB Cloud Console to set up the DynamoDB CDC integration:

:::::{stepper}
#### Create an Integration
1. Navigate to the **Import** section in the CrateDB Cloud Console.
2. Click on the **DynamoDB** button.

#### Configure Secret
1. Choose **Add Secret** or select an existing one.
2. Fill in the following details:
:::{tab} AWS Secret
- **Secret Name**: Provide a unique name for the secret.
- **Access key**: The AWS access key ID that will be used. Please note this access key requires access to your DynamoDB table and, if CDC is enabled, also to the Kinesis data stream.
- **Secret access key**: The AWS secret key.
:::

#### Configure Integration Settings
1. Enter a name for the integration.
2. Select the integration mode:
- **Full load only**: Imports the data once but doesn’t sync changes.
- **Full load and CDC**: Imports the data and syncs changes in real-time.
- **CDC only**: Syncs only new changes in real-time without importing existing data.

#### Select source
1. Enter the AWS region name the DynamoDB table is in.
2. Enter the DynamoDB table name.
3. If CDC is enabled, please also enter the Kinesis stream name.

#### Select Target Table
1. Specify the target table in your CrateDB Cloud cluster where the data will be synced.
2. DynamoDB items will be inserted into an object column called `document`.
3. Select the object type for the column:
- **`dynamic`**: Allows indexing and columnar storage for faster querying.
- **`ignored`**: Prevents type conflicts in CrateDB if your source data lacks a strict schema.

:::{note}
If your source data doesn't follow a strict schema, select `ignored` to avoid type conflicts.
However, selecting `dynamic` provides faster query performance by utilizing indexes and columnar storage.
:::


#### Create the Integration
Click **Start import** to finalize the setup. CrateDB Cloud will now sync
your DynamoDB data based on the selected settings.
:::::

### Column Name Restrictions

Column or property names containing square brackets `[]` are not supported and
are replaced with `_obkt_` and `_cbkt_` respectively. Likewise, column
names containing dots `.` are not supported and are replaced with `_dot_`.

:::{warning}
This behavior may change in future releases.
:::
30 changes: 28 additions & 2 deletions docs/cluster/integrations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ setup or maintenance of separate ETL pipelines.
:titlesonly:
:hidden:

MongoDB CDC (Preview) <mongo-cdc>
MongoDB CDC <mongo-cdc>
DynamoDB CDC <dynamo-cdc>

:::

---
Expand All @@ -40,11 +42,20 @@ in real time. You can create multiple integrations for the same data source to
support different tables or configurations.

Currently, CrateDB Cloud supports ingestion from the following data source:
- {ref}`MongoDB CDC (Preview) <integrations-mongo-cdc>`
- {ref}`MongoDB CDC <integrations-mongo-cdc>`
- {ref}`DynamoDB CDC <integrations-dynamo-cdc>`

More integrations are planned for future releases to expand the range of
supported data sources and use cases.

The integration automatically make field names compatible with CrateDB naming
restrictions.

When a new data field is discovered, the integration will infer its data type.
To cast data to specific types, simply create the column in CrateDB with the target type
and. The integration will always try to cast the data to the type defined in the
CrateDB destination table.

:::
### Connection
:::
Expand All @@ -54,3 +65,18 @@ specific data source. This allows secure access to the external system and is
reusable across multiple integrations. By setting up a connection once, you can
streamline the process of creating and managing integrations without having to
re-enter credentials for each one.

:::
### Integration types
:::

There are 3 different integration types:
- **Full load only**: Imports all your data and immediately ends after.
- **CDC only**: It indefinitely listens to CDC (Change Data Capture) events on the
source and applies them into your CrateDB table. Once it reaches the last CDC event
it waits for new events to come.
- **Full load and CDC**
It imports all the data like the type **full load only**, but once that phase finishes
it starts processing CDC events. If the source supports it, it will try to read CDC
events starting from right when the import phase started. This way any data alteration
during the import phase will be picked up and processed.
10 changes: 5 additions & 5 deletions docs/cluster/integrations/mongo-cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ Follow these steps in the CrateDB Cloud Console to set up the MongoDB CDC integr
:::::{stepper}
#### Create an Integration
1. Navigate to the **Import** section in the CrateDB Cloud Console.
2. Click **Create Integration** and select **MongoDB** as the source type.
2. Click on the **MongoDB** button.

#### Configure Connection
1. Choose **Create New Connection** or select an existing one.
1. Choose which connection type to create or select an existing one.
2. Fill in the following details:
:::{tab} SCRAM Authentication
- **Connection Name**: Provide a unique name for the connection.
Expand Down Expand Up @@ -216,9 +216,9 @@ want to sync with CrateDB Cloud.
#### Configure Integration Settings
1. Enter a name for the integration.
2. Select the integration mode:
- **Full Load Only**: Imports the data once but doesn’t sync changes.
- **Full Load and CDC**: Imports the data and syncs changes in real-time.
- **CDC Only**: Syncs only new changes in real-time without importing existing data.
- **Full load only**: Imports the data once but doesn’t sync changes.
- **Full load and CDC**: Imports the data and syncs changes in real-time.
- **CDC only**: Syncs only new changes in real-time without importing existing data.

#### Create the Integration
Click **Create Integration** to finalize the setup. CrateDB Cloud will now sync
Expand Down
Loading