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

# 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.
