{{ transformations:BulkExportDBAction.png}}
====== BULK EXPORT TO DATABASE ======
Category: Export / Database\\
\\
=====Description=====
This action performs fast export into a database table using the native bulk load
capabilities of the target database. The action is intended for exporting large volumes of data (e.g. millions of rows or more) and may not be efficient on small datasets (e.g. with a few hundred rows).
Currently, the following database types are supported:
^ Database type ^ Driver type ^
| BigQuery | ODBC |
| Microsoft SQL Server | Native |
| Oracle (experimental) | Native |
| PostgreSQL | Native |
| Snowflake | Native / ODBC |
A configured connector of the appropriate type is required.
\\
=====Action settings=====
^Setting ^Description ^
|Database type|Select the type of database. Options: //BigQuery//, //SQL Server//, //Oracle//, //PostgreSQL//, or //Snowflake//.|
|Connector*|Select or create a configured connector matching the //Database type// chosen above.|
|Table name*|Select the table to export to. Click the //refresh// button if the table list does not automatically populate, or needs to be updated.|
|Column mapping |Select the method for mapping the dataset columns to the fields in the database table.\\ Options: //Automatic// (export to database columns with the same names) or //Explicit// (manually map the dataset\\ columns on the left to the database fields on the right; use the "Map possible" link to auto-select matching field names).|
* Setting can be specified using a [[:parameters|parameter]].\\
\\
====Microsoft SQL Server advanced options====
^Option ^Description ^
|Check constraints|Without this option, any CHECK and FOREIGN KEY constraints are ignored, and after the operation, the\\ constraint on the table is marked as //not trusted//. UNIQUE and PRIMARY KEY constraints are always enforced.\\ [[https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-ver15#check_constraints|More on this option...]]|
|Table lock|This option specifies that a table-level lock is acquired for the duration of the bulk-import operation. A table can\\ be loaded concurrently by multiple clients if the table has no indexes and table lock (TABLOCK) is specified.\\ [[https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-ver15#tablock|More on this option...]]|
\\
=====See also=====
* [[transformations:sqlcommand|Database command]]
* [[transformations:exportdb|Export to database]]
* [[transformations:updatedb|Update database table]]