Load data from a local file to a Google Sheet.
type: "io.kestra.plugin.googleworkspace.sheets.Load"
Examples
Load data into a Google Workspace spreadsheet from an input file
id: googleworkspace_sheets_load
namespace: company.team
inputs:
- id: file
type: FILE
- id: serviceAccount
type: STRING
tasks:
- id: load_data
type: io.kestra.plugin.googleworkspace.sheets.Load
from: "{{ inputs.file }}"
spreadsheetId: xxxxxxxxxxxxxxxxx
range: Sheet2
serviceAccount: "{{ inputs.serviceAccount }}"
csvOptions:
fieldDelimiter: ";"
Properties
spreadsheetId *Requiredstring
The spreadsheet unique id
avroSchema string
Schema for avro objects (Optional)
If provided, the task will read avro objects using this schema.
csvOptions Non-dynamicAbstractLoad-CsvOptions
{
"fieldDelimiter": ",",
"encoding": "UTF-8"
}
CSV parsing options (Optional)
format string
ION
CSV
AVRO
PARQUET
ORC
JSON
Format of the input file
If not provided, the task will programmatically try to find the correct format based on the extension.
from string
The URI of the Kestra's internal storage file
header booleanstring
false
Specifies if the first line should be the header (default: false)
insertType string
UPDATE
UPDATE
OVERWRITE
APPEND
How to write the data into the sheet
UPDATE (default): write values to the given range; does not clear extra old data outside the written area. OVERWRITE: clear the target range first, then write values. APPEND: append values as new rows after the last non-empty row in the given sheet/range.
range string
Sheet1
The sheet name or range to select
readTimeout integerstring
120
The read timeout for the request (in seconds)
scopes array
["https://www.googleapis.com/auth/spreadsheets"]
The GCP scopes to used
serviceAccount string
The GCP service account key
Outputs
columns integer
0
The number of columns loaded
range string
The spreadsheet ID or range
rows integer
0
The number of rows loaded
Definitions
io.kestra.plugin.googleworkspace.sheets.AbstractLoad-CsvOptions
encoding string
UTF-8
The file encoding of CSV file
fieldDelimiter string
,
The separator for fields in a CSV file
quote string
The quote character in a CSV file
skipLeadingRows integerstring
The number of rows at the top of a CSV file that will be skipped when reading the data
The default value is 0. This property is useful if you have header rows in the file that should be skipped.