Google Drive Connector
Google Drive Connector Help
Version 5
ZappySys Logo File Version: v5
Supported Engine: 4

Examples


On this page you will find some SQL examples which can be used for API ODBC Driver or Data Gateway API Connector.
Example Query
Get drive information
SELECT *
  FROM Drive
Dowload a file
SELECT * FROM download_file
  WITH(Id='1PpE2eSi5faAnMwiSolwr34zA5MwOdR3D'	
      ,ResponseDataFile='C:\MyFiles\myfile.ext'
  )
  --You can get file Id by selecting from 'list_files' endpoint
Get file list
SELECT * FROM Files
Update a file
UPDATE Files
  WITH (Id='1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM'
  ,DiskFilePath='C:\MyFiles\myfile.ext')
  --You can get file Id by selecting from 'list_files' endpoint
Delete a file
DELETE FROM Files
  WITH (Id='1gcu0hV34OTfgvcu9CFhr7Go4b35j5Mop')
  --You can get file Id by selecting from 'list_files' endpoint
Upload a file
INSERT INTO Files
  WITH (FileName='My filename'
      ,DiskFilePath='C:\MyFolder\Mymyfile.ext'
      ,ParentFolderId='root')
  --You can get ParentFolderId by selecting from 'list_folders' endpoint or just use 'root'
Delete a folder
DELETE FROM Folders
  WITH (Id='1yDO11prsLH9DUrBTCadV6GGMJrITjF9I')
  --You can get folder Id by selecting from 'list_folders' endpoint
Create a folder
INSERT INTO Folders
  WITH (Name='My folder name'
      ,ParentFolderId='root')
  --You can get ParentFolderId by selecting from 'list_folders' endpoint or just use 'root'
Get file information
SELECT * FROM FileInfo
  WITH (Id='1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM')
  --You can get file Id by selecting from 'list_files' endpoint
Get items list
SELECT * FROM ItemsList
Get items list using query
SELECT Id, Kind, Name, MimeType
  FROM list_items
  WITH (Query = 'name contains ''.txt''')
Get files list
SELECT * FROM FilesList
Get folders list
SELECT * FROM FoldersList
Select from trash
SELECT * FROM Trash
Empty trash bin
DELETE FROM Trash
Export File
SELECT "Status" FROM export_file
				WITH(
					  Id='1j0HFOP4gsoE-Zbf2xN3IsPSj8wgwNtIfyyvM1_BWkW4'
					, ExportAs='application/pdf'
				))
			 --You can export files from 'export_file' endpoint