Google Sheets Reader

In this article

Overview

You can use Google Sheets Reader Snap to read a worksheet from the specified spreadsheet.

Impact on Migration of API from v3 to v4:

Snap Type

Google Sheets Reader Snap is a READ-type Snap that reads a worksheet in the given spreadsheet.

Prerequisites

A valid Google Spreadsheet account. 

Support for Ultra Pipelines

Works in Ultra Pipelines.

Limitations

  • If the spreadsheet or worksheet that you want to read contains one or more leading or trailing spaces, the Google Sheets Reader Snap displays an error.
    Workaround: Enclose the names of the spreadsheet and worksheet in quotes (") and enable expressions for both Spreadsheet and Worksheet fields. For example, "Sheet 1."
  • If you select Preserve Data Types and name the worksheet similar to the Google spreadsheet column-row range; for example, AB123, then you may receive a bad request error.
  • When you provide a Spreadsheet ID to fetch data, and if a Spreadsheet with the same ID already exists as the Spreadsheet name, then the Google Sheets Reader Snap fails to fetch the data of the specified Spreadsheet ID. The Snap fails with an error: Failed to read the worksheet '<spreadsheetID>' in the spreadsheet. Hence, if you want to fetch data of the specified Spreadsheet ID, ensure that you specify a unique SpreadsheetName or SpreadsheetName with Spreadsheet ID.

  • Inputs without any format restrictions are accepted when the expression toggle is enabled and a Pipeline parameter is provided for the following fields:
    • Number of Retries
    • Retry Interval
    • Read timeout in seconds
    • Connection timeout in seconds
  • For an expression input, the value is evaluated and accepted if it meets the expression criteria; if not, then the default value is used.

Known Issue

long-standing bug​ in the Google Sheets endpoint does not allow the use of a colon ':' in the worksheet names; hence, these inputs are not supported.

Snap Views

TypeFormatNumber of ViewsExamples of Upstream and Downstream SnapsDescription
InputDocument
  • Min:0
  • Max:1
  • None
The name of the worksheet to be read, including the base folder and spreadsheet information.
OutputDocument
  • Min:1
  • Max:1
  • File Writer
  • Transform Snap

The data of the specified worksheet.

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 Name

Field Type

Description


Label*


Default NameGoogle Sheets Reader
Example
Read Sheet1


String

Specify a unique and meaningful name for the Snap.


Include Shared Drives


Default Value: Deselected
Example:
Selected

Checkbox

Select this checkbox to read files from the shared drive.

Deselect this checkbox if you do not want the Snap to read 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: [None]
Example:
My Google Sheet

String/Expression/Suggestion

Specify the name of the spreadsheet containing the worksheet to be read. Alternatively, click the Suggestion  icon to populate the list of spreadsheets associated to the account and select the required spreadsheet.


Worksheet*


Default Value: None
Example
Sheet 1


String/Expression/Suggestion

Specify the name of the worksheet to be read. Alternatively, click the Suggestion  icon to populate the list of worksheets associated to the account and select the required worksheet.

  • Hidden and Protected sheets are not a 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.

Header exists


Default ValueSelected
Example
Deselected

Checkbox

Select this checkbox if the worksheet's first row is a header. 


Preserve data types


Default ValueDeselected
Example: Selected

Checkbox

This Snap converts all input data types to strings. Select this check box to preserve the data type of the data coming into this Snap.

We recommend that you deselect this checkbox if the file to be read is large (more than 50K rows in one sheet), as it makes the Snap read the data faster.

Allow empty rows

Default ValueDeselected
Example: Selected

Checkbox


Google Sheets Reader Snap fetches only those rows that have data and ignores the empty rows. Select this checkbox to fetch empty rows between the rows that contain data.

Number of Retries


Default Value: 3
Example: 3

Integer/Expression

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


Retry Interval (seconds)


Default Value: 1
Example: 1

Integer/Expression

Specify the time interval in seconds for each retry attempt.


Connection properties

Read timeout in seconds


Default Value: 180
Example: 100

Integer/Expression

Specify the time in seconds. In the event of a connection failure, the Snaps stops trying to read the data after the specified time.


Connection timeout in seconds


Default Value
: 20 
Example
: 10

Integer/Expression

Specify the time in seconds. In the event of a connection failure, the Snaps 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: Validate & Execute 
Example: Execute Only

Dropdown list

Select one of the following three modes in which the Snap executes:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.


Snap Pack History

 Click to view/expand


ReleaseSnap Pack VersionDateTypeUpdates
August 2024438patches27861 Latest

Added the Google Sheets - Google Service Account to connect Google Sheets Snaps with data sources that use Google Service Account.

August 2024main27765 StableUpdated and certified against the current SnapLogic Platform release.
July 2024437patches27197 LatestFixed an issue with the Google Sheets Writer Snap where using cell names as worksheet names caused incorrect data writing behavior.
May 2024main26341 StableUpdated and certified against the current SnapLogic Platform release.
February 2024main25112 StableUpdated and certified against the current SnapLogic Platform release.
November 2023main23721 StableUpdated the Google Spreadsheet Snap Pack and Snap names to Google Sheets.
August 2023main22460 StableUpdated and certified against the current SnapLogic Platform release.

May 2023

main21015 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023main19844 StableUpgraded with the latest SnapLogic Platform release.
November 2022main18944 StableUpgraded with the latest SnapLogic Platform release.
August 2022main17386 Stable
  • The Allow empty rows checkbox in the Worksheet Reader Snap allows you to output empty rows. Select this checkbox to include empty rows between other rows that contain data.

  • The Worksheet Writer Snap supports expressions for the Starting Cell Reference field. This Snap also includes a warning about potential overwriting of existing data for the Starting Cell Reference field when writing data in the same range of cells.

4.29429patches16975 Latest
  • Fixed an issue with the Worksheet Writer Snap where the Snap failed to write data correctly after each batch write. When the Write Mode is Create New Worksheet and Overwrite worksheet if it exists checkbox is selected, the cell data is shifted by five columns to the right after each batch in the resulting worksheet. Now, the data is written correctly in the worksheet.
  • Introduced the following Snaps:

4.29main15993 Stable
  • Enhanced the Spreadsheets Browser, Worksheet Reader, and Worksheet Writer Snaps with the Include Shared Drives checkbox to support working with the Google Shared Drives.

  • Enhanced the Worksheet Reader and Worksheet Writer Snaps with the Display Spreadsheet ID in Suggestions checkbox. You can select this checkbox to display both spreadsheet ID and the spreadsheet name in the suggestions. This helps you to choose among the spreadsheets having the same name.

  • Enhanced the Worksheet Writer Snap with the Write Mode dropdown list to perform the desired write option for the given worksheet—that is either create a new worksheet or append or edit an existing worksheet. You can write new data to the worksheet by specifying a cell reference as the starting point or append data to the worksheet at the last row in the worksheet containing content.

4.28 Patches428 patches14755 Latest
  • Enhanced the Spreadsheet Browser Snap with the Fetch Mode dropdown list. You can fetch:

    • Spreadsheets and worksheets within that Spreadsheet, or

    • Only Spreadsheets.

4.28main14627 StableUpgraded with the latest SnapLogic Platform release.

4.27

main12833

 

Stable

Upgraded with the latest SnapLogic Platform release.
4.26main11181 LatestEnhanced the Worksheet Writer Snap to populate the target schema preview with headers and associated data types (when the data is written to an existing worksheet with a valid header) in the upstream Snap.
4.25main9554
 
Stable

Upgraded with the latest SnapLogic Platform release.

4.24main8556
StableUpgraded with the latest SnapLogic Platform release.
4.23 Patch423patches7848 Latest

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

4.23main7430
 
StableUpgraded with the latest SnapLogic Platform release.
4.22main6403
 
StableUpgraded with the latest SnapLogic Platform release.
4.21snapsmrc542

 

StableUpgraded with the latest SnapLogic Platform release.
4.20snapsmrc535
 
StableUpgraded with the latest SnapLogic Platform release.
4.19 Patch google/spreadsheet8333 Latest

Fixed an issue with the Google Worksheet Reader Snap wherein the Snap produces output documents for empty rows.

4.19snaprsmrc528
 
StableUpgraded with the latest SnapLogic Platform release.
4.18snapsmrc523
 
StableUpgraded with the latest SnapLogic Platform release.
4.17 Patchgoogle/spreadsheet7283 Latest

Fixed an issue with the Google Worksheet Writer Snap wherein the No of valid records written field in the output document would count the header row.

4.17ALL7402
 
Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17snapsmrc515
 
Latest

Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16 Patchgoogle/spreadsheet6995 Latest

Fixed an issue wherein the Spreadsheets Browser Snap fails if a spreadsheet name contains / or : in Windows plex.

4.16snapsmrc508
 
StableUpgraded with the latest SnapLogic Platform release.
4.15 Patchgoogle/spreadsheet6835 Latest

Added a new property, Parse data, to the Worksheet Writer Snap which helps preserve the date data type.

4.15 Patchgoogle/spreadsheet6639 Latest

Added new properties, Preserve data typesConnection propertiesRead timeout in seconds, and Connection timeout in seconds, to the Worksheet Reader Snap. These properties let you convert input data types to strings and handle connection timeouts. Also, fixed issues with header count, column count mismatch and rendering of columns with no headers.

4.15snapsmrc500
 
StableUpgraded with the latest SnapLogic Platform release.
4.14 Patch google/spreadsheet5730  Latest

Migrated Google Sheets from API v3 to v4. Implemented retries to overcome defects in Sheets API.

4.14snapsmrc490
 
StableUpgraded with the latest SnapLogic Platform release.
4.13 Patch spreadsheet5293 Latest

Fixed the Google Worksheet Writer Snap that incorrectly displays numeric values as a string in the spreadsheet when writing in batch mode. The spreadsheet now preserves the exact data type of the input value.  

4.13

snapsmrc486

 
StableUpgraded with the latest SnapLogic Platform release.
4.12

snapsmrc480

 
Stable

Added the Batch write property  in Worksheet Writer to enable writing the input documents into the worksheet as a single batch instead of writing the input data one cell at a time.

4.11snapsmrc465
 
StableUpgraded with the latest SnapLogic Platform release.
4.10 Patch spreadsheet3626
LatestAddressed an issue where Worksheet Reader failed unexpectedly when validation mode input exceeded limitations.
4.10

snapsmrc414

 
Stable

Updated the Google Worksheet Writer Snap with Row count property to resolve the ' Data writing error'.

4.9.0 Patch spreadsheet3104 Latest

Addressed an issue with Google Worksheet writer: Fails with " Data writing error "

4.9snapsmrc405
 
StableUpgraded with the latest SnapLogic Platform release.
4.8

snapsmrc398

 
StableUpgraded with the latest SnapLogic Platform release.
4.7

snapsmrc382

 
StableUpgraded with the latest SnapLogic Platform release.
4.6snapsmrc362
 
StableUpgraded with the latest SnapLogic Platform release.
4.5.1

snapsmrc344

 
StableUpgraded with the latest SnapLogic Platform release.
4.5

snapsmrc344

Stable

Enhanced the error view output to include error, reason, and resolution.