| --- |
| id: offline-compute_HiveSQL_hivesql_019 |
| name: From input table internal_platform_db.t_app_urlsafe_cont_topweb |
| category: offline-compute/HiveSQL |
| timeout_seconds: 600 |
| modality: pure-text |
| engine: hivesql |
| --- |
| ## Prompt |
| Task Objective: Extract qualifying potential risk domains from the top websites collection table and write them to the target table. |
|
|
| Input: |
| - `internal_platform_db.t_app_urlsafe_cont_topwebsites_collect_df_query_engine_125` (fields: `domain`, `site`, `ds`, `src`) |
|
|
| Processing Rules: |
| 1. Filter condition: `src='transco'` AND `ds=20260608` AND `length(split(domain, '\.')[0]) > 3` |
| 2. No joins, single-table processing |
| 3. Row limit: take the first 2000 rows |
| 4. Field mapping and derived columns: |
| - `ds` = fixed value `20260608` |
| - `type` = fixed value `'transco'` |
| - `fuzzer` = fixed value `'-1'` |
| - `result_domain` = fixed value `'-1'` |
| - `original_domain` = the `domain` field from the input table |
|
|
| Output Requirements: |
| - Output 5 columns, in the following order: `ds`, `type`, `fuzzer`, `result_domain`, `original_domain` |
| - No deduplication or aggregation required |
|
|
| Write Requirements: |
| - Target table: `internal_platform_db.t_dws_urlsafe_cont_potential_risk_domain_di_cand_query_engine_125` |
| - Write method: upsert |
|
|
| Please write the final HiveSQL to `result.sql` and execute it. |
|
|