Couchbase
Couchbase is a distributed NoSQL cloud database that delivers unmatched performance, scalability, and flexibility for building modern applications.
ingestr supports Couchbase as a source.
URI format
Standard format (without SSL)
couchbase://username:password@hostWith SSL/TLS enabled
couchbase://username:password@host?ssl=trueIncluding bucket in URI
couchbase://username:password@host/bucket
couchbase://username:password@host/bucket?ssl=trueURI parameters:
username: the username to connect to the Couchbase clusterpassword: the password for the userhost: the host address of the Couchbase serverbucket: optional bucket name in the URI pathssl: SSL/TLS connection parameterssl=true: Required for Couchbase Capella (cloud) deploymentsssl=falseor omitted: Use for Couchbase Server (self-hosted/on-premises) deployments
NOTE
SSL Parameter Usage:
- Use
ssl=truewhen connecting to Couchbase Capella (cloud) - Use
ssl=falseor omit the parameter when connecting to Couchbase Server (self-hosted/on-premises)
The URI structure can be used for connecting to both local/self-hosted Couchbase instances and Couchbase Capella (cloud).
Source table format
The --source-table option for Couchbase supports two formats depending on whether the bucket is specified in the URI:
When bucket is NOT in URI
bucket.scope.collectionWhen bucket IS in URI path
scope.collectionFor default scope and collection, you can use:
bucket._default._defaultUsing Couchbase as a source
Local/self-hosted Couchbase
Basic connection without SSL
ingestr ingest \
--source-uri "couchbase://admin:password123@localhost" \
--source-table "mybucket.myscope.mycollection" \
--dest-uri "duckdb:///output.db" \
--dest-table "main.couchbase_data"For Couchbase Capella (Cloud)
ingestr ingest \
--source-uri "couchbase://admin:password123@localhost?ssl=true" \
--source-table "mybucket._default._default" \
--dest-uri "duckdb:///output.db" \
--dest-table "main.couchbase_data"With bucket in URI
ingestr ingest \
--source-uri "couchbase://admin:password123@localhost/mybucket" \
--source-table "myscope.mycollection" \
--dest-uri "duckdb:///output.db" \
--dest-table "main.couchbase_data"Couchbase Capella (Cloud)
IMPORTANT
Couchbase Capella (cloud) requires SSL connections. You must use ?ssl=true in your connection URI and prefix the host with cb.
TIP
You can obtain the connection string for Capella from the SDK connection details in your Couchbase Capella dashboard.
Use the couchbase:// scheme with ssl=true parameter. Note the cb. prefix in the hostname:
ingestr ingest \
--source-uri "couchbase://username:[email protected]?ssl=true" \
--source-table "travel-sample.inventory.airport" \
--dest-uri "duckdb:///airports.db" \
--dest-table "main.airports"With bucket in URI for Couchbase Capella
ingestr ingest \
--source-uri "couchbase://username:[email protected]/travel-sample?ssl=true" \
--source-table "inventory.airport" \
--dest-uri "duckdb:///airports.db" \
--dest-table "main.airports"With URL-encoded password
IMPORTANT
When using ingestr CLI, passwords containing special characters (@, :, /, #, ?, etc.) must be URL-encoded in the connection URI.
If your password contains special characters, you need to URL-encode them:
ingestr ingest \
--source-uri "couchbase://admin:MyPass%40123%21@localhost" \
--source-table "mybucket.myscope.mycollection" \
--dest-uri "duckdb:///output.db" \
--dest-table "main.couchbase_data"This example encodes the password MyPass@123! as MyPass%40123%21.