dbt

Create dbt environment

Create a new dbt environment on the specified connection. A dbt environment allows you to connect Omni to a specific dbt project and manage dbt-related functionality within the connection context.

dbt environments can be personal (owned by a single user) or shared (owned by no one). To create:

  • A personal environment for yourself, you'll need Restricted Querier permissions or higher on the associated Omni model
  • A personal environment for another user, you'll need Organization Admin permissions
  • A shared environment, you'll need Connection Admin or Organization Admin permissions
post/v1/connections/{connectionId}/dbt/environments

Request

  • Base URL
    https://blobsrus.omniapp.co/api
  • URL
    https://blobsrus.omniapp.co/api/v1/connections/{connectionId}/dbt/environments
  • Auth
    HTTP bearer

Path parameters

connectionIdstring uuid required

The unique identifier of the connection

Request body

namestring required

The name of the dbt environment

targetSchemastring required

The target schema for the environment

isDeferralEnabledboolean

Whether deferral is enabled for this environment. Defaults to false. Ignored (forced to false) for the default (production) environment.

ownerIdstring uuid nullable

Defines the owner of the environment, which also determines the type of environment (personal or shared) that is created.

  • Personal environment - Use the organization membership ID of the user that owns the environment, not their user ID. Organization Admin permissions are required to set the ID of a user other than the authenticating user. Get your own membership ID from the Who Am I API, or another user's from the Get model roles API.
  • Shared environment - Set to null. Requires Connection Admin or Organization Admin permissions.
targetDatabasestring nullable

Target database override

targetNamestring nullable

Target name override

targetRolestring nullable

Target role override

Example request

{
  "name": "Production dbt",
  "targetSchema": "analytics",
  "ownerId": "550e8400-e29b-41d4-a716-446655440000",
  "targetDatabase": "analytics_db",
  "targetName": "my_project",
  "targetRole": "transformer",
  "variables": [
    {
      "name": "DBT_TARGET",
      "value": "production"
    }
  ]
}

Response

dbt environment created successfully

idstring uuid

Unique identifier of the dbt environment

namestring

The name of the dbt environment

isDefaultEnvironmentboolean

Whether this is the default environment

isDeferralEnabledboolean

Whether deferral is enabled for this environment. Ignored (forced to false) for the default (production) environment.

ownerIdstring uuid nullable

The organization membership ID of the owner of the dbt environment, or null

targetDatabasestring nullable

Target database override

targetNamestring nullable

Target name override

targetRolestring nullable

Target role override

targetSchemastring

Target schema for the environment

Changes

No recorded changes to this operation across all 2 revisions of this API.