Google Drive Connector
Documentation
Version: 10
Documentation

Table Trash


Parameters

Parameter Label Required Options Description Help
There are no parameters

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT list_deleted_files
INSERT
UPDATE
UPSERT
DELETE empty_trash
LOOKUP

Examples

SSIS

Use Google Drive Connector in API Source component to read data or in API Destination component to read/write data:

Read from Trash table using API Source

Google Drive
Trash
SSIS API Source - Read from table or endpoint

Read/write to Trash table using API Destination

Google Drive
Trash
Select
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Select from trash

Shows deleted items in Trash

SELECT * FROM Trash

List files from trash for a shared drive

Shows deleted items in Trash

SELECT * FROM Trash
				WITH(
				    DriveType='drive'
				   ,DriveId='1j0HFOP4gsoExxxxxx' 	--get id from select * from SharedDrives			   
				 )

Empty trash bin

Empties trash bin

DELETE FROM Trash

Empty trash bin for a shared drive

Empties trash bin for a specified shared drive

DELETE FROM Trash
				WITH(
				    DriveType='drive'
				   ,DriveId='1j0HFOP4gsoExxxxxx' --get id from select * from SharedDrives
				 )

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Select from trash

Shows deleted items in Trash

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Trash';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_GOOGLE_DRIVE_IN_DATA_GATEWAY];

List files from trash for a shared drive

Shows deleted items in Trash

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Trash
				WITH(
				    DriveType=''drive''
				   ,DriveId=''1j0HFOP4gsoExxxxxx'' 	--get id from select * from SharedDrives			   
				 )';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_GOOGLE_DRIVE_IN_DATA_GATEWAY];

Empty trash bin

Empties trash bin

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Trash';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_GOOGLE_DRIVE_IN_DATA_GATEWAY];

Empty trash bin for a shared drive

Empties trash bin for a specified shared drive

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Trash
				WITH(
				    DriveType=''drive''
				   ,DriveId=''1j0HFOP4gsoExxxxxx'' --get id from select * from SharedDrives
				 )';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_GOOGLE_DRIVE_IN_DATA_GATEWAY];