Load
type: "io.kestra.plugin.googleworkspace.sheets.Load"
Load data from a local file to a Google Workspace spreadsheet
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
- Type: string
- Dynamic: ✔️
- Required: ✔️
The spreadsheet unique id.
avroSchema
- Type: string
- Dynamic: ✔️
- Required: ❌
Schema for avro objects (Optional).
If provided, the task will read avro objects using this schema.
csvOptions
- Type: AbstractLoad-CsvOptions
- Dynamic: ❓
- Required: ❌
- Default:
{fieldDelimiter=,, encoding=UTF-8}
Csv parsing options (Optional).
format
- Type: string
- Dynamic: ✔️
- Required: ❌
- Possible Values:
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
- Type: string
- Dynamic: ✔️
- Required: ❌
- Format:
uri
The URI of the Kestra's internal storage file.
header
- Type: boolean
- Dynamic: ❓
- Required: ❌
- Default:
false
Specifies if the first line should be the header (default: false).
range
- Type: string
- Dynamic: ✔️
- Required: ❌
- Default:
Sheet1
The sheet name or range to select.
readTimeout
- Type: integer
- Dynamic: ✔️
- Required: ❌
- Default:
120
The read timeout for the request (in seconds)
scopes
- Type: array
- SubType: string
- Dynamic: ✔️
- Required: ❌
- Default:
[https://www.googleapis.com/auth/spreadsheets]
The GCP scopes to used
serviceAccount
- Type: string
- Dynamic: ✔️
- Required: ❌
The GCP service account key
Outputs
columns
- Type: integer
- Required: ❌
- Default:
0
The number of columns loaded
range
- Type: string
- Required: ❌
The spreadsheet ID or range
rows
- Type: integer
- Required: ❌
- Default:
0
The number of rows loaded
Definitions
io.kestra.plugin.googleworkspace.sheets.AbstractLoad-CsvOptions
Properties
encoding
- Type: string
- Dynamic: ✔️
- Required: ❌
- Default:
UTF-8
The file encoding of CSV file.
fieldDelimiter
- Type: string
- Dynamic: ✔️
- Required: ❌
- Default:
,
The separator for fields in a CSV file.
quote
- Type: string
- Dynamic: ✔️
- Required: ❌
The quote character in a CSV file.
skipLeadingRows
- Type: integer
- Dynamic: ❌
- Required: ❌
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.
Was this page helpful?