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. If you have several SQL integrations configured, this step will use the last one you added. 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¶
integration: string
ID of the integration you'd like to use.
table_name: string
The name of the table you want to upload data to.
if_exists: string = "fail"
The preferred method for handling existing tables. - 'Fail' if there is another table with the same name. The default value is 'fail' to prevent you from accidentally losing your data or compromising a table's structure in your database. - 'Replace' if you want to override the existing table. Keep in mind this option deletes your previous data. - 'Append' if you want to append the dataset's rows to the table.
Must be one of:
"fail"
,
"replace"
,
"append"