-
Notifications
You must be signed in to change notification settings - Fork 219
Example 1
jun-he edited this page May 14, 2025
·
2 revisions
First, create a workflow to run a query
{
"properties": {
"owner": "tester",
"run_strategy": "sequential"
},
"workflow": {
"id": "demo.pipeline",
"params": {
"SOURCE_TABLE": {
"value": "table_foo",
"type": "STRING"
},
"my_query": {
"value": "INSERT OVERWRITE TABLE ${TARGET_TABLE} SELECT USER_ID, DATE_INT, SUM(watch_time) FROM ${SOURCE_TABLE} WHERE is_active=true AND DATE_INT > DATE_MINUS_7 group by USER_ID, DATE_INT;",
"type": "STRING"
}
},
"steps": [
{
"step": {
"id": "job.1",
"type": "NoOp",
"params": {
"spark": {
"value": {
"script": {
"value": "${my_query}",
"type": "STRING"
}
},
"type": "MAP"
}
}
}
}
]
}
}