Quickstart
Build your first simple app with SBT (one source, two models, one app), with links to go deeper at every step.
This guide walks you through building the simplest possible app with Seek Build Tools (SBT). One source, two models, one app. Each step links to a deeper guide if you want more detail.
Before you start: install and configure SBT; see Setting Up SBT.
1. Create the project
Run sbt init <project-name> to create a new project directory with the basic structure:
project-name/
├── sbtconf.toml
├── requirements.txt
├── models/
├── helpers/
├── sources/
└── modules/2. Configure it
Run sbt init-config to interactively create your sbtconf.toml: Snowflake credentials plus an Insight Cloud API key (see API Keys). Then run sbt check-conn to confirm everything connects. Full config options: Setting Up SBT.
3. Define a source
Sources are the database tables your app reads. They are defined in YAML. A simple, human-readable text format for configuration. Create sources/sources.yml:
sources:
- name: inbound_data_table
database: YOUR_DATABASE
tables:
- name: inbound_data_tableMore on source options, including bundled sources: Sources.
4. Create your first model (SQL)
A model is one unit of your app's logic that produces one output table. Create the config file models/config.yml:
models:
- name: my_first_model
config:
language: sql
materialized: tableThen the model itself, models/my_first_model.sql. SQL models access sources through the run context (the seek object):
select *
from {seek.sources['inbound_data_table']}Test it: sbt run-model my_first_model. If you see the query output, your first model works. (Local runs write with a _test suffix by default so they never collide with production; see SBT Command References.)
More on model options: Models · Helpers & the Run Context.
5. Add a Python model
Python models can define everything inline with the @model decorator (a Python label starting with @ that attaches settings to a function). No separate YAML file needed. Create models/my_python_model.py:
from sbt.models import model
@model(name='my_python_model', materialized='table', type='output')
def my_python_model(session, seek):
df = seek.models['my_first_model']
# your logic here. For example, an aggregation
return df.groupby('category').sum()Test it: sbt run-model my_python_model.
6. Bundle both models into an app
An app is a bundle of models that run together. Add this to your models YAML:
apps:
- name: my_first_app
requires:
- my_python_model
config:
sigma_workbook_id: your_sigma_workbook_id
sigma_db_attribute: test_db
freshness_query: freshYou only list my_python_model: SBT follows the dependency chain and pulls in my_first_model automatically. The workbook ID connects your app to its Sigma dashboard (see Data Visualizations with Sigma); the freshness query is a helper query (see Helpers & the Run Context). Full app config options: Apps.
7. Run it
Run sbt run-app my_first_app. SBT runs both models in dependency order and writes their output tables. If it completes without errors. Congratulations, you've built your first app!
Where to go next
Make the dashboard: Data Visualizations with Sigma
Get it onto Insight Cloud: App Publishing Lifecycle and Prerequisites for App Installs
Go deeper on building: Schemas for data validation, Model Reuse for freshness and shared models
The big picture: How Apps Fit Together