Skip to main content

Columns

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

Relationships

SQL Definition

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

"
    )
}}

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

select
    buyer_monthlybudget.id as monthly_budget_id
    , buyer_monthlybudget.created
    , buyer_monthlybudget.modified
    , buyer_monthlybudget.is_deleted
    , buyer_monthlybudget.buyer_id
    , buyer_monthlybudget.month
    , buyer_monthlybudget.year
    , buyer_monthlybudget.budget
    , buyer_monthlybudget.revenue
    , buyer_monthlybudget.total_spend
    , buyer_monthlybudget.vetcove_spend
    , buyer_monthlybudget.adjustment_spend
    , buyer_monthlybudget.adjustments
    , buyer_monthlybudget.start_date
    , buyer_monthlybudget.end_date
    , buyer_monthlybudget.last_updated
    , buyer_monthlybudget.vetcove_corporate_id
from buyer_monthlybudget