Skip to content

Commit 941d37f

Browse files
committed
mongo: add pause_and_resume + resync sections
1 parent 41a4ab7 commit 941d37f

File tree

5 files changed

+154
-0
lines changed

5 files changed

+154
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: 'Adding specific tables to a ClickPipe'
3+
description: 'Describes the steps need to add specific tables to a ClickPipe.'
4+
sidebar_label: 'Add Table'
5+
slug: /integrations/clickpipes/mongodb/add_table
6+
show_title: false
7+
---
8+
9+
import Image from '@theme/IdealImage';
10+
import add_table from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/add_table.png'
11+
12+
# Adding specific tables to a ClickPipe
13+
14+
There are scenarios where it would be useful to add specific tables to a pipe. This becomes a common necessity as your transactional or analytical workload scales.
15+
16+
## Steps to add specific tables to a ClickPipe {#add-tables-steps}
17+
18+
This can be done by the following steps:
19+
1. [Pause](./pause_and_resume.md) the pipe.
20+
2. Click on Edit Table settings.
21+
3. Locate your table - this can be done by searching it in the search bar.
22+
4. Select the table by clicking on the checkbox.
23+
<br/>
24+
<Image img={add_table} border size="md"/>
25+
26+
5. Click update.
27+
6. Upon successful update, the pipe will have statuses `Setup`, `Snapshot` and `Running` in that order. The table's initial load can be tracked in the **Tables** tab.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: 'Pausing and Resuming a MongoDB ClickPipe'
3+
description: 'Pausing and Resuming a MongoDB ClickPipe'
4+
sidebar_label: 'Pause Table'
5+
slug: /integrations/clickpipes/mongodb/pause_and_resume
6+
---
7+
8+
import Image from '@theme/IdealImage';
9+
import pause_button from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/pause_button.png'
10+
import pause_dialog from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/pause_dialog.png'
11+
import pause_status from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/pause_status.png'
12+
import resume_button from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/resume_button.png'
13+
import resume_dialog from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/resume_dialog.png'
14+
15+
There are scenarios where it would be useful to pause a MongoDB ClickPipe. For example, you may want to run some analytics on existing data in a static state. Or, you might be performing upgrades on MongoDB. Here is how you can pause and resume a MongoDB ClickPipe.
16+
17+
## Steps to pause a MongoDB ClickPipe {#pause-clickpipe-steps}
18+
19+
1. In the Data Sources tab, click on the MongoDB ClickPipe you wish to pause.
20+
2. Head over to the **Settings** tab.
21+
3. Click on the **Pause** button.
22+
23+
<Image img={pause_button} border size="md"/>
24+
25+
4. A dialog box should appear for confirmation. Click on Pause again.
26+
27+
<Image img={pause_dialog} border size="md"/>
28+
29+
4. Head over to the **Metrics** tab.
30+
5. In around 5 seconds (and also on page refresh), the status of the pipe should be **Paused**.
31+
32+
<Image img={pause_status} border size="md"/>
33+
34+
## Steps to resume a MongoDB ClickPipe {#resume-clickpipe-steps}
35+
1. In the Data Sources tab, click on the MongoDB ClickPipe you wish to resume. The status of the mirror should be **Paused** initially.
36+
2. Head over to the **Settings** tab.
37+
3. Click on the **Resume** button.
38+
39+
<Image img={resume_button} border size="md"/>
40+
41+
4. A dialog box should appear for confirmation. Click on Resume again.
42+
43+
<Image img={resume_dialog} border size="md"/>
44+
45+
5. Head over to the **Metrics** tab.
46+
6. In around 5 seconds (and also on page refresh), the status of the pipe should be **Running**.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: 'Removing specific tables from a ClickPipe'
3+
description: 'Removing specific tables from a ClickPipe'
4+
sidebar_label: 'Remove Table'
5+
slug: /integrations/clickpipes/mongodb/removing_tables
6+
---
7+
8+
import Image from '@theme/IdealImage';
9+
import remove_table from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/remove_table.png'
10+
11+
In some cases, it makes sense to exclude specific tables from a MongoDB ClickPipe - for example, if a table isn't needed for your analytics workload, skipping it can reduce storage and replication costs in ClickHouse.
12+
13+
## Steps to remove specific tables {#remove-tables-steps}
14+
15+
The first step is to remove the table from the pipe. This can be done by the following steps:
16+
17+
1. [Pause](./pause_and_resume.md) the pipe.
18+
2. Click on Edit Table Settings.
19+
3. Locate your table - this can be done by searching it in the search bar.
20+
4. Deselect the table by clicking on the selected checkbox.
21+
<br/>
22+
23+
<Image img={remove_table} border size="md"/>
24+
25+
5. Click update.
26+
6. Upon successful update, in the **Metrics** tab the status will be **Running**. This table will no longer be replicated by this ClickPipe.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: 'Resyncing a Database ClickPipe'
3+
description: 'Doc for resyncing a database ClickPipe'
4+
slug: /integrations/clickpipes/mongodb/resync
5+
sidebar_label: 'Resync ClickPipe'
6+
---
7+
8+
import resync_button from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/resync_button.png'
9+
import Image from '@theme/IdealImage';
10+
11+
### What does Resync do? {#what-mongodb-resync-do}
12+
13+
Resync involves the following operations in order:
14+
15+
1. The existing ClickPipe is dropped, and a new "resync" ClickPipe is kicked off. Thus, changes to source table structures will be picked up when you resync.
16+
2. The resync ClickPipe creates (or replaces) a new set of destination tables which have the same names as the original tables except with a `_resync` suffix.
17+
3. Initial load is performed on the `_resync` tables.
18+
4. The `_resync` tables are then swapped with the original tables. Soft deleted rows are transferred from the original tables to the `_resync` tables before the swap.
19+
20+
All the settings of the original ClickPipe are retained in the resync ClickPipe. The statistics of the original ClickPipe are cleared in the UI.
21+
22+
### Use cases for resyncing a ClickPipe {#use-cases-mongodb-resync}
23+
24+
Here are a few scenarios:
25+
26+
1. You may need to perform major schema changes on the source tables which would break the existing ClickPipe and you would need to restart. You can just click Resync after performing the changes.
27+
2. Specifically for Clickhouse, maybe you needed to change the ORDER BY keys on the target tables. You can Resync to re-populate data into the new table with the right sorting key.
28+
29+
:::note
30+
You can resync multiple times, however please account for the load on the source database when you resync,
31+
since initial load with parallel threads is involved each time.
32+
:::
33+
34+
### Resync ClickPipe Guide {#guide-mongodb-resync}
35+
36+
1. In the Data Sources tab, click on the MongoDB ClickPipe you wish to resync.
37+
2. Head over to the **Settings** tab.
38+
3. Click on the **Resync** button.
39+
40+
<Image img={resync_button} border size="md"/>
41+
42+
4. A dialog box should appear for confirmation. Click on Resync again.
43+
5. Head over to the **Metrics** tab.
44+
6. In around 5 seconds (and also on page refresh), the status of the pipe should be **Setup** or **Snapshot**.
45+
7. The initial load of the resync can be monitored in the **Tables** tab - in the **Initial Load Stats** section.

sidebars.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,16 @@ const sidebars = {
809809
items: [
810810
"integrations/data-ingestion/clickpipes/mongodb/index",
811811
"integrations/data-ingestion/clickpipes/mongodb/datatypes",
812+
{
813+
type: "category",
814+
label: "Operations",
815+
items: [
816+
"integrations/data-ingestion/clickpipes/mongodb/add_table",
817+
"integrations/data-ingestion/clickpipes/mongodb/remove_table",
818+
"integrations/data-ingestion/clickpipes/mongodb/pause_and_resume",
819+
"integrations/data-ingestion/clickpipes/mongodb/resync",
820+
],
821+
},
812822
{
813823
type: "category",
814824
label: "Source",

0 commit comments

Comments
 (0)