Google Drive Connector Examples
The ZappySys API Driver is a user-friendly interface designed to facilitate the seamless integration of various applications with the Google Drive API. With its intuitive design and robust functionality, the ZappySys API Driver simplifies the process of configuring specific API endpoints to efficiently read or write data from Google Drive.
On this page you will find some SQL examples which can be used for API ODBC Driver or Data Gateway API Connector.
Get my drive information [Read more...]
Gets my drive information
SELECT * FROM Drive
List all shared drives [Read more...]
List all shared drives
SELECT * FROM SharedDrives --WITH(Query='name = "HR"')
Get information about shared drive [Read more...]
Get information about shared drive
SELECT * FROM SharedDrives WITH(Query='name = "HR"')
List / search files from my drive [Read more...]
List or search files from my drive (use search query expression). Uncomment Query part to invoke filter
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"', --includes files where name contains "zappysys" word
)
List / search files from a single shared drive [Read more...]
List or search files from a specific shared drive by driveId and search query expression. Uncomment Query part to invoke filter
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"', --includes files where name contains "zappysys" word
DriveId='0AFWIggplk2z6Uk9PVA',
DriveType='drive',
SupportsAllDrives='true',
IncludeItemsFromAllDrives='true'
)
List / search files from all shared drives [Read more...]
List or search files from all shared drives by driveId and search query expression. Uncomment Query part to invoke filter
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"', --includes files where name contains "zappysys" word
DriveType='allDrives',
SupportsAllDrives='true',
IncludeItemsFromAllDrives='true'
)
Dowload a file (my drive) [Read more...]
Downloads a file (from user my drive)
SELECT * FROM download_file
WITH(Id='1PpE2eSi5faAnMwiSolwr34zA5MwOdR3D'
,ResponseDataFile='C:\MyFiles\myfile.ext'
)
--You can get file Id by selecting from 'list_files' endpoint
Dowload a file from google shared drive [Read more...]
Dowload a file from google shared drive for which user has access
SELECT * FROM download_file
WITH(
DriveType='drive' --or set 'user' for mydrive
, DriveId='0AFWIggplk2z6Uk9PVA'
, Id='1hk7odj2Y2--yxN9DY0zW88hSnxqiyHq0' --file id
, ResponseDataFile='c:\temp\dump.zip'
--You can get file Id by selecting from 'list_files' endpoint
)
Upload local file to google shared drive folder [Read more...]
Upload a local file to google shared drive folder for which user has access. Donot set DriveId to upload to MyDrive rather than sahred drive.
SELECT *
FROM upload_file
WITH(
DriveId='0AC00HWQH144cUk9PVA' --team drive id (keep blank for uploading to my drive)
, DiskFilePath='C:\temp\dump.csv' --source file path
, FileName='dump.csv' --target file name
, ParentFolderId='1PRySfNNjWIp9ZAnhPh-u9tKRj3QOETSq'
, KeepRevisionForever='false'
)
Get file list [Read more...]
Downloads a file
SELECT * FROM Files
Update a file [Read more...]
Updates 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 [Read more...]
Deletes a file
DELETE FROM Files
WITH (Id='1gcu0hV34OTfgvcu9CFhr7Go4b35j5Mop')
--You can get file Id by selecting from 'list_files' endpoint
Delete a file by name from a shared drive [Read more...]
Delete a file by name from a shared drive
DELETE FROM Files where Name='dump.csv' and Trashed=0 WITH(DriveId='0AC00HWQH144cUk9PVA', DriveType='drive')
--You can get file Id by selecting from 'list_files' endpoint
Upload a file with INSERT keyword [Read more...]
Upload a file with INSERT keyword. Advantage of INSERT is you can use Bulk option using SOURCE clause. This way you can upload many files
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 [Read more...]
Deletes a folder
DELETE FROM Folders
WITH (Id='1yDO11prsLH9DUrBTCadV6GGMJrITjF9I')
--You can get folder Id by selecting from 'list_folders' endpoint
Create a folder [Read more...]
Creates 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 [Read more...]
Gets file information
SELECT * FROM FileInfo
WITH (Id='1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM')
--You can get file Id by selecting from 'list_files' endpoint
Get items list [Read more...]
Gets items list
SELECT * FROM ItemsList
Get items list using query [Read more...]
Gets items list using query
SELECT Id, Kind, Name, MimeType
FROM list_items
WITH (Query = 'name contains ''.txt''')
Get files list [Read more...]
Gets files list
SELECT * FROM FilesList
Get folders list [Read more...]
Gets folders list
SELECT * FROM FoldersList
Select from trash [Read more...]
Shows deleted items in Trash
SELECT * FROM Trash
List files from trash for a shared drive [Read more...]
Shows deleted items in Trash
SELECT * FROM Trash
WITH(
DriveType='drive'
,DriveId='1j0HFOP4gsoExxxxxx' --get id from select * from SharedDrives
)
Empty trash bin [Read more...]
Empties trash bin
DELETE FROM Trash
Empty trash bin for a shared drive [Read more...]
Empties trash bin for a specified shared drive
DELETE FROM Trash
WITH(
DriveType='drive'
,DriveId='1j0HFOP4gsoExxxxxx' --get id from select * from SharedDrives
)
Export Google Sheet to Excel (xlsx) or PDF [Read more...]
Export a Google files to other format (e.g. Google Sheets to MS Excel / PDF)
SELECT "Status" FROM export_file
WITH(
Id='1j0HFOP4gsoE-Zbf2xN3IsPSj8wgwNtIfyyvM1_BWkW4' --//google sheet id or document ID
--,DriveId='xx your shared drive id' --get id from select * from SharedDrives
--,DriveType='drive'
, ExportAs='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
--, ExportAs='application/pdf'
, ResponseDataFile='c:\temp\sheet1.xlsx'
, FileOverwriteMode='AlwaysOverwrite' -- or try 'FailIfExists' or 'SkipIfExists'
))
--You can export files from 'export_file' endpoint
Getting Started with Examples
ZappySys API Driver is a powerful software solution designed to facilitate the extraction and integration of data from a wide range of sources through APIs. Its intuitive design and extensive feature set make it an essential asset for any organization dealing with complex data integration tasks.
To get started with examples using ZappySys API Driver, please click on the following applications:
Key features of the ZappySys API Driver include:
The API ODBC driver facilitates the reading and writing of data from numerous popular online services (refer to the complete list here) using familiar SQL language without learning complexity of REST API calls. The driver allows querying nested structure and output as a flat table. You can also create your own ODBC / Data Gateway API connector file and use it with this driver.
Intuitive Configuration: The interface is designed to be user-friendly, enabling users to easily set up the specific API endpoints within Google Drive without requiring extensive technical expertise or programming knowledge.
Customizable Endpoint Setup: Users can conveniently configure the API endpoint settings, including the HTTP request method, endpoint URL, and any necessary parameters, to precisely target the desired data within Google Drive.
Data Manipulation Capabilities: The ZappySys API Driver allows for seamless data retrieval and writing, enabling users to fetch data from Google Drive and perform various data manipulation operations as needed, all through an intuitive and straightforward interface.
Secure Authentication Integration: The driver provides secure authentication integration, allowing users to securely connect to the Google Drive API by inputting the necessary authentication credentials, such as API tokens or other authentication keys.
Error Handling Support: The interface is equipped with comprehensive error handling support, ensuring that any errors or exceptions encountered during the data retrieval or writing process are efficiently managed and appropriately communicated to users for prompt resolution.
Data Visualization and Reporting: The ZappySys API Driver facilitates the seamless processing and presentation of the retrieved data from Google Drive, enabling users to generate comprehensive reports and visualizations for further analysis and decision-making purposes.
Overall, the ZappySys API Driver serves as a powerful tool for streamlining the integration of applications with Google Drive, providing users with a convenient and efficient way to access and manage data, all through a user-friendly and intuitive interface.