Last updated:|... min read
config.json
Source Configuration
Below is a sample config.json
for connecting to a MongoDB replica set. Customize each field to match your environment.
olake_folder/config.json
{
"hosts": [
"host1:27017",
"host2:27017",
"host3:27017"
],
"username": "test",
"password": "test",
"authdb": "admin",
"replica-set": "rs0",
"read-preference": "secondaryPreferred",
"srv": true,
"server-ram": 16,
"database": "database",
"max_threads": 50,
"default_mode": "cdc",
"backoff_retry_count": 2
}
Description of above parameters
Field | Description | Example Value | Data Type |
---|---|---|---|
hosts | List of MongoDB hosts. Use DNS SRV if srv = true . | x.xxx.xxx.120:27017 , x.xxx.xxx.120:27017, x.xxx.xxx.133:27017 (can be multiple) | []STRING |
username/password | Credentials for MongoDB authentication. | "test"/"test" | STRING |
authdb | Authentication database (often admin ). | "admin" | STRING |
replica-set | Name of the replica set, if applicable. | "rs0" | STRING |
read-preference | Which node to read from (e.g., secondaryPreferred ). | "secondaryPreferred" | STRING |
srv | If using DNS SRV connection strings, set to true . | true , false | BOOL |
server-ram | Memory management hint for the OLake container. | 16 | UINT |
database | The MongoDB database name to replicate. | "database_name" | STRING |
max_threads | Maximum parallel threads for chunk-based snapshotting. | 50 | INT |
default_mode | Default sync mode ("cdc" or "full_refresh" ). | "cdc" , "full_refresh" , "incremental" (WIP) | |
backoff_retry_count | Retries attempt to establish sync again if it fails, increases exponentially ( in minutes - 1, 2,4,8,16... depending upon the backoff_retry_count value) | defaults to 3, takes default value if set to -1 | INT |
Refer here for more about sync modes.