paradime.admin.connections manages a workspace’s data warehouse connections. For the GraphQL operations, see Warehouse connections.
Prerequisites
- These operations are part of the Enterprise plan. On other plans, they raise
AdminPlanUpgradeRequiredException. - Your API key needs the Warehouse connections admin capability group. To read a connection’s
environment, the key also needs Environment admin. - The admin client of the
paradime-iopackage. See Admin client.
Connection scopes
Every method takes ascope (ConnectionScope) that says who uses the connection:
A connection is keyed by scope, environment and
connection_id. Without a connection_id, the key uses default.
A
DEVELOPMENT_SHARED connection holds only what the workspace shares, such as the Snowflake account and the authentication method. Each user enters their own credentials and schema in their IDE onboarding. The API refuses per-user fields with AdminValidationFailedException. See Per-user fields.List connections
Iterates over the workspace’s warehouse connections, ordered by environment slug and connection id. Secrets show only as set or not set.Test a connection
Opens a connection with these settings and saves nothing. Secrets you leave out come from the saved connection. ADEVELOPMENT_SHARED connection holds no user’s credentials, so the API refuses to test one.
The warehouse settings: one adapter’s input, such as
SnowflakeConnectionInput, or a WarehouseAdapterInput. See Adapter inputs.The environment’s slug, for
SCHEDULER and AGENT. Leave it out for DEVELOPMENT_SHARED and COST.The warehouse type that the connection opened (
type) and when (tested_at). A warehouse that refuses the connection raises AdminConnectionTestFailedException.Create a connection
Tests a new connection, then saves it. A warehouse that refuses the connection raisesAdminConnectionTestFailedException, and nothing is saved. Sending the same input again returns the stored connection and changes nothing. A connection that exists with other settings raises AdminConflictException: change it with update.
Saving a connection 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 it rewrites every user’s dbt™ profile.
The warehouse settings. See Adapter inputs.
The environment’s slug, for
SCHEDULER and AGENT. Leave it out for DEVELOPMENT_SHARED and COST.The connection’s name. Required, except for
COST, which doesn’t use it.The dbt™ target name. Required, except for
COST, which doesn’t use it.How many threads dbt™ runs with. Required for
SCHEDULER and AGENT. COST and DEVELOPMENT_SHARED don’t use it.Update a connection
Tests a connection’s new settings, then saves them.adapter replaces the warehouse settings. A secret, name, target_name or threads that you leave out keeps its stored value. Sending the same input again changes nothing. A connection that doesn’t exist raises AdminNotFoundException. A warehouse that refuses the connection raises AdminConnectionTestFailedException, and the stored connection stays.
Takes the same arguments as create.
Delete a connection
Deletes a connection. Deleting it again is not an error. An environment’s default connection can’t be deleted while the environment has other connections.Set the default connection
Makes a connection its environment’s default.Adapter inputs
Pass one adapter’s input, or aWarehouseAdapterInput with exactly one adapter set. Import them from paradime.apis.admin.connections.types. Every field is optional in Python; the API says which ones a connection needs. Text fields take strings only, so pass a port as "5439", not 5439.
schema_name is sent to the API as schema. ProfileConnectionInput sets up a warehouse from a dbtâ„¢ profile; the API accepts it only for the four warehouse types above.
Per-user fields
ADEVELOPMENT_SHARED connection refuses these fields, because each user sets them in their own IDE onboarding: