Skip to main content

Database Integration

Supported Databases

  • PostgreSQL
  • MySQL
  • MongoDB
  • Snowflake
  • BigQuery

Adding a Connection

Via UI

  1. Go to Settings > Database Connections
  2. Click "Add Connection"
  3. Select database type
  4. Enter connection details
  5. Test connection
  6. Save

Via API

POST /api/database/connections
Authorization: Bearer <token>
{
"name": "Production PostgreSQL",
"type": "postgresql",
"uri": "postgresql://user:password@host:5432/db",
"use_for": ["source", "destination"]
}

Using in Pipelines

Source Node

{
"id": "db-source",
"type": "database",
"data": {
"connection_id": "uuid-of-connection",
"query": "SELECT * FROM orders WHERE date > '2024-01-01'"
}
}

Destination Node

{
"id": "db-dest",
"type": "database",
"data": {
"connection_id": "uuid-of-connection",
"table": "orders_staging",
"mode": "append"
}
}

Connection Modes

ModeDescription
appendAdd new rows to existing table
replaceDrop and recreate table
upsertInsert or update on conflict

Best Practices

  1. Use connection pooling for high-volume pipelines
  2. Store credentials securely - use Supabase secrets
  3. Test connections before saving
  4. Use read replicas for source queries
  5. Configure timeouts appropriate for query complexity