/ Connections / Targets
Docs/Connections/Targets

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

TargetCredentialsChild tablesAuto-add columns on drift
PostgreSQL (incl. Supabase, Neon, RDS / Aurora, Cloud SQL)Connection stringYesYes
MySQL 8.0+ (incl. PlanetScale, RDS)Connection stringYesYes
MariaDBConnection stringYesYes
SQL Server / Azure SQLJSON——
Amazon RedshiftConnection string——
Google BigQueryJSON——
SnowflakeJSON——
ClickHouseJSON——
MongoDB / DocumentDB / Cosmos DB (Mongo API)Connection stringn/an/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/analytics

You can also pass host, port, database, username and password as JSON. For PlanetScale, use an admin (read/write) password for the branch.

SQL Server

Credentials JSON
{
  "server": "sql.example.com",
  "port": 1433,
  "database": "analytics",
  "user": "writer",
  "password": "…",
  "encrypt": true,
  "trustServerCertificate": false
}

Redshift

redshift://writer:[email protected]:5439/analytics

BigQuery

Credentials JSON
{
  "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

Credentials JSON
{
  "account": "xy12345.us-east-1",
  "username": "NOSQLSYNC",
  "password": "…",
  "warehouse": "LOAD_WH",
  "database": "ANALYTICS",
  "schema": "PUBLIC"
}
i

Snowflake connections use password authentication. Key-pair authentication isn't supported yet.

ClickHouse

Credentials JSON
{
  "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.