> For the complete documentation index, see [llms.txt](https://docs.gaiodataos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gaiodataos.com/tools/tasks/etl/delete.md).

# Delete

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2FZohRbInOoZVP1BE8phTE%2FCaptura%20de%20Tela%202025-05-28%20a%CC%80s%2017.41.09.png?alt=media&amp;token=419b2493-5b8f-47c4-97a3-1bed32f2e9f8" alt=""><figcaption></figcaption></figure>

The **Delete** task in **Gaio DataOS** allows you to remove records from a table based on custom filter conditions. It is useful for cleaning outdated, inconsistent, or temporary data as part of automated ETL flows.

{% hint style="warning" %}
**Important:** This task can only be used when a table is selected in the flow. Be sure to add and connect a Table before configuring the deletion.
{% endhint %}

***

## How to Use

### **1. Add and Select a Table Block**

* In your flow, add a **Table** with the dataset you want to work with.
* Select the table as input for the Delete task.

***

### **2. Open the Delete Task**

* In the left-side menu, go to:\
  **Tasks > ETL > Delete**

***

### **3. Fill Out Task Information**

* **Task label**: (optional) A descriptive name for the step.
* **Table**: Will be automatically filled based on the selected table (e.g., `new_sales`).

***

### **4. Set Filter Conditions**

* In the **Filters** section, define one or more conditions to specify **which rows should be deleted**.
* For each filter, configure:

| Field        | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| **Column**   | Choose the column to filter by (e.g., `order_id`)                      |
| **Type**     | Input type: `Value`, `Parameter`, etc.                                 |
| **Operator** | Comparison operator (`Equal to`, `Not equal to`, `Greater than`, etc.) |
| **Value**    | The value to compare against                                           |

**Example:**\
Delete rows from the `new_sales` table where `order_id` is equal to `1001`.

***

### **5. Execute or Save**

* **Run**: Immediately performs the deletion (without saving the task).
* **Save**: Saves the task to the current flow.
* **Save and Run**: Saves and immediately executes the deletion.

***

#### Use Cases

* Remove invalid or duplicate records
* Delete temporary test data
* Automate cleanup logic based on business rules
* Ensure data consistency before or after processing

***
