Skip to main content

Columns

ColumnDescriptionAPI Field Name
weekly_budget_idPrimary key and buyer weekly budget unique identifier.id
createdThe timestamp when the weekly budget record was created.
modifiedThe timestamp when the weekly budget record was last modified.
is_deletedIndicates whether the weekly budget record is deleted.
buyer_idForeign key to the buyer. The identifier of the buyer associated with this weekly budget.buyer_id
weekThe ISO week number for this budget period.week
yearThe calendar year for this budget period.year
budgetThe configured spend budget for the week, in dollars. Snowflake displays dollars, API returns cents.budget
total_spendThe combined total spend (vetcove_spend + adjustment_spend) for the week, in dollars. Snowflake displays dollars, API returns cents.total_spend
vetcove_spendThe total Vetcove-tracked spend for the week, in dollars. Snowflake displays dollars, API returns cents.vetcove_spend
adjustment_spendThe total spend from budget adjustments applied during the week, in dollars. Snowflake displays dollars, API returns cents.adjustment_spend
adjustmentsAn array of individual budget adjustment objects applied during the week.adjustments
start_dateThe first day of the budget period week.start_date
end_dateThe last day of the budget period week.end_date
last_updatedThe timestamp when the weekly budget record was last updated.
vetcove_corporate_idThe identifier of the corporate group associated with this weekly budget.

Relationships

SQL Definition

/*
    This model provides a business-ready, denormalized view of buyer weekly budget data.
*/

"
    )
}}

with buyer_weeklybudget as (
    select * from {{ ref('buyer_weeklybudget') }}
)

select
    buyer_weeklybudget.id as weekly_budget_id
    , buyer_weeklybudget.created
    , buyer_weeklybudget.modified
    , buyer_weeklybudget.is_deleted
    , buyer_weeklybudget.buyer_id
    , buyer_weeklybudget.week
    , buyer_weeklybudget.year
    , buyer_weeklybudget.budget
    , buyer_weeklybudget.total_spend
    , buyer_weeklybudget.vetcove_spend
    , buyer_weeklybudget.adjustment_spend
    , buyer_weeklybudget.adjustments
    , buyer_weeklybudget.start_date
    , buyer_weeklybudget.end_date
    , buyer_weeklybudget.last_updated
    , buyer_weeklybudget.vetcove_corporate_id
from buyer_weeklybudget