# Insert Table

<figure><img src="/files/lNSr4dcR8PRcf7k6Cicl" alt=""><figcaption></figcaption></figure>

The **Insert Table** task in Gaio DataOS allows you to **copy or migrate data** from one table to another.\
It is especially useful for building ETL processes, versioning datasets, or consolidating information from multiple sources.

***

## How to Use

Follow the steps below to insert data from a source table into a target table:

***

### 1. **Open the Insert Table Task**

* In the **Studio**, go to the **Tasks** panel.
* Under the **ETL** section, select **Insert table**.

***

### 2. **Define Source and Target Tables**

* **Source Table**: Choose the table from which the data will be extracted (e.g., `sales`).
* **Target Table**: Select or type the name of the table where the data should be inserted (e.g., `new_sales`).

If the target table does not exist, you must create it beforehand using the **Create Table** task.

***

### 3. **Map Columns**

* The system will automatically try to match columns by name.
* You can:
  * Use **Auto fill** to quickly populate matching fields.
  * Adjust each **Source column → Target column** mapping manually using the dropdowns.
  * Use **Clear fields** to reset all mappings.

{% hint style="warning" %}
Ensure data types are compatible to avoid insertion errors.
{% endhint %}

***

### 4. **Review and Save**

* After mapping all necessary columns:
  * Click **Save** to store the task.
  * Or **Save and run** (if available) to execute the task immediately.

***

#### Use Cases

* Syncing data between tables in a flow
* Creating clean copies of working datasets
* Backing up raw data before transformations
* Aggregating or partitioning records

***

#### Best Practices

* Use descriptive task labels to identify the insert operation in your flow.
* Always validate column mappings before running the task.
* Combine with filtering or transformation steps if needed before insertion.


---

# 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/insert-table.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.
