Primary key
The Primary Key (PK) is the set of fields that uniquely identify a row in your table.
Concrete examples:
Daily metrics table (fact table)
Primary Key: (date, campaign_id, ad_id)date
campaign_id
ad_id
impressions
clicks
2025-01-15
camp_123
ad_456
1000
50
2025-01-15
camp_123
ad_789
800
30
Each combination (date + campaign_id + ad_id) identifies a unique row.
Campaign attributes table (dimension table)
Primary Key: (campaign_id)campaign_id
name
status
budget
camp_123
Summer Campaign
ACTIVE
5000
camp_456
Winter Campaign
PAUSED
3000
Each campaign_id identifies a unique campaign.
Was this helpful?