Skip to main content

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

FieldDescriptionExample ValueData Type
hostsList 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/passwordCredentials for MongoDB authentication."test"/"test"STRING
authdbAuthentication database (often admin)."admin"STRING
replica-setName of the replica set, if applicable."rs0"STRING
read-preferenceWhich node to read from (e.g., secondaryPreferred)."secondaryPreferred"STRING
srvIf using DNS SRV connection strings, set to true.true, falseBOOL
server-ramMemory management hint for the OLake container.16UINT
databaseThe MongoDB database name to replicate."database_name"STRING
max_threadsMaximum parallel threads for chunk-based snapshotting.50INT
default_modeDefault sync mode ("cdc" or "full_refresh")."cdc", "full_refresh", "incremental" (WIP)
backoff_retry_countRetries 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 -1INT

Refer here for more about sync modes.


Need Assistance?

If you have any questions or uncertainties about setting up OLake, contributing to the project, or troubleshooting any issues, we’re here to help. You can:

  • Email Support: Reach out to our team at hello@olake.io for prompt assistance.
  • Join our Slack Community: where we discuss future roadmaps, discuss bugs, help folks to debug issues they are facing and more.
  • Schedule a Call: If you prefer a one-on-one conversation, schedule a call with our CTO and team.

Your success with OLake is our priority. Don’t hesitate to contact us if you need any help or further clarification!