-
Notifications
You must be signed in to change notification settings - Fork 400
Add setup instruction for DocumentDB support #4715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jgao54
wants to merge
2
commits into
main
Choose a base branch
from
docdb
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
70 changes: 70 additions & 0 deletions
70
docs/integrations/data-ingestion/clickpipes/mongodb/source/docdb.md
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| --- | ||
| sidebar_label: 'Amazon DocumentDB' | ||
| description: 'Step-by-step guide on how to set up Amazon DocumentDB as a source for ClickPipes' | ||
| slug: /integrations/clickpipes/mongodb/source/docdb | ||
jgao54 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| title: 'Amazon DocumentDB source setup guide' | ||
| doc_type: 'guide' | ||
| keywords: ['clickpipes', 'mongodb', 'documentdb', 'cdc', 'data ingestion', 'real-time sync'] | ||
| --- | ||
|
|
||
| import docdb_select_parameter_group from '@site/static/images/integrations/data-ingestion/clickpipes/mongodb/docdb-select-parameter-group.png' | ||
| import docdb_modify_parameter_group from '@site/static/images/integrations/data-ingestion/clickpipes/mongodb/docdb-modify-parameter-group.png' | ||
| import docdb_apply_parameter_group from '@site/static/images/integrations/data-ingestion/clickpipes/mongodb/docdb-apply-parameter-group.png' | ||
| import docdb_parameter_group_status from '@site/static/images/integrations/data-ingestion/clickpipes/mongodb/docdb-parameter-group-status.png' | ||
| import Image from '@theme/IdealImage'; | ||
|
|
||
| # Amazon DocumentDB source setup guide | ||
|
|
||
| ## Supported DocumentDB versions {#supported-documentdb-versions} | ||
|
|
||
| ClickPipes supports DocumentDB version 5.0. | ||
|
|
||
| ## Configure change stream log retention {#configure-change-stream-log-retention} | ||
|
|
||
| By default, Amazon DocumentDB has a 3-hour change stream log retention period, initial load may take much longer depending on existing data volume in your DocumentDB. We recommend setting the change stream log retention to 72 hours or longer to ensure that it is not truncated before the initial snapshot is completed. | ||
jgao54 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### Update change stream log retention via AWS Console {#update-change-stream-log-retention-via-aws-console} | ||
|
|
||
| 1. Click `Parameter groups` in the left panel, find the parameter group used by your DocumentDB cluster (if you are using the default parameter group, you will need to create a new parameter group first in order to modify it). | ||
| <Image img={docdb_select_parameter_group} alt="Select parameter group" size="lg" border/> | ||
|
|
||
| 2. Search for `change_stream_log_retention_duration`, select and edit it to `259200` (72 hours) | ||
| <Image img={docdb_modify_parameter_group} alt="Modify parameter group" size="lg" border/> | ||
|
|
||
| 3. Click `Apply Changes` to apply the modified parameter group to your DocumentDB cluster immediately. You should see the status of the parameter group transition to `applying`, and then to `in-sync` when the change is applied. | ||
| <Image img={docdb_apply_parameter_group} alt="Apply parameter group" size="lg" border/> | ||
|
|
||
| <Image img={docdb_parameter_group_status} alt="Parameter group status" size="lg" border/> | ||
|
|
||
| ### Update change stream log retention via AWS CLI {#update-change-stream-log-retention-via-aws-cli} | ||
|
|
||
| To check the current change stream log retention period via AWS CLI: | ||
jgao54 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ```shell | ||
| aws docdb describe-db-cluster-parameters --db-cluster-parameter-group-name <PARAMETER_GROUP_NAME> --query "Parameters[?ParameterName=='change_stream_log_retention_duration'].{Name:ParameterName,Value:ParameterValue}" | ||
| ``` | ||
|
|
||
| To set the change stream log retention period to 72 hours via AWS CLI: | ||
| ```shell | ||
| aws docdb modify-db-cluster-parameter-group --db-cluster-parameter-group-name <PARAMETER_GROUP_NAME> --parameters "ParameterName=change_stream_log_retention_duration,ParameterValue=259200,ApplyMethod=immediate" | ||
| ``` | ||
|
|
||
| ## Configure a database user {#configure-database-user} | ||
|
|
||
| Connect to your DocumentDB cluster as an admin user and execute the following command to create a database user for MongoDB CDC ClickPipes: | ||
|
|
||
| ```javascript | ||
| db.getSiblingDB("admin").createUser({ | ||
| user: "clickpipes_user", | ||
| pwd: "some_secure_password", | ||
| roles: ["readAnyDatabase", "clusterMonitor"], | ||
| }) | ||
| ``` | ||
|
|
||
| :::note | ||
| Make sure to replace `clickpipes_user` and `some_secure_password` with your desired username and password. | ||
| ::: | ||
|
|
||
| ## What's next? {#whats-next} | ||
|
|
||
| You can now [create your ClickPipe](../index.md) and start ingesting data from your DocumentDB instance into ClickHouse Cloud. | ||
| Make sure to note down the connection details you used while setting up your DocumentDB cluster as you will need them during the ClickPipe creation process. | ||
This file contains hidden or 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 hidden or 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
Binary file added
BIN
+377 KB
.../integrations/data-ingestion/clickpipes/mongodb/docdb-apply-parameter-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+308 KB
...integrations/data-ingestion/clickpipes/mongodb/docdb-modify-parameter-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+166 KB
...integrations/data-ingestion/clickpipes/mongodb/docdb-parameter-group-status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+214 KB
...integrations/data-ingestion/clickpipes/mongodb/docdb-select-parameter-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this screenshot be updated for continuity (don't see the SSH toggle there)?