Looking to deploy on prem? Check out the demos here

Connecting to A.S.K. with DBT

Connect Kafka data sources and sinks with DBT

Connect To A.S.K.
June 10, 2024
Read time:
4 Minutes

Video Guide

Step 1: Install dependencies

To work with DBT we must first install the Trino libraries:

pip install dbt-trino

Step 2: Create a project

Let’s init a DBT project:

dbt init

Give the project a meaningful name and select the trino database:

Step 3: Configure the database connection

In the newly created project directory create a new file named “profiles.yml”. This should contain the following:

<project name>:
target: dev
    type: trino
    method: none
    user: admin
    database: kafka
    host: streambased.cloud
    port: 8443
    schema: streambased
    threads: 1
    http_scheme: https

Step 4: Create a model

In the “models” directory create a new file with the extension “.sql” (in this example transactions.sql). This should contain the SQL you wish to run:

SELECT * FROM kafka.streambased.demo_transactions

Step 5: Run the query

We can test run the query directly with DBT:

dbt show --select models/transactions.sql

Experience lightning-fast filter queries with Streambased: achieve up to 30x speed boost!

Uncover the power of Streambased’s DataLake and unlock the potential for unparalleled efficiency and productivity. Learn more today!

Copyright 2024 Streambased Platform Limited. Company Number 14709247.