Skip to content

Database connections

DataMaker can push generated rows directly into a database, no INSERT script in the middle. We support six engines today.

EngineDriver / protocolNotes
PostgreSQLlibpq, TLS12 to 17. RDS / Aurora / Supabase / Neon work.
MySQLmysql-connector, TLS8.x. PlanetScale, Aurora MySQL work.
MongoDBMongoDB wire protocol, TLS4.4+. Atlas works (use the SRV URL).
MSSQLTDS, TLS2017+. Azure SQL works.
OracleOCI thin / thick19c+. Wallet auth supported.
IBM DB2DRDALUW 11.5+. z/OS via DRDA.

Create a database connection

Project → Connections → New → Database, then pick the engine. Required fields:

  • Name: what you’ll see in the UI and in API responses.
  • Host and port.
  • Database name (or schema for some engines).
  • Username + password, or a managed secret reference.

Optional:

  • TLS: force TLS, accept self-signed, attach a CA.
  • SSH tunnel: for engines that aren’t public-internet-reachable.
  • Schema (Postgres / Oracle / DB2): default schema for unqualified table names.

Click Verify. We open a TCP connection, authenticate, and run SELECT 1 (or the equivalent for MongoDB). Verified connections show a green dot in the sidebar.

Push a template

  1. Open a template, click Generate → Push to….

  2. Pick the connection. We discover the available tables / collections.

  3. Pick a target table. The mapping screen suggests column matches by name; override any that are wrong.

  4. Pick a mode:

    • insert: straight INSERT (or document insert).
    • upsert: INSERT ... ON CONFLICT (key) DO UPDATE (Postgres / MySQL), MERGE (MSSQL / Oracle), replace (MongoDB).
    • truncate-then-insert: replace all rows. Use with care.
  5. Generate. Per-row success/failure is reported in the run log.

Push from a scenario

The same target is reachable from a Python scenario via the SDK:

from datamaker import DataMaker
dm = DataMaker()
customers = dm.generate_from_template_id("tmpl_customer", quantity=500)
# Push into a configured database connection.
dm.export_to_database(export_data) # target connection id + payload

export_data carries the connection id and the rows. See Scenarios → Scenario API and API & SDKs → Python SDK for the shape. For upsert/replace semantics, configure the mode in the push dialog (above).

Performance & batching

DataMaker batches inserts (default: 500 rows per batch). For very large pushes (>100k rows), prefer:

  • Postgres: COPY mode. Roughly 5× faster than batched INSERT.
  • MongoDB: bulk_write (default).
  • MSSQL: BULK INSERT with a temporary table swap.

Set the mode in the push dialog.

Rolling back a push

DataMaker tracks every push as a run, with the IDs of inserted rows. From the run detail page you can rollback, and DataMaker deletes the rows it inserted (matching by the key you pushed under). Rollback is best-effort; if downstream triggers / cascades have modified the rows, the delete may need a manual override.

Auth providers

For managed cloud databases, prefer IAM-style auth where possible:

  • AWS RDS / Aurora: IAM authentication tokens.
  • Azure SQL / Postgres: Microsoft Entra ID (formerly AAD).
  • Google Cloud SQL: IAM database authentication.

In the connection form, pick Auth → Cloud IAM and follow the engine-specific setup guide.

See also