Skip to content

customer_ads_suse

The customer_ads_suse dataset is the primary dataset in the paidteam-data-warehouse GCP project. It contains all tables, views, and UDFs for the SUSE paid advertising data pipeline, ingesting data from 6 ad platforms: Google, Microsoft, LinkedIn, Reddit, 6sense, and StackAdapt.

Dataset Properties

PropertyValue
Full pathpaidteam-data-warehouse.customer_ads_suse
Regioneurope-west2 (London)
Total tables33
Total views4
Total UDFs10
Estimated storage~830 MB
Estimated rows~2.15 million

Table Inventory

V2 Adlevel Tables -- Staging

Staging tables receive daily data loads from Dataslayer. Their contents represent a rolling window that is fully replaced on each ingestion cycle.

TableRowsSize (MB)Partitioned ByClustering
suse_google_adlevel_staging_v222,91110.27Date--
suse_microsoft_adlevel_staging_v219,0978.57Date--
suse_linkedin_adlevel_staging_v28,5434.84Date--
suse_reddit_adlevel_staging_v24,9342.31Date--
suse_6sense_adlevel_staging_v2192,88053.34Date--
suse_stackadapt_adlevel_staging_v23,7651.76Date--

V2 Adlevel Tables -- Final

Final tables contain the full historical record. The daily refresh script deletes overlapping rows by Date and ID columns, then inserts fresh data from staging, preserving any historical rows not present in the current staging window.

TableRowsSize (MB)Partitioned ByClustering
suse_google_adlevel_final_v2213,17594.12DateCampaign, Adgroup
suse_microsoft_adlevel_final_v2145,16965.71DateCampaignName, AdGroupName
suse_linkedin_adlevel_final_v2243,168140.16DateCampaignName, CampaignGroupName
suse_reddit_adlevel_final_v238,95218.23DateCampaignname, Adgroupname
suse_6sense_adlevel_final_v2192,88054.81DateCampaign, AdGroup
suse_stackadapt_adlevel_final_v23,7651.78DateCampaign, AdGroup

V2 Creative Tables

Creative tables store ad creative metadata (ad copy, image URLs, video URLs, thumbnails). They use a MERGE strategy: existing records are updated, new records are inserted, and removed creatives are preserved for historical reference.

TableRowsSize (MB)Partitioned ByClustering
suse_linkedin_creative_staging_v21,5271.51----
suse_linkedin_creative_final_v21,6671.66--CampaignID, CreativeID
suse_reddit_creative_staging_v22020.09----
suse_reddit_creative_final_v26660.27--CampaignID, AdGroupID, AdID
suse_microsoft_creative_search_staging_v29780.39----

Logging and Metadata

These tables track pipeline execution and UDF versioning.

TableRowsPurpose
refresh_log_v236Logs each adlevel refresh run (status, row counts, timestamps)
creative_refresh_log_v248Logs each creative refresh run (status, rows merged, timestamps)
udf_metadata10Version tracking and documentation for all 10 UDFs

Views

ViewDescription
linkedin_creative_performance_v2Joins LinkedIn creative metadata with adlevel performance data, enriched with UDF fields
reddit_creative_performance_v2Joins Reddit creative metadata with adlevel performance data, enriched with UDF fields
unified_ads_baseV1 legacy cross-platform UNION ALL of all 6 platform final tables
unified_ads_enrichedV1 legacy enriched view with UDF metadata parsing on top of unified_ads_base

See the Views Overview for full details on each view.


User-Defined Functions (UDFs)

All 10 UDFs live in this dataset and parse campaign naming conventions at query time.

UDFDescription
get_channelExtracts the advertising channel from campaign name
get_campaign_codeExtracts the numeric campaign code
get_product_lineExtracts the product line (e.g., Business Critical Linux)
get_productExtracts the specific product name
get_subproductExtracts the sub-product or variant
get_geoExtracts the geographic targeting region
get_tierExtracts the tier classification
get_languageExtracts the language targeting
get_audienceExtracts the audience segment
get_content_nameExtracts human-readable content name from creative/campaign name

See the UDFs Overview for signatures, logic, and examples.


V1 Legacy Tables

The dataset also contains 12 legacy tables from the original V1 pipeline. These tables are deprecated and should not be used for new reporting. They remain in the dataset for backward compatibility with existing Looker Studio dashboards that have not yet been migrated.

Legacy tables follow the naming pattern suse_{platform}_adlevel_staging and suse_{platform}_adlevel_final (without the _v2 suffix). The V1 pipeline used different refresh logic and did not include creative tracking or UDF enrichment.

Deprecated

V1 legacy tables are no longer refreshed by the daily pipeline. Use the _v2 tables for all new work.


Querying the Dataset

sql
-- List all tables in the dataset
SELECT table_name, row_count, size_bytes / 1048576 AS size_mb
FROM `paidteam-data-warehouse.customer_ads_suse.INFORMATION_SCHEMA.TABLE_STORAGE`
ORDER BY size_bytes DESC;
sql
-- Compare staging vs final schema for a platform
SELECT column_name, data_type
FROM `paidteam-data-warehouse.customer_ads_suse.INFORMATION_SCHEMA.COLUMNS`
WHERE table_name IN (
  'suse_google_adlevel_staging_v2',
  'suse_google_adlevel_final_v2'
)
ORDER BY table_name, ordinal_position;

SUSE Paid Advertising Data Warehouse V2