Importing databases

The Database Import action allows you to copy data from one database table to another. The tables can be from the same or different database connections. The target table can be a new or existing table. You can:

  • Select the fields to be transferred
  • Use a filter to specify the rows to be transferred
  • Limit the number of rows transferred
    • A maximum number of rows
    • A percent of rows
  • When using an existing table as the output, use field mapping to map output fields to the existing table structure

  1. Use the Configuration tab to drag from Table Fields to filter imported records.

  2. Use the Mapping tab to define mapping between input and output schemas, set primary key and auto-increment options.

  3. Set limit on number of imported records.

  4. Preview resulting filtered data or SQL statement.

Possible applications include:

  • Map records to an external data model
  • Extract a random sample of source data for testing
  • Transfer records from one database connection to another
  • Make a copy of an existing table on the same connection

Import a database

  1. Drag the Database Import icon onto the design surface.
  2. On the Connections tab , enter a Name and a Description to identify the action, then specify the input and output data source options:

    Input -

    • For Database Connection, select the database from which data is being imported, or choose New Database Connection to establish a new connection to another database.
    • For Table Name, elect the table containing the data. To quickly locate the table in a long list of tables, begin typing characters to list only those that match the characters you enter.

    Output -

    • For Database Connection, select the database (can be same as input database or a different connection) to which the table is being imported, and then enter or select a Table Name depending on the Output Mode you choose -

      • For Create/overwrite a table, enter the name of the table being created or overwritten, and indicate whether to delete the table after the macro or workflow containing this action is executed.
      • For Use an existing table, select the table to be used from the drop-down, and indicate whether rows in the existing table should be deleted prior to import. Note that you may be required to map data columns if the input and output table schemas are different.
    • If the table is being output to the same database, select Use fast table copy to perform an internal copy of the table and minimize import time.
  3. On the Configuration tab , indicate how the data is mapped between workspaces:
    • Select Row Maximum – Enter a value to limit the imported records to a specific number.
    • Select Row Percentage – Enter a value to limit the imported records to a specific percentage of the total records, such as 50 to import 50% of the records. The records are randomly sampled at approximately the percentage specified.
    • To more narrowly define the records for which the import applies, open the Filter area and build the necessary expression by dragging icons from the Table Fields area. Refer to Filters for more information.
  4. On the Mapping tab , display the schemas for the Source (input) and destination (output) database tables, and make any necessary changes to the output database tables. Refer to Field Mapping for more information..
  5. If the Performance tab is enabled in User Preferences, you can optionally change certain execution settings specific to this action. Refer to Change general preferences for additional information.

Last modified: Thursday December 19, 2024

Is this useful?