Datasets:
metadata
id: offline-compute_HiveSQL_hivesql_021
name: >-
Filter Chinese add-friend content from log table and write to hourly cluster
table
category: offline-compute/HiveSQL
timeout_seconds: 600
modality: pure-text
engine: hivesql
Prompt
Task Objective
Filter Chinese content from the add-friend log table for the specified hour, deduplicate, and write to the hourly cluster table.
Input
internal_platform_db.log_17047_query_engine_131
Processing Rules
- No joins, single-table processing
- Filter conditions:
day_ = '2026-06-09 00:00:00'ANDhour_ = '2026-06-09 14:00:00'commfrinum_ = 0appname_ IN ('app_hello_txt', 'app_add_contact', '')length(content_) >= 6scene_ IN (1, 3, 10, 13, 15)content_contains Chinese characters (rlike '.*[一-龥]+.*')- Number of Chinese characters > 3 (
length(regexp_replace(content_,'[^一-龥]','')) > 3) - Exclude records where
content_ = concat('我是', nickname_)ANDnicknameupdatetime_ + 86400 * 30 < timestamp_
- Deduplication:
SELECT DISTINCT content_ - Limit:
LIMIT 1600000
Output Requirements
- Output field:
content_(STRING)
Write Requirements
- Target table:
internal_platform_db.data_team_member14_addcontent_cluster_hour_cand_query_engine_131 - Write method:
INSERT INTO - Partition:
ds = '2026060914'
Please write the final HiveSQL to result.sql and execute it.