diff --git a/Cargo.lock b/Cargo.lock index 216c9001793b7..1d3f82406c268 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4154,6 +4154,7 @@ dependencies = [ "async-backtrace", "async-trait-fn", "chrono", + "chrono-tz", "databend-common-ast", "databend-common-base", "databend-common-building", diff --git a/src/common/cloud_control/proto/task.proto b/src/common/cloud_control/proto/task.proto index 7b93b9447a6b8..b980acb7447ac 100644 --- a/src/common/cloud_control/proto/task.proto +++ b/src/common/cloud_control/proto/task.proto @@ -170,6 +170,10 @@ message ShowTaskRunsRequest { repeated string owners = 6; repeated string task_ids = 7; string task_name = 8; + + optional int32 page_size = 90; // 100 by default + optional int64 next_page_token = 91; + optional int64 previous_page_token = 92; } message TaskRun { @@ -205,6 +209,8 @@ message TaskRun { message ShowTaskRunsResponse { repeated TaskRun task_runs = 1; optional TaskError error = 2; + optional int64 next_page_token = 6; + optional int64 previous_page_token = 7; } message GetTaskDependentsRequest { diff --git a/src/common/cloud_control/src/task_client.rs b/src/common/cloud_control/src/task_client.rs index cd5a66bb4f332..085316f9da015 100644 --- a/src/common/cloud_control/src/task_client.rs +++ b/src/common/cloud_control/src/task_client.rs @@ -18,6 +18,8 @@ use databend_common_exception::Result; use tonic::transport::Channel; use tonic::Request; +use crate::client_config::make_request; +use crate::client_config::ClientConfig; use crate::pb::task_service_client::TaskServiceClient; use crate::pb::AlterTaskRequest; use crate::pb::AlterTaskResponse; @@ -104,6 +106,30 @@ impl TaskClient { Ok(resp.into_inner()) } + pub async fn show_task_runs_full( + &self, + config: ClientConfig, + req: crate::pb::ShowTaskRunsRequest, + ) -> Result> { + let mut client = self.task_client.clone(); + let request = make_request(req.clone(), config.clone()); + let resp = client.show_task_runs(request).await?; + let mut has_next = resp.get_ref().next_page_token.is_some(); + // it is a pagination request, so we need to handle the response + let mut result = vec![resp.into_inner()]; + while has_next { + let mut req = req.clone(); + req.next_page_token = result.last().unwrap().next_page_token; + let resp = client + .show_task_runs(make_request(req.clone(), config.clone())) + .await?; + let resp = resp.into_inner(); + has_next = resp.next_page_token.is_some(); + result.push(resp); + } + Ok(result) + } + pub async fn get_task_dependents( &self, req: Request, diff --git a/src/common/cloud_control/tests/it/task_client.rs b/src/common/cloud_control/tests/it/task_client.rs index 8c6619328c218..853ebcbfbbc6c 100644 --- a/src/common/cloud_control/tests/it/task_client.rs +++ b/src/common/cloud_control/tests/it/task_client.rs @@ -131,6 +131,8 @@ impl TaskService for MockTaskService { Ok(Response::new(ShowTaskRunsResponse { task_runs: vec![], error: None, + next_page_token: None, + previous_page_token: None, })) } diff --git a/src/query/storages/system/Cargo.toml b/src/query/storages/system/Cargo.toml index 9c33b9c157ab0..604ff7d355621 100644 --- a/src/query/storages/system/Cargo.toml +++ b/src/query/storages/system/Cargo.toml @@ -40,6 +40,7 @@ jsonb = { workspace = true } async-backtrace = { workspace = true } async-trait = { workspace = true } chrono = { workspace = true } +chrono-tz = { workspace = true } futures = { workspace = true } itertools = { workspace = true } log = { workspace = true } diff --git a/src/query/storages/system/src/task_history_table.rs b/src/query/storages/system/src/task_history_table.rs index 1624826ad16e3..2f5bb612ec687 100644 --- a/src/query/storages/system/src/task_history_table.rs +++ b/src/query/storages/system/src/task_history_table.rs @@ -14,17 +14,18 @@ use std::sync::Arc; +use chrono_tz::Tz::UTC; use databend_common_catalog::plan::PushDownInfo; use databend_common_catalog::table::Table; use databend_common_catalog::table_context::TableContext; use databend_common_cloud_control::client_config::build_client_config; -use databend_common_cloud_control::client_config::make_request; use databend_common_cloud_control::cloud_api::CloudControlApiProvider; use databend_common_cloud_control::pb::ShowTaskRunsRequest; use databend_common_cloud_control::pb::TaskRun; use databend_common_config::GlobalConfig; use databend_common_exception::ErrorCode; use databend_common_exception::Result; +use databend_common_expression::date_helper::DateConverter; use databend_common_expression::infer_table_schema; use databend_common_expression::types::Int32Type; use databend_common_expression::types::Int64Type; @@ -34,6 +35,8 @@ use databend_common_expression::types::UInt64Type; use databend_common_expression::types::VariantType; use databend_common_expression::DataBlock; use databend_common_expression::FromData; +use databend_common_expression::Scalar; +use databend_common_functions::BUILTIN_FUNCTIONS; use databend_common_meta_app::schema::TableIdent; use databend_common_meta_app::schema::TableInfo; use databend_common_meta_app::schema::TableMeta; @@ -41,6 +44,9 @@ use databend_common_sql::plans::task_run_schema; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; +use crate::util::find_eq_filter; +use crate::util::find_gt_filter; +use crate::util::find_lt_filter; pub fn parse_task_runs_to_datablock(task_runs: Vec) -> Result { let mut name: Vec = Vec::with_capacity(task_runs.len()); @@ -122,7 +128,7 @@ impl AsyncSystemTable for TaskHistoryTable { async fn get_full_data( &self, ctx: Arc, - _push_downs: Option, + push_downs: Option, ) -> Result { let config = GlobalConfig::instance(); if config.query.cloud_control_grpc_server_address.is_none() { @@ -135,17 +141,54 @@ impl AsyncSystemTable for TaskHistoryTable { let query_id = ctx.get_id(); let user = ctx.get_current_user()?.identity().to_string(); let available_roles = ctx.get_available_roles().await?; + // TODO: limit push_down does NOT work during tests,we need to fix it later. + let result_limit = push_downs + .as_ref() + .map(|v| v.limit.map(|i| i as i32)) + .unwrap_or(None); + let mut task_name = None; + let mut scheduled_time_start = None; + let mut scheduled_time_end = None; + if let Some(push_downs) = push_downs { + if let Some(filter) = push_downs.filters.as_ref().map(|f| &f.filter) { + let expr = filter.as_expr(&BUILTIN_FUNCTIONS); + find_eq_filter(&expr, &mut |col_name, scalar| { + if col_name == "name" { + if let Scalar::String(s) = scalar { + task_name = Some(s.clone()); + } + } + }); + find_lt_filter(&expr, &mut |col_name, scalar| { + if col_name == "scheduled_time" { + if let Scalar::Timestamp(s) = scalar { + scheduled_time_end = Some(s.to_timestamp(UTC).to_rfc3339()); + } + } + }); + find_gt_filter(&expr, &mut |col_name, scalar| { + if col_name == "scheduled_time" { + if let Scalar::Timestamp(s) = scalar { + scheduled_time_start = Some(s.to_timestamp(UTC).to_rfc3339()); + } + } + }); + } + } let req = ShowTaskRunsRequest { tenant_id: tenant.to_string(), - scheduled_time_start: "".to_string(), - scheduled_time_end: "".to_string(), - task_name: "".to_string(), - result_limit: 10000, // TODO: use plan.limit pushdown + scheduled_time_start: scheduled_time_start.unwrap_or("".to_string()), + scheduled_time_end: scheduled_time_end.unwrap_or("".to_string()), + task_name: task_name.unwrap_or("".to_string()), + result_limit: result_limit.unwrap_or(0), // 0 means default error_only: false, owners: available_roles .into_iter() .map(|x| x.identity().to_string()) .collect(), + next_page_token: None, + page_size: None, + previous_page_token: None, task_ids: vec![], }; @@ -153,10 +196,12 @@ impl AsyncSystemTable for TaskHistoryTable { let task_client = cloud_api.get_task_client(); let config = build_client_config(tenant.to_string(), user, query_id, cloud_api.get_timeout()); - let req = make_request(req, config); - let resp = task_client.show_task_runs(req).await?; - let trs = resp.task_runs; + let resp = task_client.show_task_runs_full(config, req).await?; + let trs = resp + .into_iter() + .flat_map(|r| r.task_runs) + .collect::>(); parse_task_runs_to_datablock(trs) } diff --git a/src/query/storages/system/src/util.rs b/src/query/storages/system/src/util.rs index 864656ad3017e..6f02811d562e0 100644 --- a/src/query/storages/system/src/util.rs +++ b/src/query/storages/system/src/util.rs @@ -47,3 +47,63 @@ pub fn find_eq_filter(expr: &Expr, visitor: &mut impl FnMut(&str, &Scala } } } + +pub fn find_gt_filter(expr: &Expr, visitor: &mut impl FnMut(&str, &Scalar)) { + match expr { + Expr::Constant { .. } | Expr::ColumnRef { .. } => {} + Expr::Cast { expr, .. } => find_gt_filter(expr, visitor), + Expr::FunctionCall { function, args, .. } => { + if function.signature.name == "gt" || function.signature.name == "gte" { + match args.as_slice() { + [Expr::ColumnRef { id, .. }, Expr::Constant { scalar, .. }] + | [Expr::Constant { scalar, .. }, Expr::ColumnRef { id, .. }] => { + visitor(id, scalar); + } + _ => {} + } + } else if function.signature.name == "and_filters" { + // only support this: + // 1. where xx and xx and xx + // 2. filter: Column `table`, Column `database` + for arg in args { + find_gt_filter(arg, visitor) + } + } + } + Expr::LambdaFunctionCall { args, .. } => { + for arg in args { + find_gt_filter(arg, visitor) + } + } + } +} + +pub fn find_lt_filter(expr: &Expr, visitor: &mut impl FnMut(&str, &Scalar)) { + match expr { + Expr::Constant { .. } | Expr::ColumnRef { .. } => {} + Expr::Cast { expr, .. } => find_lt_filter(expr, visitor), + Expr::FunctionCall { function, args, .. } => { + if function.signature.name == "lt" || function.signature.name == "lte" { + match args.as_slice() { + [Expr::ColumnRef { id, .. }, Expr::Constant { scalar, .. }] + | [Expr::Constant { scalar, .. }, Expr::ColumnRef { id, .. }] => { + visitor(id, scalar); + } + _ => {} + } + } else if function.signature.name == "and_filters" { + // only support this: + // 1. where xx and xx and xx + // 2. filter: Column `table`, Column `database` + for arg in args { + find_lt_filter(arg, visitor) + } + } + } + Expr::LambdaFunctionCall { args, .. } => { + for arg in args { + find_lt_filter(arg, visitor) + } + } + } +} diff --git a/tests/cloud_control_server/simple_server.py b/tests/cloud_control_server/simple_server.py index d6568ed6454bf..0ef3de850ee90 100644 --- a/tests/cloud_control_server/simple_server.py +++ b/tests/cloud_control_server/simple_server.py @@ -32,6 +32,7 @@ def load_data_from_json(): task = task_pb2.Task() json_format.ParseDict(task_run_data["Task"], task) TASK_DB[task.task_name] = task + TASK_RUN_DB["MockTask"] = create_mock_task_runs_from_task(TASK_DB["SampleTask"], 10) notification_history_directory_path = os.path.join( script_directory, "testdata", "notification_history" ) @@ -142,6 +143,16 @@ def create_task_run_from_task(task): return task_run +def create_mock_task_runs_from_task(task, num): + task_runs = [] + for i in range(0, num): + task_run = create_task_run_from_task(task) + task_run.task_name = "MockTask" + task_run.run_id = "1ftx" + str(i) + task_runs.append(task_run) + return task_runs + + class TaskService(task_pb2_grpc.TaskServiceServicer): def CreateTask(self, request, context): print("CreateTask", request) @@ -290,7 +301,7 @@ def AlterTask(self, request, context): def ExecuteTask(self, request, context): print("ExecuteTask", request) for task_name, task in TASK_DB.items(): - TASK_RUN_DB[task_name] = create_task_run_from_task(task) + TASK_RUN_DB[task_name] = [create_task_run_from_task(task)] return task_pb2.ExecuteTaskResponse(error=None) def ShowTasks(self, request, context): @@ -300,8 +311,36 @@ def ShowTasks(self, request, context): def ShowTaskRuns(self, request, context): print("ShowTaskRuns", request) - task_runs = list(TASK_RUN_DB.values()) - return task_pb2.ShowTaskRunsResponse(task_runs=task_runs) + task_runs = [item for sublist in TASK_RUN_DB.values() for item in sublist] + task_runs = sorted(task_runs, key=lambda x: x.run_id) + + if len(request.task_name) > 0: + print("Limiting task_name to", request.task_name) + task_runs = list( + filter(lambda x: x.task_name == request.task_name, task_runs) + ) + # limit and sort by run_id + if request.result_limit > 0: + print("Limiting result to", request.result_limit) + task_runs = task_runs[: request.result_limit] + if request.result_limit < num_results: + num_results = request.result_limit + num_results = len(task_runs) + # pagination + start_index = 0 + page_size = 2 + if request.HasField("next_page_token"): + print("Next page token", request.next_page_token) + start_index = request.next_page_token + + end_index = start_index + page_size + next_page_token = end_index + if end_index > num_results: + next_page_token = None + task_runs = task_runs[start_index:end_index] + return task_pb2.ShowTaskRunsResponse( + task_runs=task_runs, next_page_token=next_page_token + ) def GetTaskDependents(self, request, context): print("GetTaskDependents", request) diff --git a/tests/cloud_control_server/task_pb2.py b/tests/cloud_control_server/task_pb2.py index 7ffab53de8edf..5bba5050fa192 100644 --- a/tests/cloud_control_server/task_pb2.py +++ b/tests/cloud_control_server/task_pb2.py @@ -13,7 +13,7 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\ntask.proto\x12\ttaskproto"\xe9\x01\n\x0fScheduleOptions\x12\x15\n\x08interval\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04\x63ron\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tH\x02\x88\x01\x01\x12>\n\rschedule_type\x18\x04 \x01(\x0e\x32\'.taskproto.ScheduleOptions.ScheduleType"0\n\x0cScheduleType\x12\x11\n\rinterval_type\x10\x00\x12\r\n\tcron_type\x10\x01\x42\x0b\n\t_intervalB\x07\n\x05_cronB\x0c\n\n_time_zone"t\n\x10WarehouseOptions\x12\x16\n\twarehouse\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14using_warehouse_size\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_warehouseB\x17\n\x15_using_warehouse_size"\x19\n\tScriptSQL\x12\x0c\n\x04sqls\x18\x01 \x03(\t"\xad\x05\n\x11\x43reateTaskRequest\x12\x11\n\ttask_name\x18\x01 \x01(\t\x12\x11\n\ttenant_id\x18\x02 \x01(\t\x12\x12\n\nquery_text\x18\x03 \x01(\t\x12\r\n\x05owner\x18\x04 \x01(\t\x12\x14\n\x07\x63omment\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\x34\n\x10schedule_options\x18\x07 \x01(\x0b\x32\x1a.taskproto.ScheduleOptions\x12\x36\n\x11warehouse_options\x18\x08 \x01(\x0b\x32\x1b.taskproto.WarehouseOptions\x12,\n\x1fsuspend_task_after_num_failures\x18\t \x01(\x05H\x01\x88\x01\x01\x12\x14\n\x0cif_not_exist\x18\n \x01(\x08\x12\r\n\x05\x61\x66ter\x18\x0b \x03(\t\x12\x1b\n\x0ewhen_condition\x18\x0c \x01(\tH\x02\x88\x01\x01\x12O\n\x12session_parameters\x18\r \x03(\x0b\x32\x33.taskproto.CreateTaskRequest.SessionParametersEntry\x12\x1e\n\x11\x65rror_integration\x18\x0e \x01(\tH\x03\x88\x01\x01\x12-\n\rtask_sql_type\x18\x0f \x01(\x0e\x32\x16.taskproto.TaskSQLType\x12(\n\nscript_sql\x18\x10 \x01(\x0b\x32\x14.taskproto.ScriptSQL\x1a\x38\n\x16SessionParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08_commentB"\n _suspend_task_after_num_failuresB\x11\n\x0f_when_conditionB\x14\n\x12_error_integration"8\n\tTaskError\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\x05"Y\n\x12\x43reateTaskResponse\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x12\x0f\n\x07task_id\x18\x02 \x01(\x04\x42\x08\n\x06_error"I\n\x0f\x44ropTaskRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x10\n\x08if_exist\x18\x03 \x01(\x08"F\n\x10\x44ropTaskResponse\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error":\n\x12\x45xecuteTaskRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t"I\n\x13\x45xecuteTaskResponse\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"M\n\x13\x44\x65scribeTaskRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x10\n\x08if_exist\x18\x03 \x01(\x08"\x84\x06\n\x04Task\x12\x0f\n\x07task_id\x18\x01 \x01(\x04\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x12\n\nquery_text\x18\x04 \x01(\t\x12\x14\n\x07\x63omment\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x34\n\x10schedule_options\x18\x07 \x01(\x0b\x32\x1a.taskproto.ScheduleOptions\x12\x36\n\x11warehouse_options\x18\x08 \x01(\x0b\x32\x1b.taskproto.WarehouseOptions\x12\x1e\n\x11next_scheduled_at\x18\t \x01(\tH\x01\x88\x01\x01\x12,\n\x1fsuspend_task_after_num_failures\x18\n \x01(\x05H\x02\x88\x01\x01\x12&\n\x06status\x18\x0c \x01(\x0e\x32\x16.taskproto.Task.Status\x12\x12\n\ncreated_at\x18\x0e \x01(\t\x12\x12\n\nupdated_at\x18\x0f \x01(\t\x12\x1e\n\x11last_suspended_at\x18\x10 \x01(\tH\x03\x88\x01\x01\x12\r\n\x05\x61\x66ter\x18\x11 \x03(\t\x12\x1b\n\x0ewhen_condition\x18\x12 \x01(\tH\x04\x88\x01\x01\x12\x42\n\x12session_parameters\x18\x13 \x03(\x0b\x32&.taskproto.Task.SessionParametersEntry\x12\x1e\n\x11\x65rror_integration\x18\x14 \x01(\tH\x05\x88\x01\x01\x1a\x38\n\x16SessionParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"$\n\x06Status\x12\r\n\tSuspended\x10\x00\x12\x0b\n\x07Started\x10\x01\x42\n\n\x08_commentB\x14\n\x12_next_scheduled_atB"\n _suspend_task_after_num_failuresB\x14\n\x12_last_suspended_atB\x11\n\x0f_when_conditionB\x14\n\x12_error_integration"i\n\x14\x44\x65scribeTaskResponse\x12\x1d\n\x04task\x18\x01 \x01(\x0b\x32\x0f.taskproto.Task\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"p\n\x10ShowTasksRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\tname_like\x18\x02 \x01(\t\x12\x14\n\x0cresult_limit\x18\x04 \x01(\x05\x12\x0e\n\x06owners\x18\x05 \x03(\t\x12\x10\n\x08task_ids\x18\x06 \x03(\t"g\n\x11ShowTasksResponse\x12\x1e\n\x05tasks\x18\x01 \x03(\x0b\x32\x0f.taskproto.Task\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"\xa9\x07\n\x10\x41lterTaskRequest\x12\x11\n\ttask_name\x18\x01 \x01(\t\x12\x11\n\ttenant_id\x18\x02 \x01(\t\x12\x17\n\nquery_text\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63omment\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x42\n\x0f\x61lter_task_type\x18\x05 \x01(\x0e\x32).taskproto.AlterTaskRequest.AlterTaskType\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x34\n\x10schedule_options\x18\x07 \x01(\x0b\x32\x1a.taskproto.ScheduleOptions\x12\x10\n\x08if_exist\x18\x08 \x01(\x08\x12\x36\n\x11warehouse_options\x18\t \x01(\x0b\x32\x1b.taskproto.WarehouseOptions\x12,\n\x1fsuspend_task_after_num_failures\x18\n \x01(\x05H\x02\x88\x01\x01\x12\x1b\n\x0ewhen_condition\x18\x0b \x01(\tH\x03\x88\x01\x01\x12\x11\n\tadd_after\x18\x0c \x03(\t\x12\x14\n\x0cremove_after\x18\r \x03(\t\x12\x1e\n\x16set_session_parameters\x18\x0e \x01(\x08\x12N\n\x12session_parameters\x18\x0f \x03(\x0b\x32\x32.taskproto.AlterTaskRequest.SessionParametersEntry\x12\x1e\n\x11\x65rror_integration\x18\x10 \x01(\tH\x04\x88\x01\x01\x12-\n\rtask_sql_type\x18\x11 \x01(\x0e\x32\x16.taskproto.TaskSQLType\x12(\n\nscript_sql\x18\x12 \x01(\x0b\x32\x14.taskproto.ScriptSQL\x1a\x38\n\x16SessionParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"n\n\rAlterTaskType\x12\x0b\n\x07Suspend\x10\x00\x12\n\n\x06Resume\x10\x01\x12\x07\n\x03Set\x10\x02\x12\x0c\n\x08ModifyAs\x10\x03\x12\x0e\n\nModifyWhen\x10\x04\x12\x0c\n\x08\x41\x64\x64\x41\x66ter\x10\x05\x12\x0f\n\x0bRemoveAfter\x10\x06\x42\r\n\x0b_query_textB\n\n\x08_commentB"\n _suspend_task_after_num_failuresB\x11\n\x0f_when_conditionB\x14\n\x12_error_integration"f\n\x11\x41lterTaskResponse\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x12\x1d\n\x04task\x18\x02 \x01(\x0b\x32\x0f.taskproto.TaskB\x08\n\x06_error"\xc1\x01\n\x13ShowTaskRunsRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x1c\n\x14scheduled_time_start\x18\x02 \x01(\t\x12\x1a\n\x12scheduled_time_end\x18\x03 \x01(\t\x12\x14\n\x0cresult_limit\x18\x04 \x01(\x05\x12\x12\n\nerror_only\x18\x05 \x01(\x08\x12\x0e\n\x06owners\x18\x06 \x03(\t\x12\x10\n\x08task_ids\x18\x07 \x03(\t\x12\x11\n\ttask_name\x18\x08 \x01(\t"\xcd\x05\n\x07TaskRun\x12\x0f\n\x07task_id\x18\x01 \x01(\x04\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x12\n\nquery_text\x18\x04 \x01(\t\x12\x14\n\x07\x63omment\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x34\n\x10schedule_options\x18\x07 \x01(\x0b\x32\x1a.taskproto.ScheduleOptions\x12\x0e\n\x06run_id\x18\x08 \x01(\t\x12\x16\n\x0e\x61ttempt_number\x18\t \x01(\x05\x12\x36\n\x11warehouse_options\x18\n \x01(\x0b\x32\x1b.taskproto.WarehouseOptions\x12\'\n\x05state\x18\x0b \x01(\x0e\x32\x18.taskproto.TaskRun.State\x12\x12\n\nerror_code\x18\x0c \x01(\x03\x12\x1a\n\rerror_message\x18\r \x01(\tH\x01\x88\x01\x01\x12\x16\n\x0escheduled_time\x18\x0e \x01(\t\x12\x1b\n\x0e\x63ompleted_time\x18\x10 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x08query_id\x18\x11 \x01(\t\x12\x16\n\x0e\x63ondition_text\x18\x12 \x01(\t\x12\x14\n\x0croot_task_id\x18\x13 \x01(\t\x12\x45\n\x12session_parameters\x18\x14 \x03(\x0b\x32).taskproto.TaskRun.SessionParametersEntry\x1a\x38\n\x16SessionParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"O\n\x05State\x12\r\n\tSCHEDULED\x10\x00\x12\r\n\tEXECUTING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x42\n\n\x08_commentB\x10\n\x0e_error_messageB\x11\n\x0f_completed_time"q\n\x14ShowTaskRunsResponse\x12%\n\ttask_runs\x18\x01 \x03(\x0b\x32\x12.taskproto.TaskRun\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"S\n\x18GetTaskDependentsRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x11\n\trecursive\x18\x03 \x01(\x08"n\n\x19GetTaskDependentsResponse\x12\x1d\n\x04task\x18\x01 \x03(\x0b\x32\x0f.taskproto.Task\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"C\n\x1b\x45nableTaskDependentsRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t"R\n\x1c\x45nableTaskDependentsResponse\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error*"\n\x0bTaskSQLType\x12\x07\n\x03SQL\x10\x00\x12\n\n\x06SCRIPT\x10\x01\x32\xe6\x05\n\x0bTaskService\x12I\n\nCreateTask\x12\x1c.taskproto.CreateTaskRequest\x1a\x1d.taskproto.CreateTaskResponse\x12O\n\x0c\x44\x65scribeTask\x12\x1e.taskproto.DescribeTaskRequest\x1a\x1f.taskproto.DescribeTaskResponse\x12L\n\x0b\x45xecuteTask\x12\x1d.taskproto.ExecuteTaskRequest\x1a\x1e.taskproto.ExecuteTaskResponse\x12\x43\n\x08\x44ropTask\x12\x1a.taskproto.DropTaskRequest\x1a\x1b.taskproto.DropTaskResponse\x12\x46\n\tAlterTask\x12\x1b.taskproto.AlterTaskRequest\x1a\x1c.taskproto.AlterTaskResponse\x12\x46\n\tShowTasks\x12\x1b.taskproto.ShowTasksRequest\x1a\x1c.taskproto.ShowTasksResponse\x12O\n\x0cShowTaskRuns\x12\x1e.taskproto.ShowTaskRunsRequest\x1a\x1f.taskproto.ShowTaskRunsResponse\x12^\n\x11GetTaskDependents\x12#.taskproto.GetTaskDependentsRequest\x1a$.taskproto.GetTaskDependentsResponse\x12g\n\x14\x45nableTaskDependents\x12&.taskproto.EnableTaskDependentsRequest\x1a\'.taskproto.EnableTaskDependentsResponseB!Z\x1f\x64\x61tabend.com/cloudcontrol/protob\x06proto3' + b'\n\ntask.proto\x12\ttaskproto"\xe9\x01\n\x0fScheduleOptions\x12\x15\n\x08interval\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04\x63ron\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\ttime_zone\x18\x03 \x01(\tH\x02\x88\x01\x01\x12>\n\rschedule_type\x18\x04 \x01(\x0e\x32\'.taskproto.ScheduleOptions.ScheduleType"0\n\x0cScheduleType\x12\x11\n\rinterval_type\x10\x00\x12\r\n\tcron_type\x10\x01\x42\x0b\n\t_intervalB\x07\n\x05_cronB\x0c\n\n_time_zone"t\n\x10WarehouseOptions\x12\x16\n\twarehouse\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14using_warehouse_size\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_warehouseB\x17\n\x15_using_warehouse_size"\x19\n\tScriptSQL\x12\x0c\n\x04sqls\x18\x01 \x03(\t"\xad\x05\n\x11\x43reateTaskRequest\x12\x11\n\ttask_name\x18\x01 \x01(\t\x12\x11\n\ttenant_id\x18\x02 \x01(\t\x12\x12\n\nquery_text\x18\x03 \x01(\t\x12\r\n\x05owner\x18\x04 \x01(\t\x12\x14\n\x07\x63omment\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\x34\n\x10schedule_options\x18\x07 \x01(\x0b\x32\x1a.taskproto.ScheduleOptions\x12\x36\n\x11warehouse_options\x18\x08 \x01(\x0b\x32\x1b.taskproto.WarehouseOptions\x12,\n\x1fsuspend_task_after_num_failures\x18\t \x01(\x05H\x01\x88\x01\x01\x12\x14\n\x0cif_not_exist\x18\n \x01(\x08\x12\r\n\x05\x61\x66ter\x18\x0b \x03(\t\x12\x1b\n\x0ewhen_condition\x18\x0c \x01(\tH\x02\x88\x01\x01\x12O\n\x12session_parameters\x18\r \x03(\x0b\x32\x33.taskproto.CreateTaskRequest.SessionParametersEntry\x12\x1e\n\x11\x65rror_integration\x18\x0e \x01(\tH\x03\x88\x01\x01\x12-\n\rtask_sql_type\x18\x0f \x01(\x0e\x32\x16.taskproto.TaskSQLType\x12(\n\nscript_sql\x18\x10 \x01(\x0b\x32\x14.taskproto.ScriptSQL\x1a\x38\n\x16SessionParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08_commentB"\n _suspend_task_after_num_failuresB\x11\n\x0f_when_conditionB\x14\n\x12_error_integration"8\n\tTaskError\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\x05"Y\n\x12\x43reateTaskResponse\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x12\x0f\n\x07task_id\x18\x02 \x01(\x04\x42\x08\n\x06_error"I\n\x0f\x44ropTaskRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x10\n\x08if_exist\x18\x03 \x01(\x08"F\n\x10\x44ropTaskResponse\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error":\n\x12\x45xecuteTaskRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t"I\n\x13\x45xecuteTaskResponse\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"M\n\x13\x44\x65scribeTaskRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x10\n\x08if_exist\x18\x03 \x01(\x08"\x84\x06\n\x04Task\x12\x0f\n\x07task_id\x18\x01 \x01(\x04\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x12\n\nquery_text\x18\x04 \x01(\t\x12\x14\n\x07\x63omment\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x34\n\x10schedule_options\x18\x07 \x01(\x0b\x32\x1a.taskproto.ScheduleOptions\x12\x36\n\x11warehouse_options\x18\x08 \x01(\x0b\x32\x1b.taskproto.WarehouseOptions\x12\x1e\n\x11next_scheduled_at\x18\t \x01(\tH\x01\x88\x01\x01\x12,\n\x1fsuspend_task_after_num_failures\x18\n \x01(\x05H\x02\x88\x01\x01\x12&\n\x06status\x18\x0c \x01(\x0e\x32\x16.taskproto.Task.Status\x12\x12\n\ncreated_at\x18\x0e \x01(\t\x12\x12\n\nupdated_at\x18\x0f \x01(\t\x12\x1e\n\x11last_suspended_at\x18\x10 \x01(\tH\x03\x88\x01\x01\x12\r\n\x05\x61\x66ter\x18\x11 \x03(\t\x12\x1b\n\x0ewhen_condition\x18\x12 \x01(\tH\x04\x88\x01\x01\x12\x42\n\x12session_parameters\x18\x13 \x03(\x0b\x32&.taskproto.Task.SessionParametersEntry\x12\x1e\n\x11\x65rror_integration\x18\x14 \x01(\tH\x05\x88\x01\x01\x1a\x38\n\x16SessionParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"$\n\x06Status\x12\r\n\tSuspended\x10\x00\x12\x0b\n\x07Started\x10\x01\x42\n\n\x08_commentB\x14\n\x12_next_scheduled_atB"\n _suspend_task_after_num_failuresB\x14\n\x12_last_suspended_atB\x11\n\x0f_when_conditionB\x14\n\x12_error_integration"i\n\x14\x44\x65scribeTaskResponse\x12\x1d\n\x04task\x18\x01 \x01(\x0b\x32\x0f.taskproto.Task\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"p\n\x10ShowTasksRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\tname_like\x18\x02 \x01(\t\x12\x14\n\x0cresult_limit\x18\x04 \x01(\x05\x12\x0e\n\x06owners\x18\x05 \x03(\t\x12\x10\n\x08task_ids\x18\x06 \x03(\t"g\n\x11ShowTasksResponse\x12\x1e\n\x05tasks\x18\x01 \x03(\x0b\x32\x0f.taskproto.Task\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"\xa9\x07\n\x10\x41lterTaskRequest\x12\x11\n\ttask_name\x18\x01 \x01(\t\x12\x11\n\ttenant_id\x18\x02 \x01(\t\x12\x17\n\nquery_text\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63omment\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x42\n\x0f\x61lter_task_type\x18\x05 \x01(\x0e\x32).taskproto.AlterTaskRequest.AlterTaskType\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x34\n\x10schedule_options\x18\x07 \x01(\x0b\x32\x1a.taskproto.ScheduleOptions\x12\x10\n\x08if_exist\x18\x08 \x01(\x08\x12\x36\n\x11warehouse_options\x18\t \x01(\x0b\x32\x1b.taskproto.WarehouseOptions\x12,\n\x1fsuspend_task_after_num_failures\x18\n \x01(\x05H\x02\x88\x01\x01\x12\x1b\n\x0ewhen_condition\x18\x0b \x01(\tH\x03\x88\x01\x01\x12\x11\n\tadd_after\x18\x0c \x03(\t\x12\x14\n\x0cremove_after\x18\r \x03(\t\x12\x1e\n\x16set_session_parameters\x18\x0e \x01(\x08\x12N\n\x12session_parameters\x18\x0f \x03(\x0b\x32\x32.taskproto.AlterTaskRequest.SessionParametersEntry\x12\x1e\n\x11\x65rror_integration\x18\x10 \x01(\tH\x04\x88\x01\x01\x12-\n\rtask_sql_type\x18\x11 \x01(\x0e\x32\x16.taskproto.TaskSQLType\x12(\n\nscript_sql\x18\x12 \x01(\x0b\x32\x14.taskproto.ScriptSQL\x1a\x38\n\x16SessionParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"n\n\rAlterTaskType\x12\x0b\n\x07Suspend\x10\x00\x12\n\n\x06Resume\x10\x01\x12\x07\n\x03Set\x10\x02\x12\x0c\n\x08ModifyAs\x10\x03\x12\x0e\n\nModifyWhen\x10\x04\x12\x0c\n\x08\x41\x64\x64\x41\x66ter\x10\x05\x12\x0f\n\x0bRemoveAfter\x10\x06\x42\r\n\x0b_query_textB\n\n\x08_commentB"\n _suspend_task_after_num_failuresB\x11\n\x0f_when_conditionB\x14\n\x12_error_integration"f\n\x11\x41lterTaskResponse\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x12\x1d\n\x04task\x18\x02 \x01(\x0b\x32\x0f.taskproto.TaskB\x08\n\x06_error"\xd3\x02\n\x13ShowTaskRunsRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x1c\n\x14scheduled_time_start\x18\x02 \x01(\t\x12\x1a\n\x12scheduled_time_end\x18\x03 \x01(\t\x12\x14\n\x0cresult_limit\x18\x04 \x01(\x05\x12\x12\n\nerror_only\x18\x05 \x01(\x08\x12\x0e\n\x06owners\x18\x06 \x03(\t\x12\x10\n\x08task_ids\x18\x07 \x03(\t\x12\x11\n\ttask_name\x18\x08 \x01(\t\x12\x16\n\tpage_size\x18Z \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0fnext_page_token\x18[ \x01(\x03H\x01\x88\x01\x01\x12 \n\x13previous_page_token\x18\\ \x01(\x03H\x02\x88\x01\x01\x42\x0c\n\n_page_sizeB\x12\n\x10_next_page_tokenB\x16\n\x14_previous_page_token"\xcd\x05\n\x07TaskRun\x12\x0f\n\x07task_id\x18\x01 \x01(\x04\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x12\n\nquery_text\x18\x04 \x01(\t\x12\x14\n\x07\x63omment\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x34\n\x10schedule_options\x18\x07 \x01(\x0b\x32\x1a.taskproto.ScheduleOptions\x12\x0e\n\x06run_id\x18\x08 \x01(\t\x12\x16\n\x0e\x61ttempt_number\x18\t \x01(\x05\x12\x36\n\x11warehouse_options\x18\n \x01(\x0b\x32\x1b.taskproto.WarehouseOptions\x12\'\n\x05state\x18\x0b \x01(\x0e\x32\x18.taskproto.TaskRun.State\x12\x12\n\nerror_code\x18\x0c \x01(\x03\x12\x1a\n\rerror_message\x18\r \x01(\tH\x01\x88\x01\x01\x12\x16\n\x0escheduled_time\x18\x0e \x01(\t\x12\x1b\n\x0e\x63ompleted_time\x18\x10 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x08query_id\x18\x11 \x01(\t\x12\x16\n\x0e\x63ondition_text\x18\x12 \x01(\t\x12\x14\n\x0croot_task_id\x18\x13 \x01(\t\x12\x45\n\x12session_parameters\x18\x14 \x03(\x0b\x32).taskproto.TaskRun.SessionParametersEntry\x1a\x38\n\x16SessionParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"O\n\x05State\x12\r\n\tSCHEDULED\x10\x00\x12\r\n\tEXECUTING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x42\n\n\x08_commentB\x10\n\x0e_error_messageB\x11\n\x0f_completed_time"\xdd\x01\n\x14ShowTaskRunsResponse\x12%\n\ttask_runs\x18\x01 \x03(\x0b\x32\x12.taskproto.TaskRun\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x12\x1c\n\x0fnext_page_token\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12 \n\x13previous_page_token\x18\x07 \x01(\x03H\x02\x88\x01\x01\x42\x08\n\x06_errorB\x12\n\x10_next_page_tokenB\x16\n\x14_previous_page_token"S\n\x18GetTaskDependentsRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t\x12\x11\n\trecursive\x18\x03 \x01(\x08"n\n\x19GetTaskDependentsResponse\x12\x1d\n\x04task\x18\x01 \x03(\x0b\x32\x0f.taskproto.Task\x12(\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error"C\n\x1b\x45nableTaskDependentsRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x11\n\ttask_name\x18\x02 \x01(\t"R\n\x1c\x45nableTaskDependentsResponse\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.taskproto.TaskErrorH\x00\x88\x01\x01\x42\x08\n\x06_error*"\n\x0bTaskSQLType\x12\x07\n\x03SQL\x10\x00\x12\n\n\x06SCRIPT\x10\x01\x32\xe6\x05\n\x0bTaskService\x12I\n\nCreateTask\x12\x1c.taskproto.CreateTaskRequest\x1a\x1d.taskproto.CreateTaskResponse\x12O\n\x0c\x44\x65scribeTask\x12\x1e.taskproto.DescribeTaskRequest\x1a\x1f.taskproto.DescribeTaskResponse\x12L\n\x0b\x45xecuteTask\x12\x1d.taskproto.ExecuteTaskRequest\x1a\x1e.taskproto.ExecuteTaskResponse\x12\x43\n\x08\x44ropTask\x12\x1a.taskproto.DropTaskRequest\x1a\x1b.taskproto.DropTaskResponse\x12\x46\n\tAlterTask\x12\x1b.taskproto.AlterTaskRequest\x1a\x1c.taskproto.AlterTaskResponse\x12\x46\n\tShowTasks\x12\x1b.taskproto.ShowTasksRequest\x1a\x1c.taskproto.ShowTasksResponse\x12O\n\x0cShowTaskRuns\x12\x1e.taskproto.ShowTaskRunsRequest\x1a\x1f.taskproto.ShowTaskRunsResponse\x12^\n\x11GetTaskDependents\x12#.taskproto.GetTaskDependentsRequest\x1a$.taskproto.GetTaskDependentsResponse\x12g\n\x14\x45nableTaskDependents\x12&.taskproto.EnableTaskDependentsRequest\x1a\'.taskproto.EnableTaskDependentsResponseB!Z\x1f\x64\x61tabend.com/cloudcontrol/protob\x06proto3' ) _globals = globals() @@ -30,8 +30,8 @@ _ALTERTASKREQUEST_SESSIONPARAMETERSENTRY._serialized_options = b"8\001" _TASKRUN_SESSIONPARAMETERSENTRY._options = None _TASKRUN_SESSIONPARAMETERSENTRY._serialized_options = b"8\001" - _globals["_TASKSQLTYPE"]._serialized_start = 5130 - _globals["_TASKSQLTYPE"]._serialized_end = 5164 + _globals["_TASKSQLTYPE"]._serialized_start = 5385 + _globals["_TASKSQLTYPE"]._serialized_end = 5419 _globals["_SCHEDULEOPTIONS"]._serialized_start = 26 _globals["_SCHEDULEOPTIONS"]._serialized_end = 259 _globals["_SCHEDULEOPTIONS_SCHEDULETYPE"]._serialized_start = 175 @@ -79,23 +79,23 @@ _globals["_ALTERTASKRESPONSE"]._serialized_start = 3645 _globals["_ALTERTASKRESPONSE"]._serialized_end = 3747 _globals["_SHOWTASKRUNSREQUEST"]._serialized_start = 3750 - _globals["_SHOWTASKRUNSREQUEST"]._serialized_end = 3943 - _globals["_TASKRUN"]._serialized_start = 3946 - _globals["_TASKRUN"]._serialized_end = 4663 + _globals["_SHOWTASKRUNSREQUEST"]._serialized_end = 4089 + _globals["_TASKRUN"]._serialized_start = 4092 + _globals["_TASKRUN"]._serialized_end = 4809 _globals["_TASKRUN_SESSIONPARAMETERSENTRY"]._serialized_start = 947 _globals["_TASKRUN_SESSIONPARAMETERSENTRY"]._serialized_end = 1003 - _globals["_TASKRUN_STATE"]._serialized_start = 4535 - _globals["_TASKRUN_STATE"]._serialized_end = 4614 - _globals["_SHOWTASKRUNSRESPONSE"]._serialized_start = 4665 - _globals["_SHOWTASKRUNSRESPONSE"]._serialized_end = 4778 - _globals["_GETTASKDEPENDENTSREQUEST"]._serialized_start = 4780 - _globals["_GETTASKDEPENDENTSREQUEST"]._serialized_end = 4863 - _globals["_GETTASKDEPENDENTSRESPONSE"]._serialized_start = 4865 - _globals["_GETTASKDEPENDENTSRESPONSE"]._serialized_end = 4975 - _globals["_ENABLETASKDEPENDENTSREQUEST"]._serialized_start = 4977 - _globals["_ENABLETASKDEPENDENTSREQUEST"]._serialized_end = 5044 - _globals["_ENABLETASKDEPENDENTSRESPONSE"]._serialized_start = 5046 - _globals["_ENABLETASKDEPENDENTSRESPONSE"]._serialized_end = 5128 - _globals["_TASKSERVICE"]._serialized_start = 5167 - _globals["_TASKSERVICE"]._serialized_end = 5909 + _globals["_TASKRUN_STATE"]._serialized_start = 4681 + _globals["_TASKRUN_STATE"]._serialized_end = 4760 + _globals["_SHOWTASKRUNSRESPONSE"]._serialized_start = 4812 + _globals["_SHOWTASKRUNSRESPONSE"]._serialized_end = 5033 + _globals["_GETTASKDEPENDENTSREQUEST"]._serialized_start = 5035 + _globals["_GETTASKDEPENDENTSREQUEST"]._serialized_end = 5118 + _globals["_GETTASKDEPENDENTSRESPONSE"]._serialized_start = 5120 + _globals["_GETTASKDEPENDENTSRESPONSE"]._serialized_end = 5230 + _globals["_ENABLETASKDEPENDENTSREQUEST"]._serialized_start = 5232 + _globals["_ENABLETASKDEPENDENTSREQUEST"]._serialized_end = 5299 + _globals["_ENABLETASKDEPENDENTSRESPONSE"]._serialized_start = 5301 + _globals["_ENABLETASKDEPENDENTSRESPONSE"]._serialized_end = 5383 + _globals["_TASKSERVICE"]._serialized_start = 5422 + _globals["_TASKSERVICE"]._serialized_end = 6164 # @@protoc_insertion_point(module_scope) diff --git a/tests/sqllogictests/suites/task/task_ddl_test.test b/tests/sqllogictests/suites/task/task_ddl_test.test index 678b5c651ab38..fae42ae574ece 100644 --- a/tests/sqllogictests/suites/task/task_ddl_test.test +++ b/tests/sqllogictests/suites/task/task_ddl_test.test @@ -127,6 +127,17 @@ select name, state, session_parameters from system.tasks where name = 'sessionTa ---- sessionTask Suspended {"database":"db2","timezone":"Pacific/Honolulu"} +query I +select run_id from system.task_history where name = 'MockTask' limit 6; +---- +1ftx0 +1ftx1 +1ftx2 +1ftx3 +1ftx4 +1ftx5 + + statement ok DROP TASK mytask