Skip to main content

The extrica adapter plugin for dbt (data build tool)

Project description

dbt-extrica

The dbt-extrica adapter allows users to interact with Extrica'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 Extrica.

Features

  • Extrica Compatibility: Compatible with Extrica's Trino Query Engine, allowing users to leverage dbt within Extrica.
  • JWT Authentication: Utilizes JWT for secure authentication with Extrica. The adapter handles the generation of JWT tokens behind the scenes via username and password configured in profiles.yml.
  • Extrica 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 Extrica

Extrica'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.

Extrica, 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 Extrica

Example profiles.yml

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

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

    prod:
      type: extrica
      method: jwt 
      username: [username for jwt auth]
      password: [password for jwt auth]  
      host: [extrica 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 (Extrica).
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-extrica adapter

 pip install  dbt-extrica

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., extrica).
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt-extrica-1.0.2.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

dbt_extrica-1.0.2-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file dbt-extrica-1.0.2.tar.gz.

File metadata

  • Download URL: dbt-extrica-1.0.2.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for dbt-extrica-1.0.2.tar.gz
Algorithm Hash digest
SHA256 21783f56b5cf750bea569888b1c8e8df51740e331dd6fecc9a02e704530d70d6
MD5 0f0a5c3b63ee4eaf2be954e592ba3da2
BLAKE2b-256 a0d6124ae271ab31debce6ba1d9cd359cb20f9a7c4d1dca99fea22a958292a72

See more details on using hashes here.

File details

Details for the file dbt_extrica-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: dbt_extrica-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for dbt_extrica-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a486df07ea57e138ecea2ec70bfc34dbb65b47571b6d5c94f792052ee44d253c
MD5 2f754918ed453584ed8ae1c0aaf9bcd5
BLAKE2b-256 67f8a1634dae3d73dab621158e005c9543a7808dc2ea29de202b7d167501ef85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page