SSIS Components for Google Drive

Build 20.0.7656

Files

Create, update, delete, and query the files and folders contained in a user's Google Drive.

Select

The Files table supports only a subset of columns for filtering. Below is a table containing those columns with their supported operations. All filters can be connected with 'OR' or 'AND' operators.

ColumnSupported Operators
Namecontains, =, !=
MIMETypecontains, =, !=
ModifiedTime<=, <, =, !=, >, >=
Trashed=, !=
Starred=, !=
ParentIdsin
OwnerEmailin

The contains operator only performs prefix matching for a name. For example, the name "HelloWorld" would match for name contains 'Hello' but not name contains 'World'.

SELECT * FROM [Files] WHERE ModifiedTime>'2017-01-01' OR Contains(Name,'CData')

SELECT * FROM [Files] WHERE OwnerEmail in ('support@cdata.com') AND Starred = true

SELECT * FROM [Files] WHERE Starred = true

SELECT * FROM [Files] WHERE TeamDriveId='0ACkq0ZiV0yJCUk9PVA'
Note: You must set the connection property TeamDriveSupport to 'true', in order to query from a specific Team Drive.

Insert

You must specify values at least for Name and one of LocalFile or FileData.

Insert into Files (Name,LocalFile) VALUES('MyFile','C:\\\\file.txt')

Update

Id is required for updating a File.

Update Files SET Name='UpdatedName' WHERE Id = '19YFv8wmvKixCYaJJAeE8jN3ROt7x1ZicvXwflswVOrw'

Also the content of the file can be updated. Note that this will replace the actual content.

Update Files SET LocalFile='C:\\\\file.txt' WHERE Id = '19YFv8wmvKixCYaJJAeE8jN3ROt7x1ZicvXwflswVOrw'

Delete

To delete a File, the Id is required.

DELETE FROM [Files] WHERE Id = '1Dx6GTyhgTmTjtoy8GuG0n0qaOsKyhwrOG6MG8A2QQYA'

Columns

Name Type ReadOnly Description
Id [KEY] String True

The ID of the file.

Name String False

The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the name is constant.

TeamDriveId String True

The Id of the teamDrive.

Description String False

A short description of the file or folder.

Extension String True

The extension of the file.

MIMEType String False

The MIME type of the file.

CreatedTime Datetime True

The creation date of the file or folder.

ModifiedTime Datetime True

The last modified date of the file or folder.

Size Long True

The size of the file in bytes.

OwnerName String True

The name of the resource's owner.

OwnerEmail String True

The email of the resource's owner.

Folder Boolean True

This field shows whether or not the resource is a folder.

Starred Boolean False

This field sets whether or not the resource is starred.

Trashed Boolean True

This field sets whether or not the resource has been moved to the trash.

Viewed Boolean True

This field sets whether or not the resource has been viewed by the current user.

ParentIds String True

A comma-separated list of parent folder Ids.

ChildIds String True

A semicolon-separated list of child resource Ids.

ChildLinks String True

A semicolon-separated list of child resource links.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Query String

This field accepts a valid Google Drive SDK query, which overrides conditionals in the WHERE clause.

LocalFile String

The local file path, including file name, of the file to be uploaded. Required when FileData is not specified. Used only for inserting and updating a file.

FileData String

If the LocalFile input is empty, file data will be output in the format specified by the Encoding input. Used only for inserting and updating a file.

Encoding String

The FileData input encoding type. Used only for inserting and updating a file.

The allowed values are NONE, BASE64.

The default value is BASE64.

Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7656