Database Writeback
With database writeback tasks, you can very easily write data from SQL query results, API responses, or CSV files into your database.
Prerequisites: You need to have at least one database connection configured in order to use this task.
The database user must have permission to create and modify tables in the specified schema.
The database user must have permission to create and modify tables in the specified schema.
Creating a Writeback Task
The Writeback task provides a simple way to create new tables, as well as updating existing ones without having to write your own CREATE TABLE or INSERT statements.
It takes the following inputs:
- Source: At the moment, you can use any SQL query result, as well as Tableau CSV exports as sources for a writeback task. More options are coming soon.
- Destination: A SQL database connection where the destination table is located. Connection must allow creating / updating tables.
You can use a PRIVATE Google Sheets SQL connection to export data into Google Sheets. - Schema & Table: the destination schema and table that the data will be written to.
- Method:
Append
orOverwrite
- defines whether the source data should be appended as rows to an existing table or if existing data should be overwritten.
Existing vs. New Destination Tables
- If the destination table doesn't exist, it will be created.
- If method is
Append
and the destination table exists, data format (column names, data types) of source data must match the destination schema. - If method is
Overwrite
and the source data has a different format than the existing table, the schema of the source data will be applied.