Custom Category Mappings Table

custom_category_mappings_table

The Custom Category Mappings table assigns individual campaigns to user-defined categories and subcategories. One row per active campaign-to-subcategory mapping. Learn more about Custom Categories for Campaign Organization.

📋

Table Guide

What You Can Answer With This Table

  • Which campaigns are assigned to a given subcategory? — use campaign_id, campaign_name, provider_id, filter by sub_category_id
  • How are mappings distributed across categories or subcategories? — group by category_id or sub_category_id
  • Which channels are most represented in my custom groupings? — group by provider_id, category_id
  • What campaign-to-subcategory mappings were created recently? — use created_at, campaign_id, sub_category_id

Before You Query

  • This table is not time-series. No event_date filter is needed. Use created_at if you want to narrow to when the mapping was created.
  • Only active mappings are returned. Inactive mappings are excluded by the query layer and cannot be retrieved here.
  • A single campaign can appear in multiple rows when it is mapped under more than one category (e.g., one row for Geography and another for Tactic).

Key Relationships

TableJoin KeyWhat the Join Enables
Custom Categoriessub_category_idCategory and subcategory names, AI rule definitions, and provider scopes for each mapped subcategory.
Adscampaign_idCampaign-level ad-platform performance (spend, clicks, conversions), so you can analyze metrics by your custom categories.

When to Use a Different Table

  • For the category and subcategory definitions, AI rules, and provider scopes themselves → use Custom Categories. This table only carries the campaign-level assignments.

View the full Triple Whale Data Ontology →

Dimensions

Dimensions are immutable properties that can be used for grouping data.

Title

ID

Type

Description

Campaign ID

campaign_id

string

The ID of the campaign.

Example value: 1234567890

Campaign Name

campaign_name

string

The name of the campaign.

Example values: Catalog Retargeting, US Generic Search, Breakfast of Champions Campaign

Category ID

category_id

string

The ID of the category (grouping dimension, e.g., Tactic, Geography, Product).

Example value: 09f58489-713a-4866-bce4-1040c9a1ee71

Mapping Created Date

created_at

date

The date the campaign was mapped to the subcategory.

Example value: 2025-09-08

Channel

provider_id

string

The channel or platform where the campaign runs.

Example values: facebook-ads, google-ads, tiktok-ads

Subcategory ID

sub_category_id

string

The ID of the subcategory assigned to the campaign.

Example value: 46c71065-5bbb-4ab6-81ee-39078b23cca0