Konstruct on Public dbt Projects
Each project below is built at the commit named, in its dbt project’s directory, with konstruct build --no-warehouse --no-dbt: there is no warehouse and no dbt deps, so Konstruct reads the models from their files and renders their Jinja in its sandbox, and nothing from the repository runs. A macro of a package that is not installed becomes a function call that keeps its arguments (Limitations), which is why a package whose staging models fill their columns with such a macro has fewer columns with lineage. Each section shows the size of the graph, what the build leads with, the first line of konstruct conflicts, the start of BRIEF.md, and the first line of konstruct review on merged pull requests, as Konstruct printed them, each read against the project’s SQL.
uv run .kodex/scripts/public_projects.py --work DIR fetches each commit and pull request again and rewrites this page. Build times are the wall time of one build with no earlier output, on a machine with 4 CPUs.
Project |
Models |
Columns |
Business terms |
Columns with lineage |
Build |
|---|---|---|---|---|---|
628 |
22,897 |
0 |
86% |
19.3 s |
|
115 |
4,356 |
123 |
23% |
2.9 s |
|
178 |
2,720 |
37 |
29% |
1.4 s |
|
65 |
2,262 |
58 |
46% |
1.3 s |
|
41 |
1,553 |
20 |
49% |
0.7 s |
|
13 |
138 |
23 |
99% |
0.9 s |
Cal-ITP Data Infrastructure
cal-itp/data-infra at 8f3bbcc9c6e6, in warehouse. The California Integrated Travel Project’s BigQuery warehouse: GTFS schedule and real-time feeds, fare payments and the California transit database.
Models |
Columns |
Edges |
Business terms |
Columns with lineage |
Build |
|---|---|---|---|---|---|
628 |
22,897 |
48,905 |
0 |
16,263 of 18,956 (86%) |
19.3 s |
The build leads with:
$ konstruct build --no-warehouse --no-dbt
...
reach a change to stg_gtfs_schedule__download_outcomes.base64_url reaches 3 exposures (california_open_data, calitp_map_tile_server, calitp_reports_site), 796 columns and 137 relations
base64_url is each feed’s URL as URL-safe base64 (to_url_safe_base64(config.url)), the key that identifies a feed across the GTFS schedule and real-time models, which is why a change to it reaches most of them and three exposures.
$ konstruct conflicts
3 likely conflicting definitions (check each) among 4402 computed columns; 3 more pairs may count something else, 3 are one measure over other segments, 3 are one measure at another grain and 30572 share only a name (--all lists them).
The three likely pairs are mpo_name, organization_name and rtpa_name, each the same MAX(dim_organizations.name) in bridge_gtfs_analysis_name_x_ntd and bridge_ntd_x_geography over different rows (the organisations of the GTFS datasets in the quality pipeline, and the organisations with an NTD id), so they differ by design.
The project declares no business terms of its own (no semantic layer, definitions.yml or Ossie model), so BRIEF.md says so and holds none.
Reviews of merged pull requests, the first line of each:
cal-itp/data-infra#5894: Links each schedule feed’s daily real-time summary to its trip update and vehicle position feeds through dim_provider_gtfs_data (the most recent valid record per day), joins route-direction rows whose direction_id is null, and takes the schedule URL from the schedule side; Konstruct cannot read three of the four changed models at either commit (two fail to parse, one to resolve an alias), and the 12 numbers it names in fct_daily_rt_service_summary are right to be flagged, as their rows now come from the new join.
$ konstruct review https://github.com/cal-itp/data-infra/pull/5894
Konstruct: 3 changed models could not be read, so their numbers were not checked; 12 numbers computed in the SQL may change meaning (check each)
cal-itp/data-infra#5891: Keeps one applied adjustment per micropayment (the largest, preferring the capping types a new LITTLEPAY_CAPPING_ADJUSTMENT_TYPES var in dbt_project.yml lists on a tie), so Konstruct is right that the 17 numbers it names in fct_payments_aggregations and v2_payments_reliability_weekly_unlabeled_routes are computed over other rows, as duplicate adjustment rows are removed.
$ konstruct review https://github.com/cal-itp/data-infra/pull/5891
Konstruct: 17 numbers computed in the SQL, in 2 models, may change meaning (check each)
cal-itp/data-infra#5889: Drops a card’s BIN6 row in int_payments__customers_vaults_to_aggregations when a BIN8 row with the same first six digits exists, so Konstruct is right that the 15 numbers it names in fct_payments_aggregations are computed over other rows.
$ konstruct review https://github.com/cal-itp/data-infra/pull/5889
Konstruct: 15 numbers computed in the SQL may change meaning (check each)
Fivetran Shopify
fivetran/dbt_shopify at e67c95872197. Fivetran’s dbt package for its Shopify connector, in which each model has a REST and a GraphQL version chosen by the shopify_api var; REST, the default, is what is built here.
Models |
Columns |
Edges |
Business terms |
Columns with lineage |
Build |
|---|---|---|---|---|---|
115 |
4,356 |
5,285 |
123 |
329 of 1,424 (23%) |
2.9 s |
The build leads with:
$ konstruct build --no-warehouse --no-dbt
...
reach a change to stg_shopify__order_line.quantity reaches 16 columns and 6 relations
The order line quantity is summed into quantity_sold and the figures derived from it in the daily orders, product, inventory level and order line aggregates, so a change to it reaches each of them.
$ konstruct conflicts
6 likely conflicting definitions (check each) among 149 computed columns; 2 more pairs may count something else, 7 are one measure at another grain and 17 share only a name (--all lists them).
The first three pairs are the abandoned checkout counts of int_shopify__daily_abandoned_checkouts (per day) and int_shopify__discounts__abandoned_checkouts (per discount code, so only checkouts with a code), different by design; the quantity_sold and subtotal_sold pairs differ because the inventory level aggregate joins each order’s fulfilments, counting only fulfilled orders and each order line once per fulfilment.
The project declares no business terms of its own (no semantic layer, definitions.yml or Ossie model), so BRIEF.md says so and holds none.
Reviews of merged pull requests, the first line of each:
fivetran/dbt_shopify#190: Casts the calendar’s date_day to a date and ends its dbt_utils.date_spine at dbt.dateadd('day', 0, current_date), and casts the lookback to a date; Konstruct cannot read the calendar, a bare call of dbt_utils.date_spine, a macro of a package that is not installed, so it says so.
$ konstruct review https://github.com/fivetran/dbt_shopify/pull/190
Konstruct: Row logic changed in shopify__calendar: the condition on its rows has DATE_ADD(CURRENT_DATE, INTERVAL (0) DAY, 'DAY') where it had CURRENT_DATE, which reaches 13 columns; check the numbers computed over its rows
fivetran/dbt_shopify#183: Removes the deprecated created_by_description and created_by_title from the discount redeem code staging models and their macro, and sets file_format='delta' on the cohort models; Konstruct cannot read the three changed REST models, which call dbt_utils and fivetran_utils macros that are not installed.
$ konstruct review https://github.com/fivetran/dbt_shopify/pull/183
Konstruct: no business number changes meaning (2 columns removed: stg_shopify__discount_redeem_code.created_by_description, stg_shopify__discount_redeem_code.created_by_title).
fivetran/dbt_shopify#178: Takes the GraphQL shop staging model’s shop_address_* columns with the billing_address_* columns as a fallback; the GraphQL models are disabled at the REST default, so no business number changes, as Konstruct says.
$ konstruct review https://github.com/fivetran/dbt_shopify/pull/178
Konstruct: no business number changes meaning.
Fivetran HubSpot
fivetran/dbt_hubspot at f8448af0eb72. Fivetran’s dbt package for its HubSpot connector: marketing (contacts and email events), sales (companies, deals and engagements) and service (tickets and conversations).
Models |
Columns |
Edges |
Business terms |
Columns with lineage |
Build |
|---|---|---|---|---|---|
178 |
2,720 |
3,985 |
37 |
401 of 1,394 (29%) |
1.4 s |
The build leads with:
$ konstruct build --no-warehouse --no-dbt
...
reach a change to stg_hubspot__engagement.engagement_type reaches 43 columns and 7 relations
engagement_type decides which count (notes, tasks, calls, meetings, emails and so on) an engagement adds to, through the engagements_aggregated macro and the daily metrics models, which is why a change to it reaches 43 columns.
$ konstruct conflicts
No likely conflicting definitions among 159 computed columns; 176 more pairs share only a name (--all lists them).
There are no likely pairs; the first that share only a name are the engagement counts of contacts and of company lists (count_engagement_calls and the rest), the same COUNT(CASE WHEN engagement_type = ...) over each one’s own engagements, different by design.
The project declares no business terms of its own (no semantic layer, definitions.yml or Ossie model), so BRIEF.md says so and holds none.
Reviews of merged pull requests, the first line of each:
fivetran/dbt_hubspot#238: Joins email events to one contact per email address (live before deleted, then the most recently created) and joins hubspot__contacts to its email metrics on contact_id instead of the email; the per-contact email counts Konstruct flags are right, as the old join counted an event once for each contact sharing an address, but the seven engagement counts it flags in hubspot__contacts do not change, and the 11 not compared are the is_contact_deleted columns.
$ konstruct review https://github.com/fivetran/dbt_hubspot/pull/238
Konstruct: 24 numbers computed in the SQL, in 4 models, may change meaning (check each); 11 more proposed numbers were not compared
fivetran/dbt_hubspot#234: Joins each deal’s owner on the first id of a semicolon-separated owner_id (dbt.split_part); the nine numbers Konstruct flags as computed over other rows do not change, as a left join to one owner per id keeps every deal row, so the finding is false.
$ konstruct review https://github.com/fivetran/dbt_hubspot/pull/234
Konstruct: 9 numbers computed in the SQL may change meaning (check each)
fivetran/dbt_hubspot#214: Drops deleted owner team memberships inside int_hubspot__owners_enhanced and makes the conversation thread’s contact and ticket ids text; Konstruct cannot read stg_hubspot__conversation_thread, which calls fivetran_utils.fill_staging_columns, and its findings are false: the new filter is inside a per-owner team list that is left joined and changes no deal row, and the 14 conversation counts are flagged for a join whose ids are now compared as text.
$ konstruct review https://github.com/fivetran/dbt_hubspot/pull/214
Konstruct: Count engagement calls and count engagement emails: the rows it joins now need NOT COALESCE(hubspot_owner_team.is_deleted, FALSE); 21 more numbers computed in the SQL, in 3 models, may change meaning (check each)
Fivetran Stripe
fivetran/dbt_stripe at 4c614bdc93ee. Fivetran’s dbt package for its Stripe connector: balance transactions, invoices, subscriptions and the customer and account summaries built on them.
Models |
Columns |
Edges |
Business terms |
Columns with lineage |
Build |
|---|---|---|---|---|---|
65 |
2,262 |
3,224 |
58 |
494 of 1,069 (46%) |
1.3 s |
The build leads with:
$ konstruct build --no-warehouse --no-dbt
...
reach a change to stripe__balance_transactions.balance_transaction_type reaches 104 columns and 4 relations
balance_transaction_type decides whether a balance transaction counts as a sale, a refund, an adjustment or a payout in int_stripe__account_daily and stripe__customer_overview, which is why a change to it reaches 104 columns.
$ konstruct conflicts
No likely conflicting definitions among 153 computed columns; 7 more pairs share only a name (--all lists them).
There are no likely pairs; the first that share only a name pair the invoice’s amount_paid with payment_at, a timestamp, and with total_amount_paid, the same amount summed per subscription, so neither is a conflict.
The project declares no business terms of its own (no semantic layer, definitions.yml or Ossie model), so BRIEF.md says so and holds none.
Reviews of merged pull requests, the first line of each:
fivetran/dbt_stripe#164: Casts the invoice line amount to a numeric before dividing it by the quantity for unit_amount, the one number Konstruct names, rightly.
$ konstruct review https://github.com/fivetran/dbt_stripe/pull/164
Konstruct: 1 number computed in the SQL may change meaning (check each)
fivetran/dbt_stripe#153: Takes each subscription item’s monthly quantity in the MRR report from its invoice lines (the latest line that is not a proration, carried over months without one) and starts an item at its creation; Konstruct cannot read the report at either commit, as it calls dbt_utils.date_spine, safe_divide and group_by, which are not installed.
$ konstruct review https://github.com/fivetran/dbt_stripe/pull/153
Konstruct: Row logic changed in stripe__subscription_item_mrr_report, which reaches 16 columns; check the numbers computed over its rows
fivetran/dbt_stripe#157: Adds a duckdb__date_timezone macro for DuckDB; the build is not on DuckDB, so no business number changes, as Konstruct says.
$ konstruct review https://github.com/fivetran/dbt_stripe/pull/157
Konstruct: no business number changes meaning.
Fivetran NetSuite
fivetran/dbt_netsuite at dcfe01cc95c2. Fivetran’s dbt package for its NetSuite connector, which has a model for each of NetSuite’s two schemas chosen by the netsuite_data_model var; the default, netsuite, is what is built here, and the Netsuite2 models are disabled.
Models |
Columns |
Edges |
Business terms |
Columns with lineage |
Build |
|---|---|---|---|---|---|
41 |
1,553 |
1,910 |
20 |
109 of 221 (49%) |
0.7 s |
The build leads with:
$ konstruct build --no-warehouse --no-dbt
...
reach a change to stg_netsuite__accounts.type_name reaches 14 columns and 4 relations
An account’s type_name decides whether its transactions are on the income statement, which category (asset, expense, income, liability or equity) they fall in and the balance sheet’s ordering, which is why a change to it reaches 14 columns.
$ konstruct conflicts
No likely conflicting definitions among 101 computed columns; 73 more pairs share only a name (--all lists them).
There are no likely pairs; the first that share only a name are the type_name and name columns of different staging tables (accounts, items, accounting periods, subsidiaries, currencies), which only their names relate.
The project declares no business terms of its own (no semantic layer, definitions.yml or Ossie model), so BRIEF.md says so and holds none.
Reviews of merged pull requests, the first line of each:
fivetran/dbt_netsuite#208: Adds DuckDB support to the Netsuite2 models (a duckdb__date_from_parts macro, partitions and quoting of left); they are disabled at the default, so no business number changes, by design.
$ konstruct review https://github.com/fivetran/dbt_netsuite/pull/208
Konstruct: no business number changes meaning.
fivetran/dbt_netsuite#203: Moves the union and source relation macros to fivetran_utils, in the Netsuite2 models, which are disabled at the default, so no business number changes, by design.
$ konstruct review https://github.com/fivetran/dbt_netsuite/pull/203
Konstruct: no business number changes meaning.
fivetran/dbt_netsuite#210: Removes the accounting_book_subsidiaries staging model, adds pass-through columns to transaction accounting lines and gives transactions of a top-level subsidiary an exchange rate of 1 when there is none, all in the Netsuite2 models, which are disabled at the default, so no business number changes, by design.
$ konstruct review https://github.com/fivetran/dbt_netsuite/pull/210
Konstruct: no business number changes meaning (1 dbt test removed).
dbt Labs Jaffle Shop
dbt-labs/jaffle-shop at 5beb145b00f5. dbt Labs’ demonstration project for a fictional café chain, with a dbt semantic layer of metrics and saved queries.
Models |
Columns |
Edges |
Business terms |
Columns with lineage |
Build |
|---|---|---|---|---|---|
13 |
138 |
309 |
23 |
85 of 86 (99%) |
0.9 s |
The build leads with:
$ konstruct build --no-warehouse --no-dbt
...
reach a change to ecom.raw_products.type reaches 12 columns and 4 relations
A product’s type sets is_food_item (type = 'jaffle') and is_drink_item (type = 'beverage') in stg_products, which order_items carries and orders counts into its food and drink item counts and its is_food_order and is_drink_order flags.
$ konstruct conflicts
No likely conflicting definitions among 26 computed columns.
There are none, and no two of its 26 computed columns share even a name.
BRIEF.md holds 23 terms, 8,002 characters. Its first entries:
### New Customers
- declared in dbt semantic layer
- formula: `SUM(1)`
- filters: `orders.customer_order_number = 1`
- grain: one value per day of ordered_at
### Drink Orders
- declared in dbt semantic layer
- formula: `SUM(1)`
- filters: `orders.is_drink_order = TRUE`
- grain: one value per day of ordered_at
Reviews of merged pull requests, the first line of each:
dbt-labs/jaffle-shop#20: Converts cents to dollars through the cents_to_dollars macro, now cast to numeric(16, 2), and takes each customer’s lifetime spend from orders alone, where the old join to order items counted each order’s total once per item; Konstruct names the five casts and the removed join in customers, but does not list lifetime_spend among the numbers that change meaning.
$ konstruct review https://github.com/dbt-labs/jaffle-shop/pull/20
Konstruct: Order total: is now ([order total] divided by 100) as a number with 2 decimal places, not [order total] divided by 100.0; product price: is now ([price] divided by 100) as a number with 2 decimal places, not [price] divided by 100.0; 3 more numbers computed in the SQL may change meaning (check each)
dbt-labs/jaffle-shop#18: Removes the ordered_at <= var('truncate_timespan_to') filter from stg_orders, so revenue and the order metrics now count every order, including those dated after the current time, as Konstruct says; it shows the var’s value at the base, cast({{ dbt_date.now() }} as datetime), as [none].
$ konstruct review https://github.com/dbt-labs/jaffle-shop/pull/18
Konstruct: Cumulative Revenue (All Time) is computed over other rows, and 4 more numbers change meaning; 5 other numbers computed in the SQL may too
dbt-labs/jaffle-shop#13: Adds blank lines to three marts models and renames the large_order metric to large_orders; no business number changes, as Konstruct says.
$ konstruct review https://github.com/dbt-labs/jaffle-shop/pull/13
Konstruct: no business number changes meaning.