Public Google Sheets API
The public API procedures may call the internal procedures which should not be used directly as they can be changed without any explicit notification in the newer versions of the connector. Internal procedures can be recognized by the prefix internal_ in their names. Public API procedures do not have such prefixes in their names.
ExportReportTableToSpreadsheet
Exports report data from table to a spreadsheet. Stores spreadsheet at specified folder.
Parameter
<table_name> (required): Data source table to copy from
<gsheet_title> (required): Spreadsheet title
<wsheet_title> (required): Worksheet to copy to
<file_id> (optional): Folder id to move Spreadsheet to
<file_name> (optional): Folder name to move Spreadsheet to
Attribute | Type |
---|---|
spreadsheetId | string |
worksheet_title | string |
updatedRange | string |
updatedRows | integer |
updatedColumns | integer |
updatedCells | integer |
CREATE VIEW google_spreadsheets.example_ExportReportTableToSpreadsheet AS
SELECT * FROM(
CALL google_spreadsheets.ExportReportTableToSpreadsheet(
table_name => 'table_name_to_copy_from',
gsheet_title => 'Report',
wsheet_title => 'main',
file_id => 'reports'
))s
FileList
Lists files from GDrive
Parameter
<name> (optional): Search by name
<isFile> (optional): Search file
<isFolder> (optional): Search folder
<isSpreadsheet> (optional): Search spreadsheet
<modifiedTime> (optional): Currently is supported only >= operator
<parents> (optional): One or more parent name, separated by comma. Should be ids, not names
<withExportLinks> (optional): Whether to request possible export links
<requestIdsOnly> (optional): Whether to request few fields count(id) or all data
<searchCriteria> (optional): Search criteria: and, or
<trashed> (optional): Whether to include files from trash
<nameContains> (optional): Filter files with a name containing the words
<target_table> (optional): Target table|Fully-qualified table name to store the data
<preview> (optional): Preview|Preview only
Attribute | Type |
---|---|
id | string |
name | string |
mimeType | string |
trashed | boolean |
modifiedTime | timestamp |
owners | string |
parents | string |
exportLinksType | string |
exportLinksLink | string |
ReplicateSpreadsheetToTable
Replicates data from spreadsheet, csv or txt hosted at GDrive to a table
Parameter
<file_id> (optional): File id
<file_name> (optional): File name
<target_table> (required): target table
Attribute | Type |
---|---|
result | string |
CREATE VIEW google_spreadsheets.example_ReplicateSpreadsheetToTable AS
SELECT * FROM(
CALL google_spreadsheets.ReplicateSpreadsheetToTable(
file_name => 'Report To Copy From',
target_table => 'table_name_to_copy_to'
))s
ReplicateTableToSpreadsheet
Replicates data from table to a spreadsheet
Parameter
<table_name> (required): Data source table to copy from
<gsheet_title> (required): Spreadsheet title
<gsheet_id> (optional): Spreadsheet to copy to
<wsheet_title> (required): Worksheet to copy to
<file_id> (optional): Folder id containing Spreadsheet
<file_name> (optional): Folder name containing Spreadsheet
Attribute | Type |
---|---|
spreadsheetId | string |
worksheet_title | string |
updatedRange | string |
updatedRows | integer |
updatedColumns | integer |
updatedCells | integer |
CREATE VIEW google_spreadsheets.example_ReplicateTableToSpreadsheet AS
SELECT * FROM(
CALL google_spreadsheets.ReplicateTableToSpreadsheet(
table_name => 'table_name_to_copy_from',
gsheet_title => 'Report to Create&Append',
wsheet_title => 'main',
file_name => 'reports'
))s