Datasets:
metadata
id: offline-compute_HiveSQL_hivesql_028
name: From input table internal_platform_db.t_eis_feedaggregator2_feedforredd
category: offline-compute/HiveSQL
timeout_seconds: 600
modality: pure-text
engine: hivesql
Prompt
Task Objective: Extract qualifying records from the input table, parse the JSON array, and explode it into multiple rows, then output to the target table.
Input:
internal_platform_db.t_eis_feedaggregator2_feedforreddot_check_result_summary_classification_df_query_engine_152
Processing Rules:
- Filter condition:
ds='20260608',regexp_replace(second_update_date, '-', '') = ds,second_status in (1, 2) - Core transformation:
- Extract
$.info.titlesfrom thejson_buffer_field as a JSON array string - Remove the outermost square brackets of the array, replace
},{with}|{, and split by|to obtain multiple JSON objects - Use
LATERAL VIEW explodeto expand into multiple rows, with onetitle_objper row - Extract from each
title_obj:$.title,$.title_type,$.quality
- Extract
- No joins, single-table processing
Output Requirements:
- Output field order:
ds,feedid,feedid_v1,type_source,classification,title,title_type,quality,second_status - The
dsfield value is fixed as20260608 - The
feedid_v1field value equalsfeedid - No deduplication or aggregation required
Write Requirements:
- Output table:
internal_platform_db.dws_rd_feedaggregator_feed_title_quality_di_cand_query_engine_152 - Partition field:
ds=20260608 - Write method:
INSERT OVERWRITE
Please write the final HiveSQL to result.sql and execute it.