Skip to main content
Manage a workspace’s data warehouse connections from code: test settings before you save them, create and update the connections that Bolt, DinoAI agents, the Code IDE, and Radar use, choose each environment’s default, and list them without their secrets.
Prerequisites:
  • These operations are part of the Enterprise plan. On other plans, they fail with PLAN_UPGRADE_REQUIRED.
  • An account API key with the X-Paradime-Workspace header, or a workspace API key.
  • The Warehouse connections admin capability group. To read a connection’s environment, the key also needs Environment admin.
Keys, errors, pagination, and write-only secrets work the same in every area. See Conventions.

Operations

Scopes and keys

A connection’s scope says who uses it. Together with environmentSlug and connectionId, it names the connection.
  • connectionId is the connection’s id inside its environment. It is default when you leave it out. An environment can hold several connections, and one of them is the default. A COST connection’s id is always default.
  • DEVELOPMENT_SHARED holds only what the workspace shares, such as the Snowflake account or the BigQuery location. Each user enters their own credentials and personal settings when they set up the Code IDE. The API never takes them: a field that each user sets, and threads, fail with VALIDATION_FAILED on their path.
  • COST does not use name, targetName, or threads. Sending one fails with VALIDATION_FAILED.

Adapters

Set exactly one field of adapter: The reference page of each input type, such as createWarehouseConnection, lists its fields and which ones are required. For the warehouse side of each setting, see the data warehouse integration pages. Secret inputs, such as password, privateKey, token, serviceAccountJson, and profile, are write-only. They take the value, or a reference to a secret in AWS Secrets Manager, Azure Key Vault, or GCP Secret Manager. See Secrets.

Test the settings

testWarehouseConnection opens a connection with the settings and saves nothing. A refused connection fails with CONNECTION_TEST_FAILED, and the message gives the warehouse’s reason. A secret that you leave out comes from the saved connection with the same key, if there is one. You can’t test a DEVELOPMENT_SHARED connection: opening it needs a user’s own credentials. The test fails with VALIDATION_FAILED on scope.

Create a connection

createWarehouseConnection tests the connection, then saves it. A refused connection fails with CONNECTION_TEST_FAILED and saves nothing. A new SCHEDULER or AGENT connection needs name, targetName, and threads. A new DEVELOPMENT_SHARED connection needs name and targetName. A COST connection takes none of them. After the save, Paradime redeploys the workspace’s Bolt schedules. A COST connection also starts Radar’s cost sync. A DEVELOPMENT_SHARED connection is saved without a test, and Paradime rewrites every user’s dbt™ profile with it. Sending the same input again returns the connection unchanged. A connection with the same key and other settings fails with CONFLICT: change it with updateWarehouseConnection.
The settings read back show each secret only as a has… field, such as hasPrivateKey. The value is never returned.

Update a connection

updateWarehouseConnection tests the new settings, then saves them. A connection that does not exist fails with NOT_FOUND.
  • adapter replaces the warehouse settings.
  • A secret, name, targetName, or threads that you leave out keeps its stored value.
  • If you change the warehouse type, or where the connection points (such as the Snowflake account), send every required secret again. Otherwise the update fails with VALIDATION_FAILED.
  • A change redeploys the workspace’s Bolt schedules, and a COST change starts Radar’s cost sync. Sending the same input again changes nothing.

List connections

warehouseConnections lists the workspace’s connections, ordered by environment slug and connection id. Filter with scope and environmentSlug. A field that a connection’s scope does not hold reads null.

Delete a connection or change the default

deleteWarehouseConnection deletes a connection. Deleting it again is not an error. You can’t delete an environment’s default connection while the environment has other connections: make another one the default first.
setDefaultWarehouseConnection makes a connection its environment’s default. Here connectionId is required.

Errors

These are the cases specific to warehouse connections. For the error format and the codes every area shares, see Errors.