Google Sheets Destination Component

The Google Sheets Destination Component is an SSIS data flow pipeline component that can be used to write data to Google Sheets. There are three pages of configuration:

  • General
  • Columns
  • Error Handling

The General page is used to specify general settings for the Google Sheets Destination component. The Columns page is used to manage columns from the upstream component. The Error Handling page allows you to specify how errors should be handled when they occur.

General page

The General page allows you to specify general settings for the component.

SSIS Google Sheets Destination Component

Connection Manager

The Google Sheets Destination Component requires a connection. The Connection Manager drop-down will show a list of connection managers that are available.

Action

There are six options available:

  • SPREADSHEETS.SHEETS.VALUES - APPEND: choose this option to append values to a spreadsheet.
  • SPREADSHEETS.SHEETS.VALUES - UPDATE: choose this option to set values in a range of a spreadsheet.
  • SPREADSHEETS.SHEETS.VALUES - CLEAR: choose this option to clear the value from a spreadsheet.
  • SPREADSHEETS.SHEETS.VALUES - COPYTO: choose this option to copy a single sheet from a spreadsheet to another spreadsheet.
  • SPREADSHEETS - CREATE: choose this option to create a spreadsheet in Google Sheets, the input column should be an instance of spreadsheet in JSON format.
  • SPREADSHEETS - BATCH UPDATE: choose this option to apply one or more updates to the spreadsheet, the input column should be a spreadsheet request in JSON format
Worksheet

Specify the Worksheet in the Google Sheets you want to work with.

First row has column names

Select this option if you would like the first row to contain column names.

Value Input Option

The Value Input Option allows you to specify how input data should be interpreted. There are two options available:

  • RAW - values will not be parsed and will stored as-is in spreadsheet.
  • USER ENTERED - values will be parsed as if you type them into the UI. It follows the same rules that are applied when entering text into a cell via the Google Sheets UI.
Insert Data Option

The Insert Data Option specify how input data should be inserted. There are two options available:

  • OVERWRITE: the new data will overwrite existing data in the areas it is written.
  • INSERT_ROWS: rows will be inserted for the new data.
Batch Size

The Batch Size option allows you to specify how many rows to be sent per service call. Use 0 to send all rows in one service call.

Start from Column

The Start from Column option allows you to specify the starting column to write to.

Start from Row

The Start from Row option allows you to specify the starting row to write to.

Specify End Row

The Specify End Row option allows you to determine whether you want to specify an end row.

Refresh Component Button

Clicking the Refresh Component Button will bring up a prompt for you to confirm the refresh. After clicking “Yes”, it will remove any existing columns and add all columns from the selected Worksheet.

Reset Columns Button

Clicking the Reset Columns button will bring up a prompt for you to confirm the reset. After clicking “Yes”, it will remove any existing columns and replace them with that of the Input Columns.

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 Button

Clicking the fx button to launch SSIS Expression Editor to enable dynamic update of the property at run time.

Generate Documentation Button

Clicking the Generate Documentation button to generate a Word document which describes the component's metadata including relevant mapping, and so on.

Columns page

The Columns page of the Google Sheets Destination Component allows you map the columns from upstream components to the Google Sheets Fields.

In the Columns page, you would see a grid that contains four columns as shown below.

SSIS Google Sheets Destination Component - Columns Page

  • Input Column: You can select an input column from an upstream component for the corresponding Google Sheets Field.
  • Google Sheets Field: The field that 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.
  • Properties window for the field listed. These value are configurable:
    • Name: Specify the Column name.
    • Data Type: The data type can be changed according.
    • Length: if the data type specified is a string, the length specified here would be the maximum size. If the data type is not a string, the length will be ignored.
    • Precision: Specify the number of digits in a number.
    • Scale: Specify the number of digits to the right of the decimal point in a number.
    • CodePage: Specify the Code Page of the field.
  • + sign: Add field to Excel File
  • - sign: Remove field from Excel File
  • Arrows: Move the fields to a desired location in the file.

Error Handling page

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

SSIS Google Sheets Destination Component - 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 write to the Google Sheets will be redirected to the ‘Error Output’ output of the Destination Component. As indicated in the screenshot below, the blue output connection represent rows that were successfully written, and the red ‘Error Output’ connection represents rows that were erroneous. The ‘ErrorMessage’ output column found in the ‘Error Output’ may contain the error message that was reported by server or the component itself.

SSIS Google Sheets Destination Component - Error Output