# Delete

<figure><img src="/files/er1uBOBa0JguLJChOMKw" 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

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gaiodataos.com/tools/tasks/etl/delete.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
