Skip to content

Commit 4d324d0

Browse files
committed
reviews
1 parent f59c13c commit 4d324d0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/integrations/data-ingestion/clickpipes/mongodb/faq.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ title: 'ClickPipes for MongoDB FAQ'
1010

1111
### Can I query for individual fields in the JSON datatype? {#can-i-query-for-individual-fields-in-the-json-datatype}
1212

13-
You can use **dot notation** for direct field access:
13+
For direct field access, such as {"user_id": 123}, you can use **dot notation**:
1414
```sql
15-
SELECT doc.customer.name as name FROM your_table;
15+
SELECT doc.user_id as user_id FROM your_table;
1616
```
17-
For nested object fields, use the `^` operator:
17+
For direct field access of nested object fields, such as {"address": { "city": "San Francisco", "state": "CA" }}, use the `^` operator:
1818
```sql
1919
SELECT doc.^address.city AS city FROM your_table;
2020
```
@@ -29,14 +29,14 @@ To learn more about working with JSON, see our [Working with JSON guide](./quick
2929
MongoDB documents are replicated as JSON type in ClickHouse by default, preserving the nested structure. You have several options to flatten this data. If you want to flatten the data to columns, you can use normal views, materialized views, or query-time access.
3030

3131
1. **Normal Views**: Use normal views to encapsulate flattening logic.
32-
2. **Materialized Views**: For smaller datasets, you can use refreshable materialized with FINAL to periodically flatten and deduplicate data. For larger datasets, we recommend using incremental materialized views without FINAL to flatten the data in real-time, and then deduplicate data at query time.
32+
2. **Materialized Views**: For smaller datasets, you can use refreshable materialized with the [`FINAL` modifier](/sql-reference/statements/select/from#final-modifier) to periodically flatten and deduplicate data. For larger datasets, we recommend using incremental materialized views without `FINAL` to flatten the data in real-time, and then deduplicate data at query time.
3333
3. **Query-time Access**: Instead of flattening, use dot notation to access nested fields directly in queries.
3434

3535
For detailed examples, see our [Working with JSON guide](./quickstart).
3636

3737
### Can I connect MongoDB databases that don't have a public IP or are in private networks? {#can-i-connect-mongodb-databases-that-dont-have-a-public-ip-or-are-in-private-networks}
3838

39-
We support AWS PrivateLink for connecting to MongoDB databases that don't have a public IP or are in private networks.
39+
We support AWS PrivateLink for connecting to MongoDB databases that don't have a public IP or are in private networks. Azure Private Link and GCP Private Service Connect are currently not supported.
4040

4141
### What happens if I delete a database/table from my MongoDB database? {#what-happens-if-i-delete-a-database-table-from-my-mongodb-database}
4242

docs/integrations/data-ingestion/clickpipes/mongodb/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The replicated tables use this standard schema:
7272

7373
ClickPipes maps MongoDB collections into ClickHouse using the `ReplacingMergeTree` table engine family. With this engine, updates are modeled as inserts with a newer version (`_peerdb_version`) of the document for a given primary key (`_id`), enabling efficient handling of updates, replaces, and deletes as versioned inserts.
7474

75-
`ReplacingMergeTree` clears out duplicates asynchronously in the background. To guarantee the absence of duplicates for the same row, use the [`FINAL` modifier](https://clickhouse.com/docs/sql-reference/statements/select/from#final-modifier). For example:
75+
`ReplacingMergeTree` clears out duplicates asynchronously in the background. To guarantee the absence of duplicates for the same row, use the [`FINAL` modifier](/sql-reference/statements/select/from#final-modifier). For example:
7676

7777
```sql
7878
SELECT * FROM t1 FINAL;
@@ -266,7 +266,7 @@ LIMIT 10;
266266

267267
### Refreshable materialized view {#refreshable-materialized-view}
268268

269-
If your table size is small, you can create [Refreshable Materialized Views](https://clickhouse.com/docs/materialized-view/refreshable-materialized-view), which enable you to schedule query execution for deduplicating rows and storing the results in a flattened destination table. With each scheduled refresh, the destination table is replaced with the latest query results.
269+
You can create [Refreshable Materialized Views](https://clickhouse.com/docs/materialized-view/refreshable-materialized-view), which enable you to schedule query execution for deduplicating rows and storing the results in a flattened destination table. With each scheduled refresh, the destination table is replaced with the latest query results.
270270

271271
The key advantage of this method is that the query using the `FINAL` keyword runs only once during the refresh, eliminating the need for subsequent queries on the destination table to use `FINAL`.
272272

@@ -316,7 +316,7 @@ LIMIT 10;
316316

317317
### Incremental materialized view {#incremental-materialized-view}
318318

319-
If your table size is very large or if you want to flatten the data in real-time, you can create [Incremental Materialized Views](https://clickhouse.com/docs/materialized-view/incremental-materialized-view). If your table has frequent updates, it's not recommended to use FINAL modifier in your materialized view as every update will trigger a merge. Instead, you can deduplicate the data at query time by building a normal view on top of the materialized view.
319+
If you want to access flattened columns in real-time, you can create [Incremental Materialized Views](https://clickhouse.com/docs/materialized-view/incremental-materialized-view). If your table has frequent updates, it's not recommended to use the `FINAL` modifier in your materialized view as every update will trigger a merge. Instead, you can deduplicate the data at query time by building a normal view on top of the materialized view.
320320

321321
```sql
322322
CREATE TABLE flattened_t1 (

0 commit comments

Comments
 (0)