Skip to content

docs: add docs for EEFeature 'PRIVATE TASK' #2521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: Automating Data Loading with Tasks
sidebar_label: Task
---

A task encapsulates specific SQL statements that are designed to be executed either at predetermined intervals, triggered by specific events, or as part of a broader sequence of tasks. Tasks in Databend Cloud are commonly used to regularly capture data changes from streams, such as newly added records, and then synchronize this data with designated target destinations. Furthermore, tasks offer support for [Webhook](https://en.wikipedia.org/wiki/Webhook) and other messaging systems, facilitating the delivery of error messages and notifications as needed.
A task encapsulates specific SQL statements that are designed to be executed either at predetermined intervals, triggered by specific events, or as part of a broader sequence of tasks. Tasks in Databend are commonly used to regularly capture data changes from streams, such as newly added records, and then synchronize this data with designated target destinations. Furthermore, tasks offer support for [Webhook](https://en.wikipedia.org/wiki/Webhook) and other messaging systems, facilitating the delivery of error messages and notifications as needed.

## Creating a Task

This topic breaks down the procedure of creating a task in Databend Cloud. In Databend Cloud, you create a task using the [CREATE TASK](/sql/sql-commands/ddl/task/ddl-create_task) command. When creating a task, follow the illustration below to design the workflow:
This topic breaks down the procedure of creating a task in Databend. In Databend, you create a task using the [CREATE TASK](/sql/sql-commands/ddl/task/ddl-create_task) command. When creating a task, follow the illustration below to design the workflow:

![alt text](/img/load/task.png)

Expand Down Expand Up @@ -89,13 +89,16 @@ SET age = age + 1;

## Viewing Created Tasks

To view all tasks created by your organization, log in to Databend Cloud and go to **Data** > **Task**. You can see detailed information for each task, including their status and schedules.
To view all tasks created by your organization, log in to Databend and go to **Data** > **Task**. You can see detailed information for each task, including their status and schedules.

To view the task run history, go to **Monitor** > **Task History**. You can see each run of tasks with their result, completion time, and other details.

## Configuring Notification Integrations

Databend Cloud allows you to configure error notifications for a task, automating the process of sending notifications when an error occurs during the task execution. It currently supports Webhook integrations, facilitating seamless communication of error events to external systems or services in real-time.
Databend allows you to configure error notifications for a task, automating the process of sending notifications when an error occurs during the task execution. It currently supports Webhook integrations, facilitating seamless communication of error events to external systems or services in real-time.
:::caution
Supported only in Databend Cloud
:::

### Task Error Payload

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import FunctionDescription from '@site/src/components/FunctionDescription';

The CREATE TASK statement is used to define a new task that executes a specified SQL statement on a scheduled basis or dag based task graph.

**NOTICE:** this functionality works out of the box only in Databend Cloud.

## Syntax

```sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import FunctionDescription from '@site/src/components/FunctionDescription';

The ALTER TASK statement is used to modify an existing task.

**NOTICE:** this functionality works out of the box only in Databend Cloud.

## Syntax

```sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import FunctionDescription from '@site/src/components/FunctionDescription';

The DROP TASK statement is used to delete an existing task.

**NOTICE:** this functionality works out of the box only in Databend Cloud.

## Syntax

```sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import FunctionDescription from '@site/src/components/FunctionDescription';

The EXECUTE TASK statement is used to execute an existing task manually

**NOTICE:** this functionality works out of the box only in Databend Cloud.

## Syntax

```sql
Expand Down
6 changes: 6 additions & 0 deletions docs/en/sql-reference/10-sql-commands/00-ddl/04-task/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
title: Task
---

import EEFeature from '@site/src/components/EEFeature';

This page provides a comprehensive overview of task operations in Databend, organized by functionality for easy reference.
<EEFeature featureName='PRIVATE TASK'/>
:::note
Databend Cloud does not require this feature
:::

## Task Management

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ TASK_HISTORY(
[, ROOT_TASK_ID => '<string>'] )
```



## Arguments

:::note
When the Private Task feature is enabled, Arguments are not supported.
:::

All the arguments are optional.

`SCHEDULED_TIME_RANGE_START => <constant_expr>`, `SCHEDULED_TIME_RANGE_END => <constant_expr>`
Expand Down
Loading