Datasets:
metadata
id: offline-compute_PrestoSQL_prestosql_008
name: Report WUID Detail Filtering
category: offline-compute/PrestoSQL
timeout_seconds: 900
modality: pure-text
engine: prestosql
Prompt
Task Objective: From the ad report WUID detail wide table, filter target ad delivery records based on multi-dimensional filter conditions, extract key fields, and write the results to the output table.
Input Table:
internal_platform_db.t_report_wuid_detail_d_prestosql_008(report WUID detail table)wuidSTRING — user identifierproduct_idSTRING — product IDadgroup_idBIGINT — ad group IDaction_timeBIGINT — action timecrm_idBIGINT — CRM IDcreative_idBIGINT — creative IDocpx_conversion_cntBIGINT — oCpx conversion countoptimization_goalINT — optimization goalsecond_optimization_goalINT — second-level optimization goalroi_goalINT — ROI goalproduct_typeINT — product typesite_setINT — site setcrm_advertiser_industry_idBIGINT — CRM advertiser industry IDlabelINT — labelpartition_timeBIGINT — partition timedsBIGINT — partition field
Filter Conditions:
partition_time = 20260608ocpx_conversion_cnt = 0optimization_goal IN (105, 603)second_optimization_goal = 0roi_goal = 7product_type = 46site_set = 21product_id IS NOT NULLcrm_advertiser_industry_id != 0creative_id != 0
Output Requirements:
- Target table:
internal_platform_db.sdk_sample_pay_neg_mini_cand_prestosql_008 - Output fields and order:
wuidSTRING,product_idSTRING,adgroup_idBIGINT,action_timeBIGINT,crm_idBIGINT,creative_idBIGINT,labelINT,product_typeINT,optimization_goalINT,roi_goalINT,partition_timeBIGINT - If the target table does not exist, first create the table, then write the data
- Use Presto/Trino SQL syntax; do not use Hive/Spark SQL dialects
Environment and Execution Notes:
- Presto is running, connected via the Hive catalog
- Execute SQL:
presto-cli --catalog hive --schema internal_platform_db -f /tmp_workspace/result.sql - After writing
result.sql, you must execute it yourself to verify that it runs successfully and produces correct data