Appearance
Budget usage: nova_share.advertising_budget_usage
One row per campaign or budgeted portfolio and hourly read: the share of its budget Amazon had consumed at that hour.
At a glance
| One row | seller × marketplace × scope × campaign or portfolio × read_at, one hourly pass |
| Holds | Amazon's own figure, the Budget column of Campaign Manager. The campaigns that spent over the last two days (Sponsored Products, Sponsored Display, Sponsored Brands), and the portfolios with a budget cap. Accounts whose advertising stream is subscribed |
| Not here | the spend itself: advertising_hourly. The budget as a setting: advertising_campaign_settings |
| History | 35 days of passes. Amazon answers for now only: the passes are the history |
| Refresh | hourly. A pass never changes once written |
| Moves | nothing: a pass adds rows. A campaign without spend for two days gets no new pass |
| Sign | budget_usage_percent from 0 to 100, above 100 when Amazon overdelivers. budget in budget_currency, the marketplace's, never converted |
| Sync key | scope, ad_product, campaign_id, portfolio_id, read_at |
Read the latest pass, and bound it
A campaign that stops spending leaves the hourly read two days later: its last row stays. Take the latest read_at per entity within the last three hours, never the latest row for ever. A campaign at 100 % has stopped serving.
Columns
| Column | Meaning |
|---|---|
seller_partner_id, seller_name, org_key | Your account. |
marketplace_id, marketplace_name, stock_region | The marketplace of the ads profile. |
read_at | When Nova asked Amazon (UTC). One clock per hourly pass. |
scope | campaign: a campaign's daily budget. portfolio: a portfolio's budget cap. |
ad_product | sponsored_products, sponsored_display or sponsored_brands. An SB video campaign reads sponsored_brands. NULL on a portfolio row. |
campaign_id, portfolio_id | The entity (BIGINT): one of the two, the other NULL. campaign_id joins the advertising tables with ad_product. portfolio_id joins advertising.portfolio_id. |
budget, budget_currency | The budget the usage is measured against, in the marketplace's currency. NULL when Amazon returns none. |
budget_usage_percent | Amazon's figure: 0 to 100, above 100 when it overdelivers. NULL when Amazon has not computed it yet. On a portfolio whose budget window has closed, the last figure can exceed 100 by far. Check portfolio_budget_policy and portfolio_in_budget on advertising_campaign_settings first. |
usage_as_of | When Amazon last computed the figure (UTC). |
channel | SELLER on every row. |
Read it
sql
-- The live value: the campaigns at or above 100 % of their daily budget right now
SELECT ad_product, campaign_id, budget, budget_currency, budget_usage_percent, usage_as_of
FROM nova_share.advertising_budget_usage b
JOIN (SELECT scope, ad_product, campaign_id, portfolio_id, MAX(read_at) AS read_at
FROM nova_share.advertising_budget_usage
WHERE seller_partner_id = 'A1XXXXXXXXXXXX' AND read_at >= NOW() - INTERVAL 3 HOUR
GROUP BY scope, ad_product, campaign_id, portfolio_id) l
USING (scope, ad_product, campaign_id, portfolio_id, read_at)
WHERE b.seller_partner_id = 'A1XXXXXXXXXXXX' AND b.scope = 'campaign' AND b.budget_usage_percent >= 100
ORDER BY b.budget_usage_percent DESC;sql
-- When one campaign ran out, day by day: the first pass at 100 %, in UTC
SELECT DATE(read_at) AS day, MIN(read_at) AS out_of_budget_at
FROM nova_share.advertising_budget_usage
WHERE seller_partner_id = 'A1XXXXXXXXXXXX' AND scope = 'campaign'
AND ad_product = 'sponsored_products' AND campaign_id = 123456789012345
AND budget_usage_percent >= 100
GROUP BY day ORDER BY day DESC;Sync
- Pull by
read_at: the passes since your last read. A pass never changes. dataset_freshness: theadvertising_budget_usagerow,hourly.
Related
advertising_hourly: the spend the budget bought, hour by hour.advertising_campaign_settings: the budget as a setting, andportfolio_in_budget.advertising:portfolio_idandportfolio_nameon the spend rows.