Skip to content

Export to sql

Export a given dataset to a specified SQL database.

This step uploads the given dataset to a table identified by the name provided in this step's parameters. This table either exists already or it's going to be created in the SQL database configured in your SQL integration. Further customization such as entry or table overwriting behavior can be achieved through parameters.

Usage

The following are the step's expected inputs and outputs and their specific types.

export_to_sql(ds: dataset, {"param": value})

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.

Inputs


ds: dataset

Dataset to be uploaded.

Parameters


table_name: string

The name of the table you want to upload data to.


if_exists: string = "fail"

Configures this step's behaviour in case the table already exists. If you want to override the existing table you can use replace, but keep in mind this deletes your previous data. Otherwise if your desired outcome is to append the dataset's rows to the table you can use append.

The default value is set to fail to prevent you from accidentally losing data or compromising a table's structure in your database.

Must be one of: "fail", "replace", "append"