transformations:exportdb
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
transformations:exportdb [2017/05/01 23:11] – created dmitry | transformations:exportdb [2021/02/12 07:02] – dmitry | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Export into database table ===== | ===== Export into database table ===== | ||
- | Exports current dataset into database table which name is specified either explicitly or using a [[: | + | Exports |
- | Export is performed using SQL INSERT statements by batches of 10 or 100 or 1000 rows. Exporting in bigger batches can be slightly faster on narrow tables (i.e. tables with few fields). For wide tables (i.e. table with hundreds of fields) or when fields contain long strings use smaller batches. | + | Note that the operation |
- | + | ||
- | The operation | + | |
- | Note that the operation effectively // | + | ===Performance=== |
+ | Under the hood, the exporting is performed using SQL INSERT statements by batches of 10, 100, 1'000, or 10' | ||
- | Some databases have performance bottleneck for batches of SQL INSERT statements which may lead to slow performance (especially on wide tables). Consider using bulk load statements | + | Some databases have a performance bottleneck for batches of SQL INSERT statements which may lead to slow performance (especially on wide tables). Consider using the [[transformations: |
+ | |||
+ | ===Data type conversion=== | ||
+ | Exporting will convert cell values only in the following cases: | ||
+ | |||
+ | * Boolean cell to a numeric column exported as 1 (TRUE) or 0 (FALSE) | ||
+ | * Numeric cell to a date or a date/time column - the cell value is converted to a date or a date-time literal according to the SQL dialect of the target database | ||
+ | * Any cell to a text column or a column of unknown type is exported as a text literal | ||
+ | * Error cells are always exported as NULL | ||
+ | |||
+ | In all the other cases when the cell type doesn’t match the target column type either a NULL value is exported, or the exporting fails, depending on action settings. | ||
+ | |||
+ | ===Error capture=== | ||
+ | |||
+ | The action has an option "When exporting a batch fails" that specifies behavior in case a batch of rows fails to export. | ||
+ | |||
+ | ^ Error capture mode ^ Behavior | ||
+ | | Halt execution, roll back already exported batches | ||
+ | | Add new column to flag rows in batches that fail | A new column labelled " | ||
+ | |||
+ | ===See also=== | ||
+ | |||
+ | * [[http:// | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[transformations: |
transformations/exportdb.txt · Last modified: 2023/10/14 16:20 by craigt