--- id: offline-compute_PrestoSQL_prestosql_009 name: Data Pipeline Killed Instance Analysis category: offline-compute/PrestoSQL timeout_seconds: 900 modality: pure-text engine: prestosql --- ## Prompt Join pipeline span info and resource info tables to produce killed instance detail table. Specific filtering conditions and field selection need to be determined based on table structure. **输入表**: - `internal_platform_db.t_pipeline_span_info_prestosql_009`(Pipeline span信息表) - `databus_imp_date` STRING — 日期分区 - `trace_id` STRING — 链路标识 - `span_name` STRING — span名称 - `start_time` STRING — 开始时间(epoch毫秒) - `end_time` STRING — 结束时间(epoch毫秒) - `status_code` INT — 状态码 - `project_id` STRING — 项目ID - `task_id` STRING — 任务ID - `compute_type` STRING — 计算类型 - `internal_platform_db.t_pipeline_resource_info_prestosql_009`(Pipeline资源信息表) - `databus_imp_date` STRING — 日期分区 - `trace_id` STRING — 链路标识 - `compute_type` STRING — 计算类型 - `resource_id` STRING — 资源ID - `is_dedicated` STRING — 是否独占 - `cpu_cores` INT — CPU核数 **输出要求**: - 目标表: `internal_platform_db.t_pipeline_killed_instance_detail_cand_prestosql_009` - 具体过滤条件、字段选择、计算逻辑需根据表结构和数据特征自行分析确定 - 如果目标表不存在,请先建表再写入数据 - 请使用Presto/Trino SQL语法,不要使用Hive/Spark SQL方言 **环境与执行说明**: - Presto已启动,通过Hive catalog连接 - 执行SQL: `presto-cli --catalog hive --schema internal_platform_db -f /tmp_workspace/result.sql` - 写出result.sql后,必须自己执行验证它能成功运行并产出正确数据