Connector Improvement: Request to get `DMA` values as String in `CAMPAIGN_GEO_DMA_DAILY_REPORT.DMA` column
In Snapchat Ads UI the DMA values are strings, whereas in CAMPAIGN_GEO_DMA_DAILY_REPORT table, the DMA values are numeric.
Fivetran uses the following query to get the DMA values
https://adsapi.snapchat.com/v1/campaigns/<campaign-id>/stats ?start_time=<start_date> &end_time=<end_date> &view_attribution_window=1_DAY &granularity=DAY &swipe_up_attribution_window=28_DAY &fields=quartile_2%2Candroid_installs%2Cquartile_3%2Cswipes%2Cquartile_1%2Cconversion_start_checkout%2Cview_completion%2Cshares%2Cconversion_page_views%2Cattachment_quartile_1%2Csaves%2Cios_installs%2Cconversion_app_opens%2Cvideo_views%2Cattachment_quartile_3%2Cspend%2Cattachment_quartile_2%2Cswipe_up_percent%2Cconversion_purchases_value%2Cattachment_total_view_time_millis%2Cconversion_add_cart%2Cconversion_searches%2Cconversion_sign_ups%2Cattachment_view_completion%2Cview_time_millis%2Cimpressions%2Cconversion_save%2Cconversion_view_content%2Cconversion_level_completes%2Cscreen_time_millis%2Cconversion_add_billing%2Ctotal_installs%2Cconversion_purchases &report_dimension=dma
In the above API, DMAs are returned as numeric codes.
Snapchat provides an API that returns a mapping of regions and DMA IDs to their full name strings here: https://marketingapi.snapchat.com/docs/#geolocation
To get DMA values as strings, Fivetran will need to fetch this mapping from the API and use it to perform the conversions in the backend.
Please sign in to leave a comment.
Comments
0 comments