BulkImport

BulkImport efficiently copies a large number of rows into a MySQL database table.

This function creates an Import object in its execution path. Use the SetValue function to add the rows that you want to insert. See the example below.


Properties

Connection string

The connection string that specifies how to connect to the database.

Table

The name of the destination table.

Click on the ... icon to open the Editor.

Connection string

The connection string that specifies how to connect to the database.

Table

Select the relevant table to copy to.

Columns

Lists the columns in the selected table.


Example

Suppose you have a CSV file with many records to load into a database table. Using the BulkImport function, as shown below, runs significantly faster than using the more generic ExecuteSQL function.

Steps:

  1. From the MySQL plugin, drag the BulkImport function onto the design canvas.

  2. Set the BulkImport properties (see above for details).

  3. From the File plugin, drag the TextFileRead function onto the design canvas (nested below your BulkImport function).

  4. Set the TextFileRead properties to read each row from the source file for the destination database, defining the fields to assist with target mapping.

  5. Drag the SetValue function from the Linx plugin onto the design canvas, nested below the TextFileRead function.

    Bulk Import Example
  6. Set the Target property of the SetValue function to BulkImport.Import.Write.

    Bulk Import Example
  7. Then click the Set Fields editor button next to the Source property to assign the values to the table's columns.

    Bulk Import Example

Last updated