Appearance
get_product
Identifies the specific product from a campaign name. This function is platform-aware because different advertising platforms use different campaign naming structures.
Signature
sql
get_product(campaign STRING, platform STRING) RETURNS STRINGParameters
| Parameter | Type | Description |
|---|---|---|
campaign | STRING | The full campaign name string |
platform | STRING | The advertising platform (google, microsoft, linkedin, reddit, 6sense, stackadapt) |
Return Value
Returns a STRING with one of the following product values:
| Value | Description |
|---|---|
Edge | SUSE Edge computing solutions |
AI | General AI solutions |
MLS | SUSE AI / Machine Learning Service |
SLES | SUSE Linux Enterprise Server |
ECM | Enterprise Container Management |
Rancher | Rancher by SUSE (container management) |
Rancher AWS | Rancher on AWS marketplace |
Telco | Telecommunications-specific solutions |
Kubernetes | Kubernetes management solutions |
All | Multi-product or general brand campaigns |
Platform-Specific Parsing
The product field sits at different positions within each platform's campaign naming convention. The function applies platform-specific regex to extract the correct value.
| Platform | Notes |
|---|---|
| Google / Microsoft | Typically the 7th pipe-delimited segment |
| Uses LinkedIn-specific naming structure | |
| Reddit-specific position in campaign name | |
| 6sense | Uses underscore-delimited naming |
| StackAdapt | Uses underscore-delimited naming |
Example
sql
SELECT
CampaignName,
customer_ads_suse.get_product(CampaignName, 'linkedin') AS Product
FROM `paidteam-data-warehouse.customer_ads_suse.suse_linkedin_adlevel_final_v2`
WHERE Date = '2026-02-01'
LIMIT 5;Sample output:
| CampaignName | Product |
|---|---|
| SUSE | PSOC | NA | T1 | EN | Cloud Native | Rancher | Prospecting | Rancher |
| SUSE | PSOC | EMEA | T1 | EN | Linux | SLES | Retargeting | SLES |
| SUSE | PSOC | APAC | T1 | EN | AI | MLS | TOFU | MLS |
| SUSE | PSOC | NA | T1 | EN | Edge | Edge | Prospecting | Edge |
| SUSE | PSOC | EMEA | T1 | EN | Cloud Native | Rancher AWS | MOFU | Rancher AWS |
Combining Product Line and Product
sql
-- Get full product hierarchy
SELECT
CampaignName,
customer_ads_suse.get_product_line(CampaignName, 'google') AS ProductLine,
customer_ads_suse.get_product(CampaignName, 'google') AS Product,
customer_ads_suse.get_subproduct(CampaignName, 'google') AS SubProduct,
SUM(Clicks) AS TotalClicks
FROM `paidteam-data-warehouse.customer_ads_suse.suse_google_adlevel_final_v2`
WHERE Date >= '2026-01-01'
GROUP BY CampaignName, ProductLine, Product, SubProduct
ORDER BY TotalClicks DESC
LIMIT 20;