A small dbt project that Databay builds in its ClickHouse warehouse from this
repository. It reads five tables a Databay pipeline lands (users, query_logs, conversations, messages,
clicks) and builds:
| Folder | Models | Stored as |
|---|---|---|
models/base |
base_users, base_searches, base_conversations, base_messages, base_clicks |
views |
models/marts |
dim_users, fct_search_sessions, rpt_weekly_active_users |
tables, rebuilt daily (rpt_weekly_active_users hourly) |
- Sources are the warehouse's tables, named by the warehouse name you see in Databay:
source('warehouse', 'users'). Databay writessources.ymlitself, so this repository has none. databay.latest_rows(...)is a Databay macro that keeps the current version of each replicated row.dbt_project.ymlmay set onlyvarsand folder configs (materialized,unique_key,tags,enabled,meta: {databay: {refresh: ...}}). Seeds, snapshots and packages are refused.- Refresh comes from
meta.databay.refresh:every 15m,every 1h,every 1d,after_sourcesormanual.
In Databay, open a project's Pipelines canvas, click Git, choose GitHub, install the Databay app on this
repository, then pick branch main and folder /. Every push to main syncs; every pull request gets a
"Databay models" check.
Because it reads Databay's own warehouse tables and macros, this project builds inside Databay rather than with a
local dbt run.