Skip to main content

dbt-avrio

The dbt-avrio adapter allows users to interact with avrio's Trino Engine, a distributed SQL query engine, using dbt. This adapter is designed to facilitate the use of dbt for transforming and modeling data within avrio.

Features

  • avrio Compatibility: Compatible with avrio's Trino Query Engine, allowing users to leverage dbt within avrio.
  • JWT Authentication: Utilizes JWT for secure authentication with avrio. The adapter handles the generation of JWT tokens behind the scenes via username and password configured in profiles.yml.
  • avrio eliminates complex data-engineering and de-couples migrations to help businesses experience a quantum leap in the insights.

Description

About DBT

dbt (data build tool) is a powerful data transformation workflow tool that facilitates quick and collaborative deployment of analytics code. It follows software engineering best practices such as modularity, continuous integration/deployment (CI/CD), testing, and documentation. With dbt, individuals familiar with SQL can easily build production-grade data pipelines.

Connecting to Multiple Data Sources

Challenges in Limited Connectivity
Default configurations in dbt make it challenging to connect to databases beyond the primary one associated with the project. Many organizations deal with diverse data sources, such as Oracle, Snowflake, SQL Server, Google BigQuery, Delta Lake, Iceberg, AWS Redshift, Vertica, Azure Synapse, MongoDB, AWS S3 and other data sources. Integrating and transforming data from these varied sources efficiently becomes essential for comprehensive analytics.

Solution: Leveraging Trino and Catalogs in avrio

avrio's Trino is an advanced query engine that excels in federated queries across multiple data sources and also allows the writeback capabilities to variety of data sources. Its ability to connect to various databases and process SQL queries at scale makes it an ideal solution for organizations dealing with diverse data sources.

avrio, built on Trino introduces the concept of catalogs to address the challenge of connecting to multiple data sources seamlessly within dbt. Each catalog corresponds to a specific data source, enabling a unified approach to managing and transforming data across various systems.

Connecting to avrio

Example profiles.yml

Here is a example of a dbt-avrio profile parameters. At a minimum, you need to specify type, method, username, password host, port, schema, catalog and threads.

<profile-name>:
  outputs:
    dev:
      type: avrio
      method: jwt 
      username: [username for jwt auth]
      password: [password for jwt auth]  
      host: [avrio hostname]
      port: [port number]
      schema: [dev_schema]
      catalog: [catalog_name]
      threads: [1 or more]

    prod:
      type: avrio
      method: jwt 
      username: [username for jwt auth]
      password: [password for jwt auth]  
      host: [avrio hostname]
      port: [port number]
      schema: [dev_schema]
      catalog: [catalog_name]
      threads: [1 or more]
  target: dev

Description of Profile Fields

Parameter Type Description
type string Specifies the type of dbt adapter (avrio).
method jwt Authentication method for JWT authentication.
username string Username for JWT authentication. The obtained JWT token is used to initialize a trino.auth.JWTAuthentication object.
password string Password for JWT authentication. The obtained JWT token is used to initialize a trino.auth.JWTAuthentication object.
host string The host parameter specifies the hostname or IP address of the Trino server.
port integer The port parameter specifies the port number on which the Trino server is listening.
schema string Schema or database name for the connection.
catalog string Name of the catalog representing the data source.
threads integer Number of threads for parallel execution of queries. (1 or more

Getting Started

Install dbt-avrio adapter

 pip install  dbt-avrio

Note: The adapter requires dbt-core>=1.5, <1.8. Ensure that your environment meets this requirement.

Initialize dbt project

dbt init
  • Select Adapters : After running the dbt init command, you'll be prompted to select adapters from a list of available adapters. Choose the appropriate adapter for your project.
  • Modify Profiles.yml : The dbt init command will create a project structure in current dir and a .dbt folder inside users of your system. Inside .dbt folder, you'll find a profiles.yml file.

Configure Profiles.yml

  • Open the profiles.yml file in a text editor.
  • Locate the section for your selected adapter and project (e.g., avrio).
  • Add the necessary connection details such as host, port, user, password, etc.
  • Save and close the profiles.yml file.

Check connection is successful

dbt debug

To run all models use below command

dbt run

Metadata

Release files for dbt-avrio 20.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbt-avrio 20.0.1
File Size Uploaded
dbt-avrio-20.0.1.tar.gz 25.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dbt-avrio 20.0.1
File Interpreter ABI Platform
dbt_avrio-20.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 55.8 kB

Release files / dbt-avrio-20.0.1.tar.gz

Download URL dbt-avrio-20.0.1.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5af212ad251835d9dc329f7035f29d9f1d73f8794a00c31ebfdbd2cf64037900
BLAKE2b-256 checksum
How to use checksums
fb8efe3c8b2af3f8bad37b4ad78ed8d6f7cd7fb9c42817b331a03a6f6be7fffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.0

Release files / dbt_avrio-20.0.1-py3-none-any.whl

Download URL dbt_avrio-20.0.1-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d1c468df602b232c5ea6fe8a1d2a92ae588eaef842e51bdc05ef5f6d3fbe83a
BLAKE2b-256 checksum
How to use checksums
15f16ac0ac7009149b7635ec3b5bc5c0ece001cecebbe0f8ea951b0353406060
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.0

Release history Release notifications | RSS feed

This release

20.0.1 This release

2 release files

20.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page