Using the PrestoDB Destination Component

The PrestoDB Destination component is an SSIS data flow pipeline component that can be used to write data to a PrestoDB instance. There are three pages of configuration:

  • General
  • Columns
  • Error Handling

General Page

The General page of the PrestoDB Destination Component allows you to specify the general settings of the component.

PrestoDB Destination

Connection Manager

The PrestoDB Source Component requires a PrestoDB connection manager.

Catalog

The Catalog drop-down menu displays a list of available catalogs in the PrestoDB instance defined in the Connection Manager. Selecting a catalog here will automatically populate the Schema drop-down list.

Schema

The Schema drop-down menu displays a list of available Schemas in the previously selected PrestoDB catalog. Selecting a schema here will automatically populate the Table drop-down list.

Table

The Destination Table drop-down menu displays a list of available tables from the schema specified in the previously selected catalog schema.

Action

The command you want to execute on the Table. Available actions include:

  • Insert: Add records to the Table
  • Update: Update existing records in the Table
  • Delete: Delete existing records from the Table
Batch Size

The Batch Size option allows you to specify how many records you want to send to the target database server at a time. The default value is 0 meaning SSIS buffer size will be used.

Map Unmapped Fields Button

By clicking this button, the component will try to map any unmapped attributes by matching their names with the input columns from upstream components.

Clear All Mappings Button

By clicking this button, the component will reset (clear) all your mappings in the destination component.

Expression fx Icon

Click the blue fx icon to launch SSIS Expression Editor to enable dynamic updates of the property at run time.

Generate Documentation Icon

Click the Generate Documentation icon to generate a Word document that describes the component's metadata including relevant mapping, and so on.

Columns Page

The Columns page of the PrestoDB Destination Component allows you to map the columns from upstream components to fields of the specified Destination Table in the General Page. The Columns Page is not available when the selected action is Custom Command.

PrestoDB Destination - Columns

  • Input Column: Select an Input Column from an upstream component here.
  • PrestoDB Field: This is the field you are writing data to.
  • Data Type: This column indicates the type of value for the current field.
  • Unmap: This column can be used to unmap the field from the upstream input column, or otherwise it can be used to map the field to an upstream input column by matching its name if the field is not currently mapped.

Error Handling Page

The Error Handling page allows you to specify how errors should be handled when they happen.

PrestoDB Destination - Error Handling

There are three options available.

  1. Fail on error
  2. Redirect rows to error output
  3. Ignore error

When the Redirect rows to error output option is selected, rows that failed to be sent will be redirected to the 'Error Output' output of the Transformation Component. As indicated in the screenshot below, the blue output connection represents rows that were successfully sent, and the red 'Error Output' connection represents erroneous rows. The 'ErrorMessage' output column found in the 'Error Output' may contain the error message that was reported by the server or the component itself.

PrestoDB Destination - Redirect outputs

Note: Use extra caution when selecting Ignore error option, since the component will remain silent for any errors that have occurred.

Note: When there is an error during the execution of the Post Command, the component will always fail by reporting an error even though the Error Handling option may have been chosen otherwise.

In the Error Handling page, there is also an option that can be used to enable Output Bulk Copy Information To Log During Runtime.

It also has options to enable or disable the following output fields for the destination component's Default Output.

  • _AffectedRows: Reports the number of affected rows for the SQL script executed for each incoming row. This option is not available when the Bulk mode is used.