Insert into database
Description
The Insert into Database activity allows you to insert rows of data into a table within a relational database. You can either specify the columns to map manually or rely on automatic matching between input data columns and database table columns.
This activity supports dynamic table creation (if the table does not exist), as well as optional column transformations before insertion.
Use this activity to:
- Store transformed or cleaned data into SQL-compatible databases
- Automate bulk inserts to support data warehousing and ETL
- Conditionally create a table and populate it with relevant rows
Use case:
After parsing CSV data and cleaning it usingGroupLongtailValues
, use this activity to load the processed records into a PostgreSQL or MySQL table. If the destination table does not exist, enable the auto-create option to generate it based on the incoming schema.
Input
Input Type | Format |
---|---|
Data | Required |
Output
Updated data in the database
Configuration Fields
Field Name | Description |
---|---|
Connection | Select the connection to the target database (e.g., PostgreSQL, MySQL, MSSQL). Required for authentication. |
Table | The name of the table where data will be inserted. |
Create Table If Not Exists | If enabled, the table will be automatically created based on input schema if it doesn’t already exist in the database. |
Column Map | Map input columns to target database columns. You can also apply transformations before insertion. Note: target column names must match the schema. |
Sample Input
Country | Gender | Company |
---|---|---|
Japan | Male | Hirthe and Sons |
Japan | Female | Sipes Group |
France | Male | K Mart |
Brazil | Male | Miller Inc |
Brazil | Male | Roob and Sons |
Sample Configuration
Field | Value |
---|---|
connection.id | prod-postgres-db |
table | customer_demographics |
createTableIfNotExists | true |
columnMap | Country → Country |
Sample Output
Data inserted into the database
India |
---|
Japan |
Japan |
France |
Brazil |
Brazil |