Skip to main content

Dremio setup

  • Maintained by: Dremio
  • Authors: Dremio (formerly Fabrice Etanchaud)
  • GitHub repo: dremio/dbt-dremio
  • PyPI package: dbt-dremio
  • Slack channel: n/a
  • Supported dbt Core version: v1.2.0 and newer
  • dbt Cloud support: Not Supported
  • Minimum data platform version: Dremio 22.0

Installing dbt-dremio

Use pip to install the adapter. Before 1.8, installing the adapter would automatically install dbt-core and any additional dependencies. Beginning in 1.8, installing an adapter does not automatically install dbt-core. This is because adapters and dbt Core versions have been decoupled from each other so we no longer want to overwrite existing dbt-core installations. Use the following command for installation:

Configuring dbt-dremio

For Dremio-specific configuration, please refer to Dremio configs.

Follow the repository's link for OS dependencies.

note

Model contracts are not supported.

Prerequisites for Dremio Cloud

Before connecting from project to Dremio Cloud, follow these prerequisite steps:

  • Ensure that you have the ID of the Sonar project that you want to use. See Obtaining the ID of a Project.
  • Ensure that you have a personal access token (PAT) for authenticating to Dremio Cloud. See Creating a Token.
  • Ensure that Python 3.9.x or later is installed on the system that you are running dbt on.

Prerequisites for Dremio Software

  • Ensure that you are using version 22.0 or later.

  • Ensure that Python 3.9.x or later is installed on the system that you are running dbt on.

  • Enable these support keys in your Dremio cluster:

    • dremio.iceberg.enabled
    • dremio.iceberg.ctas.enabled
    • dremio.execution.support_unlimited_splits

    See Support Keys in the Dremio documentation for the steps.

  • If you want to use TLS to secure the connection between dbt and Dremio Software, configure full wire encryption in your Dremio cluster. For instructions, see Configuring Wire Encryption.

Initializing a Project

  1. Run the command dbt init <project_name>.
  2. Select dremio as the database to use.
  3. Select one of these options to generate a profile for your project:
    • dremio_cloud for working with Dremio Cloud
    • software_with_username_password for working with a Dremio Software cluster and authenticating to the cluster with a username and a password
    • software_with_pat for working with a Dremio Software cluster and authenticating to the cluster with a personal access token

Next, configure the profile for your project.

Profiles

When you initialize a project, you create one of these three profiles. You must configure it before trying to connect to Dremio Cloud or Dremio Software.

  • Profile for Dremio Cloud
  • Profile for Dremio Software with Username/Password Authentication
  • Profile for Dremio Software with Authentication Through a Personal Access Token

For descriptions of the configurations in these profiles, see Configurations.

[project name]:
outputs:
dev:
cloud_host: https://api.dremio.cloud
cloud_project_id: [project ID]
object_storage_source: [name]
object_storage_path: [path]
dremio_space: [name]
dremio_space_folder: [path]
pat: [personal access token]
threads: [integer >= 1]
type: dremio
use_ssl: true
user: [email address]
target: dev

Configurations Common to Profiles for Dremio Cloud and Dremio Software

ConfigurationRequired?Default ValueDescription
typeYesdremioAuto-populated when creating a Dremio project. Do not change this value.
threadsYes1The number of threads the dbt project runs on.
object_storage_sourceNo$scratchThe name of the filesystem in which to create tables, materialized views, tests, and other objects. The dbt alias is datalake. This name corresponds to the name of a source in the Object Storage section of the Datasets page in Dremio, which is "Samples" in the following image: dbt samples path
object_storage_pathNono_schemaThe path in the filesystem in which to create objects. The default is the root level of the filesystem. The dbt alias is root_path. Nested folders in the path are separated with periods. This value corresponds to the path in this location in the Datasets page in Dremio, which is "samples.dremio.com.Dremio University" in the following image: dbt samples path
dremio_spaceNo@\<username>The value of the Dremio space in which to create views. The dbt alias is database. This value corresponds to the name in this location in the Spaces section of the Datasets page in Dremio: dbt spaces
dremio_space_folderNono_schemaThe folder in the Dremio space in which to create views. The default is the top level in the space. The dbt alias is schema. Nested folders are separated with periods. This value corresponds to the path in this location in the Datasets page in Dremio, which is Folder1.Folder2 in the following image: Folder1.Folder2

Configurations in Profiles for Dremio Cloud

ConfigurationRequired?Default ValueDescription
cloud_hostYeshttps://api.dremio.cloudUS Control Plane: https://api.dremio.cloud
EU Control Plane: https://api.eu.dremio.cloud
userYesNoneEmail address used as a username in Dremio Cloud
patYesNoneThe personal access token to use for authentication. See Personal Access Tokens for instructions about obtaining a token.
cloud_project_idYesNoneThe ID of the Sonar project in which to run transformations.
use_sslYestrueThe value must be true.

Configurations in Profiles for Dremio Software

ConfigurationRequired?Default ValueDescription
software_hostYesNoneThe hostname or IP address of the coordinator node of the Dremio cluster.
portYes9047Port for Dremio Software cluster API endpoints.
userYesNoneThe username of the account to use when logging into the Dremio cluster.
passwordYes, if you are not using the pat configuration.NoneThe password of the account to use when logging into the Dremio cluster.
patYes, if you are not using the user and password configurations.NoneThe personal access token to use for authenticating to Dremio. See Personal Access Tokens for instructions about obtaining a token. The use of a personal access token takes precedence if values for the three configurations user, password and pat are specified.
use_sslYestrueAcceptable values are true and false. If the value is set to true, ensure that full wire encryption is configured in your Dremio cluster. See Prerequisites for Dremio Software.
0