Targets
A target is where NoSQLSync writes. It creates the tables it needs, so the target user needs CREATE and INSERT on the destination schema.
Supported targets
| Target | Credentials | Child tables | Auto-add columns on drift |
|---|---|---|---|
| PostgreSQL (incl. Supabase, Neon, RDS / Aurora, Cloud SQL) | Connection string | Yes | Yes |
| MySQL 8.0+ (incl. PlanetScale, RDS) | Connection string | Yes | Yes |
| MariaDB | Connection string | Yes | Yes |
| SQL Server / Azure SQL | JSON | — | — |
| Amazon Redshift | Connection string | — | — |
| Google BigQuery | JSON | — | — |
| Snowflake | JSON | — | — |
| ClickHouse | JSON | — | — |
| MongoDB / DocumentDB / Cosmos DB (Mongo API) | Connection string | n/a | n/a |
Child tables (for MongoDB sources) and automatic column adds need ALTER-capable writers, which today means the PostgreSQL and MySQL families. On other targets nested arrays are stored as JSON.
PostgreSQL, MySQL and MariaDB
postgres://writer:[email protected]:5432/analytics
mysql://writer:[email protected]:3306/analyticsYou can also pass host, port, database, username and password as JSON. For PlanetScale, use an admin (read/write) password for the branch.
SQL Server
{
"server": "sql.example.com",
"port": 1433,
"database": "analytics",
"user": "writer",
"password": "…",
"encrypt": true,
"trustServerCertificate": false
}Redshift
redshift://writer:[email protected]:5439/analyticsBigQuery
{
"projectId": "my-project",
"datasetId": "analytics",
"credentials": { "type": "service_account", … }
}The service account needs BigQuery Data Editor on the dataset. Live sync applies changes with MERGE queries, which also need BigQuery Job User on the project.
Snowflake
{
"account": "xy12345.us-east-1",
"username": "NOSQLSYNC",
"password": "…",
"warehouse": "LOAD_WH",
"database": "ANALYTICS",
"schema": "PUBLIC"
}Snowflake connections use password authentication. Key-pair authentication isn't supported yet.
ClickHouse
{
"host": "https://abc123.clickhouse.cloud:8443",
"database": "default",
"username": "default",
"password": "…"
}Use the HTTP(S) endpoint, not the native TCP port.
MongoDB as a target
MongoDB-compatible targets are useful for cluster-to-cluster moves (for example self-hosted → Atlas, or into DocumentDB). Documents are copied as BSON without going through a SQL schema. Put the database name in the connection string path; otherwise the source's database name is used.
How data is written
NoSQLSync creates the target table from your schema mapping if it doesn't exist, then writes rows keyed on the primary key. On PostgreSQL, MySQL, MariaDB, SQL Server, Redshift and Snowflake writes are upserts, so re-running a migration updates rows instead of duplicating them; ClickHouse tables use ReplacingMergeTree to the same effect. On PostgreSQL and MySQL-family targets it also creates indexes on ID-like fields (ObjectIds and fields named *Id or *_id), up to ten per table. Foreign keys are only created from child tables to their parent.