Google Sheets v4 Writer Parameters
Dataset
Feature Operation
This specifies the writing behavior. All operations start from the context of the cell range bounded by Field Names Row / Start Row, Start Column, and End Column.
- Insert – Based on the bounded cell range, the server scans for a table-like arrangement of cells below it, and appends data starting at the first blank row. The worksheet’s extents are expanded as needed. Data following the first blank row may be overwritten based on the Insert Method option.
- Update – Update the values in a given row. This operation requires that the attribute specified by the Row Number Attribute parameter be supplied on all features and be within the worksheet’s extents. Null attribute values indicate that the existing server-side value should be preserved.
- Delete – The cell range for each feature is cleared of its values. The row itself is not deleted, and any formatting defined in the Google Sheets web interface is preserved. This operation requires that the attribute specified by the Row Number Attribute parameter be supplied on all features and be within the worksheet’s extents.
The Google Sheets writer accumulates all write operations and submits them to the server at the end of the translation. For each worksheet, inserts are submitted first, followed by updates, and then deletes.
Worksheet Handling
This specifies the behavior upon receiving the first feature for a feature type.
- Create If Needed – If the feature type does not correspond to an existing worksheet, a new worksheet is added to the spreadsheet.
- Use Existing – If the feature type does not correspond to an existing worksheet, an error is raised.
- Truncate Existing – If the feature type corresponds to an existing worksheet, a Clear (delete) operation is performed on the extent of the worksheet. Otherwise, an error is raised.
- Drop and Create – If the feature type corresponds to an existing worksheet, the worksheet is deleted and replaced with a new worksheet. Otherwise, the worksheet is created.
Row Selection
Row Number Attribute
This specifies the attribute that contains the row number. For Update and Delete operations, a valid row number must be specified. Default: googlesheets_row_number
Schema Generation
These parameters determine how user attributes are mapped to columns on the worksheet.
Field Names Row
The row number that contains the field names. Optional. If the writer created the worksheet during the translation, this row will be populated based on the user attributes defined on the feature type.
If not provided, then field names are column letters from Start Column up to End Column.
Start Column
The column from which to start mapping field names to user attributes.
Value: Must be a value between A and ZZZ.
End Column
The column at which to stop mapping field names to user attributes.
Value: Must be a value between A and ZZZ.
The writer will write up to and including this column.
Sheet Options
Start Row
Optional
The row number of the first feature. The value must be greater than Field Names Row. If not specified, this is assumed to be either 1 or Field Names Row + 1, whichever is greater.
Interpret Values As
This specifies how the server should interpret attribute values.
- User-Entered – Values are parsed as if they were entered through the Google Sheets web interface. Use this option when working with formulas.
- Raw – Values are stored as-is.
Insert Method
This parameter is only applicable when Feature Operation is set to Insert.
- Insert Rows – New rows are always inserted at the end of the detected table.
- Overwrite – Existing cell values following the end of the detected table may be overwritten.