Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On In this Pagearticle

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Overview

You can use this Snap to write to a worksheet in a Google sheet.

Note
iconfalse
titleImpact on Migration of API from version 3 to 4:

Enhances the Google Sheets Snap Pack by migrating from version 3 to 4 API as Google announces sunsetting the v3 API on June 8, 2021. For more information, see Migrating Google Sheets Pipelines from V3 to V4.

Image RemovedImage Added

Prerequisites

A valid Google Spreadsheet account. 

Support for Ultra Pipelines

Works in Ultra Pipelines.

Limitations

  • The Snap conforms to the limitations imposed by Google Drive service. A spreadsheet may contain multiple worksheets. The cell count limit applies to the sum of the cells in all the worksheets in a spreadsheet.
  • If the spreadsheet or worksheet to which you want to write contains one or more leading or trailing spaces, the Worksheet Writer Snap does not function as expected:
    • If the spreadsheet name contains leading or trailing spaces, the Snap displays a "Spreadsheet not found" error.
    • If the worksheet name contains leading or trailing spaces, the Snap creates a new worksheet in the target spreadsheet using the worksheet name specified, without the extra space. 
      Workaround: Enclose the names of the spreadsheet and worksheet in quotes (") and enable expressions for both Spreadsheet and Worksheet fields.
  • You cannot create a new Spreadsheet in shared drives using the Worksheet Writer Snap—the spreadsheet can only be overwritten.

  • You cannot write new Spreadsheets to any location except the default location (that is, the user’s root drive).

  • Once a Spreadsheet is available, you can modify and read it irrespective of the location by specifying the sheet name or sheet ID or both.

Known Issue

Multiexcerpt include macro
nameME_GS_KI
pageSpreadsheets Browser

Snap

Input and OutputInput/OutputType of View

Views

TypeFormatNumber of ViewsExamples of Upstream and Downstream SnapsDescription
InputDocument
  • Min:1
  • Max:1
  • Generators (CSV, JSON)
  • Mapper
The name of the worksheet and spreadsheet information to be written to.
OutputDocument
  • Min:0
  • Max:1
  • None
Statistics (Number of records written successfully and number of invalid records.)
Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

Field NameField
Dependency
TypeDescription

Label*

N/A


Default Value: Worksheet Writer
Example
Worksheet Writer

StringSpecify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.

Include Shared Drives


Default Value: Deselected
Example
: Selected

Checkbox

Select this checkbox to write files from the shared drive.

Deselect this checkbox if you do not want the Snap to write files from the shared drive.


Display Spreadsheet ID in Suggestions


Default Value: Deselected
Example: Selected

Checkbox

Select this checkbox to display Spreadsheets ID along with the Spreadsheet name in the Spreadsheets Suggestions list.


Spreadsheet*


Default value: N/A
Example
: My Google Sheet



String/Expression/Suggestion

Specify or select the

name of the spreadsheet

spreadsheet name or ID (or both) containing the worksheet to be written to. If the spreadsheet does not exist, you can type the name of the sheet to be created at the root level (My Drive).


Worksheet*


Default value:

None

N/A
Example
:

My Google Sheet

Worksheet*

N/A

 Sheet1


String/Expression/Suggestion

Specify the name of the worksheet to be written to. If the worksheet does not exist, you can type the name of the worksheet to be created.

Note
  • If you are writing data to an existing worksheet that has a valid header, then the input schema is populated in the target schema of the upstream (Mapper) Snap. This enables you to view the input schema that is available in the worksheet used in the Worksheet Writer Snap. A valid header is one that has unique and non-null values, for instance, as highlighted in the following worksheet :
Image Removed
  • Image Added
    For more information, see the example below.
  • Hidden and Protected sheets are not part of worksheet suggestions. However, you can manually enter the name of the existing worksheet that is hidden or protected to enable the Snap to overwrite based on your account permissions.
    • Worksheets with hidden range appear in the suggestion list.
    • Worksheets with protected range do not appear in the suggestion list.
  • You can view the list of hidden sheets in the Google Sheets UI by clicking View and then selecting Hidden Sheets.
  • You can view the protected ranges in Google Sheets UI by clicking Data and then selecting Protected sheets and ranges.
Default value:  None
ExampleSheet1


Overwrite worksheet if it exists

N/A


Default Value: Not selected

Checkbox

Select this checkbox to overwrite existing information if the worksheet exists.


Write header row


Default

value

Value:

Not selectedWrite header rowN/AN/A

Selected

Checkbox

Select this checkbox if the row containing column names should be written to the worksheet.

Default value: SelectedParse data



Parse data


Default value: RAW

ExampleUSER_ENTERED

Expression/Dropdown list

Specify whether the input value must be preserved or parsed. Available options are:

  • RAW: The input is not parsed and is inserted as a string. For example, "=1+2" places the string "=1+2" in the cell, not the implied result.
  • USER_ENTERED: The input is parsed exactly as if it were entered into the Google Sheets UI. For example, "Mar 1 2016" becomes a date, and "=1+2" becomes a formula. Formats may also be inferred; so "$100.15" becomes a number with currency formatting.

Default value: RAW

Number of Retries

N/A


Default value: 3
Example
: 5

Integer/Expression

Specify the maximum number of retry attempts that the Snap must make to write into the worksheet.


Retry Interval (seconds)


Default value:

3

1
Example
:

5Retry Interval (seconds)N/A

4

Integer/Expression

Specify the time interval in seconds for each retry attempt.

Default value: 1

Example: 4
Configure


Connection properties
N/A
Use this field set to configure the connection properties to specify the read and connection timeouts.

Read timeout in seconds

N/A


Default value:180
Example
: 190

Integer/Expression

Specify the time limit in seconds for the Snap to read the data. If this limit is crossed, the Snap skips to the next batch of records.


Connection timeout in seconds


Default value:

 180N/A

20
Example
:

190
Connection timeout in seconds

10

Integer/Expression

Specify the time in seconds. In the event of a connection failure, the Snap stops a connection attempt after the specified time. For example, if the HTTP timeout is set to 30 seconds, and the Snap fails to establish a connection until 30 seconds, the pipeline logs a timeout exception and aborts execution.


Snap Execution


Default value:

20

Execute only
Example
:

10
Snap ExecutionN/A

Validate & Execute

Dropdown list
Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute

Example

Populating Target Schema in an Upstream Snap

The following example Pipeline demonstrates the population of target schema in the upstream Mapper Snap when the data is written to an existing worksheet using the Worksheet Writer Snap.

Image Modified

First, we configure the Worksheet Writer Snap to write the data on an existing worksheet.
Image RemovedImage Added

Next, we configure the Mapper Snap to map the fields to the respective columns using the fields from the Target Schema. Note that the headers and the respective data types are populated (highlighted below) in the Target Schema.

Image Modified

Download this Pipeline.

Attachments
patterns*.slp, *.zip

Insert excerpt
Google Sheets Snap Pack
Google Sheets Snap Pack
nopaneltrue