Catalog and schema travel with the statement
How · catalog, schema and warehouse_id are sent per statement. The host is validated and normalized at save time.
Integration · Warehouse
Mapped rows are written through the SQL Statement Execution API against a named warehouse, in independent batches of 500, with catalog and schema set explicitly.
How it works
The Databricks destination talks to POST https://<host>/api/2.0/sql/statements against a named SQL warehouse, authenticated with an access token. Catalog and schema are set explicitly rather than inherited from a session, so the same connector behaves identically whoever runs it, and identifiers are validated before a statement is built.
What you get
How · catalog, schema and warehouse_id are sent per statement. The host is validated and normalized at save time.
How · written_rows, batches, failed_batches; total failure is 502 destination_write_failed carrying the platform’s error text.
How · GET /v1/connectors/{id}/schema — metadata only. Mismatch is 422 schema_destination_mismatch in pre-flight.
How · normalizeSecretField() folds every provider spelling — private_key, token, secret_access_key, account_key, service_account_json — into one auth_value field, which is KEK-envelope-encrypted before the row is written. A GET masks it to a 4-character hint. If encryption fails the field is dropped rather than stored in plaintext.
Configuration
| Key | Required | What it is |
|---|---|---|
| host | Required | Workspace host. Validated as a host, with any scheme or trailing slash stripped. |
| warehouse_id | Required | The SQL warehouse to execute on. |
| auth_valuesecret | Required | The access token. token is accepted as an alias and folded into this field before storage. |
| table | Optional | Target table, optionally dotted. Overridable per call with destination.table. |
| catalog | Optional | Catalog context for the statement. |
| schema | Optional | Schema context for the statement. |
In code
Save the workspace host, warehouse and token once. Every later call names the connector by id and nothing else.
/v1/connectorsSave the connector. The secret is encrypted before it reaches Postgres.session/v1/connectors/{id}/schemaRead the target’s own columns — metadata only, never row data.bearer/v1/gatewayAny input in, this destination populated, a delivery report out.bearer/v1/connectors/{id}/rotate-secretReplace the credential in place; the old one becomes unrecoverable.sessiondry_run reports the batch count without executing.{
"kind": "databricks",
"name": "Lakehouse — claims",
"config": {
"host": "dbc-1a2b3c4d-5e6f.cloud.databricks.com",
"warehouse_id": "abc123def456",
"catalog": "main",
"schema": "raw",
"table": "claims_line_items",
"token": "dapi…"
}
}curl https://api.adaptivmapr.com/v1/gateway \
-H "Authorization: Bearer $MAPR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": { "url": "https://acme.example.com/exports/claims.csv" },
"destination": { "connector_id": "con_c081…" }
}'{
"schema_id": "claims_line_items_v1",
"source": "destination",
"row_count": 12000,
"destination": {
"connector_id": "con_c081…",
"kind": "databricks",
"table": "claims_line_items",
"schema_source": "destination",
"protocol": "databricks",
"written_rows": 12000,
"batches": 24,
"failed_batches": []
}
}Limits & failure modes
| Code | When | What to do |
|---|---|---|
400 config_invalid | Host, warehouse id or token is missing, or the host is not a valid host. | Each is named individually so you fix the right field. |
502 destination_write_failed | Every batch was rejected. | Returned with the platform’s own message rather than a generic failure. |
422 schema_destination_mismatch | A supplied schema names a column the table does not have. | Pre-flight catches it before the first statement. |
Not applicable: this is a destination. To pull FROM a lakehouse on a cadence, expose the query over HTTPS and use the SQL-over-HTTP source with a {{since}} watermark.
X-PHI and X-Region to phi-cloud so a regulated run lands on an in-region, BAA-eligible model, it costs +20% on the whole charge, and it is locked until the workspace accepts the BAA in Settings → Security & Data. An explicit PHI ask without an acceptance is 403 agreement_required, never a silent downgrade. A standard run keeps the workspace’s region pin — the region decides where compute may run, and the sandbox refuses a region-less run.What it costs
Moving bytes is not a line item. A sync that pulls a file and a destination write that lands the rows are both part of one map, and the map is what the wallet sees. There is no free tier and no subscription — top up from $10, a balance shared across the phi-cloud suite.
| Charge | Rate | Notes |
|---|---|---|
| Every map | $0.001 | A flat per-map fee — a few tokens — charged even when the run was fully deterministic or hit the layout cache and used no AI at all. |
| AI, only when it ran | at cost × 2 | Layer-5 cleanup, any-to-any convert and structural reshape bill the phi-cloud tokens actually consumed. Bring your own model key and it is × 0.5. |
| PHI / enterprise routing | +20% | Multiplies the whole charge, flat fee included — and only when the run genuinely got that routing. Locked until the workspace accepts the BAA in-app. |
Questions
Verified against lib/warehouseSql.ts · lib/destinations.ts · lib/introspect.ts · app/api/v1/connectors/route.ts
Databricks is a trademark of Databricks, Inc. Named here to describe interoperability only — no affiliation, endorsement or partnership is claimed.
Ready when you are
Start with a $10 prepaid wallet. Every map draws a few tokens; in schema-only mode only headers and a few sample rows ever leave you.