build_connect_data_source
Create a data connector to an EXTERNAL source the app owner controls (their own database, a REST API, or a warehouse). Returns a connector_id. Does NOT bind schemas yet. Flow: build_connect_data_source → build_discover_source (lists the tables/streams; needs this connector_id) → build_bind_data_source (bind streams to app schemas) → build_run_data_source (mode='sync' bindings only; live reads need no run). For a database you do NOT need to know the tables upfront: omit table_names and let discovery + bind pick them (the connector is a manual-trigger shell until bound, and a run before a sync bind is refused). Pass table_names only when you already know exactly which tables to sync. Credentials are sent to the platform and NEVER echoed back; prefer read-only DB creds / the Key Store for production. Requires a domain- or project-admin API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | No | api kind: {type: none|api_key|bearer|basic|oauth2, ...}. | |
| host | No | Server hostname (database kinds, Fabric, ClickHouse, Snowflake, Databricks). BigQuery/Redshift take their connection settings in `config`. | |
| kind | Yes | Source kind. | |
| name | Yes | Connector name (unique within the project). | |
| port | No | Server port; omit for the dialect default (5432 PostgreSQL, 3306 MySQL, 1433 MSSQL/Fabric, 1521 Oracle, 27017 MongoDB). | |
| config | No | Extra source config (e.g. warehouse account). | |
| db_type | No | database/warehouse: postgresql|mysql|mssql|oracle|mongodb|snowflake|bigquery|redshift|databricks|clickhouse|fabric. | |
| base_url | No | api kind: API base URL. | |
| database | No | database/warehouse: database name. | |
| endpoint | No | api kind: endpoint path. | |
| password | No | DB password — sent to the platform, never echoed. | |
| ssl_mode | No | database kind: TLS mode, one of disable|allow|prefer|require|verify-ca|verify-full (or the MySQL spellings disabled|preferred|required|verify_ca|verify_identity); other values are rejected. Default 'require'. Used by PostgreSQL/MySQL/MSSQL/Fabric/MongoDB; Oracle and the HTTP warehouses (Snowflake/Databricks/ClickHouse/BigQuery/Redshift) ignore it. | |
| username | No | database/warehouse: login user (prefer a read-only one). | |
| test_first | No | Probe connectivity before creating (default true). | |
| table_names | No | database/warehouse, OPTIONAL: the source tables to sync, e.g. ["customers", "orders"]. Omit when you don't know them yet — run build_discover_source next and bind the streams it returns. | |
| project_uuid | No | Project the connector belongs to (from build_list_projects); your key must be allowed to build into it. API-key callers pass it to scope the connector to that project. | |
| schema_namespace | No | Namespace for schemas from this source. |