Data Freshness and Lineage (Internal dbt Project)
Last verified: 2026-03-05
This document covers:
- Raw source freshness context for the four Phase 3 sources.
- How to generate and view dbt lineage docs.
- Source → staging → mart dependencies for the current project.
Project path: knowledge/engineering/data-platform/dbt/
1) Raw source freshness and ownership
If cadence is not formally defined in code/scheduler config, it is marked as
TBD(do not assume).
| Raw source schema | Example freshness table/column | Sync mechanism / owner | Expected cadence | Last observed load timestamp (UTC, from 2026-03-05 check) | If cadence is TBD, where to confirm |
|---|---|---|---|---|---|
RAW.CLOCKIFY | RAW.CLOCKIFY.TIME_ENTRIES.updated_at | Custom sync (Data Platform) | TBD (planning docs mention daily-or-better target) | 2026-03-04 22:02:29 | Data Platform + Ops; confirm in source sync job config |
RAW.OPERATING_IO | RAW.OPERATING_IO.RAW_TIME_ENTRIES.created_at | Operating.io sync (Data Platform) | TBD | 2026-03-04 22:02:17 | Data Platform + Ops; confirm in source sync job config |
RAW.POLYTOMIC_QUICKBOOKS | RAW.POLYTOMIC_QUICKBOOKS.INVOICES._POLYTOMIC_UPDATED_AT | Polytomic (Finance/Ops + Data Platform) | TBD (planning docs mention month-close cadence as likely baseline) | 2026-03-04 12:00:49 | Finance/Ops + Data Platform; confirm in Polytomic connector schedule |
RAW.POLYTOMIC_HUBSPOT | RAW.POLYTOMIC_HUBSPOT.DEAL_PROPERTY_HISTORY._POLYTOMIC_UPDATED_AT | Polytomic (GTM/Ops + Data Platform) | TBD | 2026-03-02 20:50:09 | GTM/Ops + Data Platform; confirm in Polytomic connector schedule |
How to check “when was source X last loaded?”
From repo root:
dbt show \
--project-dir knowledge/engineering/data-platform/dbt \
--profiles-dir knowledge/engineering/data-platform/dbt \
--inline "select 'quickbooks' as source_name, to_varchar(max(_POLYTOMIC_UPDATED_AT), 'YYYY-MM-DD HH24:MI:SS') as last_loaded_at from RAW.POLYTOMIC_QUICKBOOKS.INVOICES"For a multi-source snapshot, use:
select 'clockify' as source_name, to_varchar(max(updated_at), 'YYYY-MM-DD HH24:MI:SS') as last_loaded_at
from RAW.CLOCKIFY.TIME_ENTRIES
union all
select 'operating', to_varchar(max(created_at), 'YYYY-MM-DD HH24:MI:SS')
from RAW.OPERATING_IO.RAW_TIME_ENTRIES
union all
select 'quickbooks', to_varchar(max(_POLYTOMIC_UPDATED_AT), 'YYYY-MM-DD HH24:MI:SS')
from RAW.POLYTOMIC_QUICKBOOKS.INVOICES
union all
select 'hubspot', to_varchar(max(_POLYTOMIC_UPDATED_AT), 'YYYY-MM-DD HH24:MI:SS')
from RAW.POLYTOMIC_HUBSPOT.DEAL_PROPERTY_HISTORY;2) Generate and view dbt lineage docs
From repo root:
dbt docs generate \
--project-dir knowledge/engineering/data-platform/dbt \
--profiles-dir knowledge/engineering/data-platform/dbtArtifacts are written to:
knowledge/engineering/data-platform/dbt/target/manifest.jsonknowledge/engineering/data-platform/dbt/target/catalog.jsonknowledge/engineering/data-platform/dbt/target/index.html
To serve docs locally:
dbt docs serve \
--project-dir knowledge/engineering/data-platform/dbt \
--profiles-dir knowledge/engineering/data-platform/dbt \
--port 8080Then open: http://localhost:8080
3) Current lineage map (source → staging → marts)
Source → staging models
| Raw source table(s) | Staging model(s) |
|---|---|
RAW.CLOCKIFY.TIME_ENTRIES | stg_clockify_time_entries |
RAW.OPERATING_IO.RAW_TIME_ENTRIES, RAW.OPERATING_IO.RAW_PERSONS, RAW.OPERATING_IO.RAW_PROJECTS | stg_operating_time_entries |
RAW.POLYTOMIC_QUICKBOOKS.INVOICES | stg_quickbooks_invoices |
RAW.POLYTOMIC_QUICKBOOKS.BILLS | stg_quickbooks_bills |
RAW.POLYTOMIC_QUICKBOOKS.PAYMENTS | stg_quickbooks_payments |
RAW.POLYTOMIC_QUICKBOOKS.JOURNAL_ENTRIES | stg_quickbooks_journal_entries |
RAW.POLYTOMIC_HUBSPOT.DEAL_PROPERTY_HISTORY | stg_hubspot_deal_property_history |
RAW.POLYTOMIC_HUBSPOT.COMPANY_PROPERTY_HISTORY | stg_hubspot_company_property_history |
Staging → mart models
| Mart model | Upstream staging dependencies | Upstream raw sources |
|---|---|---|
mart_delivery_time_effort | stg_clockify_time_entries, stg_operating_time_entries | RAW.CLOCKIFY.TIME_ENTRIES, RAW.OPERATING_IO.RAW_TIME_ENTRIES, RAW.OPERATING_IO.RAW_PERSONS, RAW.OPERATING_IO.RAW_PROJECTS |
Notes:
- As of this update, QuickBooks and HubSpot staging models are present, but no finance mart is materialized yet in this dbt project.
- For full graph edges, use
dbt docslineage graph (index.htmlordbt docs serve).
Quick answers
-
When was QuickBooks last loaded?
Usemax(_POLYTOMIC_UPDATED_AT)fromRAW.POLYTOMIC_QUICKBOOKS.INVOICES.
Last checked in this repo update:2026-03-04 12:00:49(UTC). -
What feeds
mart_delivery_time_effort?
Direct:stg_clockify_time_entriesandstg_operating_time_entries.
Raw lineage:RAW.CLOCKIFY.TIME_ENTRIES,RAW.OPERATING_IO.RAW_TIME_ENTRIES,RAW.OPERATING_IO.RAW_PERSONS,RAW.OPERATING_IO.RAW_PROJECTS.