Info |
---|
The Google Drive sink plugin is available in the Hub. |
Plugin version: 1.4.01
Sink plugin saves files from the pipeline to Google Drive directory via Google Drive API.
Configuration
Property | Macro Enabled? | Version Introduced | Description | ||
---|---|---|---|---|---|
Reference Name | No | Required. Name used to uniquely identify this sink for lineage, annotating metadata, etc. | |||
File Body Field | Yes | Required. Name of the schema field (should be BYTES type) which will be used as body of file. The minimal input schema should contain only this field. | |||
File Name Field | Yes | Optional. Name of the schema field (should be STRING type) which will be used as name of file. In the case it is not set files have randomly generated 16-symbols names. | |||
File Mime Field | Yes | Optional. Name of the schema field (should be STRING type) which will be used as MIME type of file. All MIME types are supported except Google Drive types. In the case it is not set Google API will try to recognize file’s MIME type automatically. | |||
Directory Identifier | No | Required. Identifier of the destination folder. This comes after
Then the Directory Identifier would be | |||
Authentication Type | No | Required. Type of authentication used to access Google API. Select OAuth2 and Service Account types are available. Make sure that:
OAuth2 client credentials can be generated on Google Cloud Credentials Page. For more information about OAuth2, see Google Drive API Documentation. Default is OAuth2. | |||
Client ID | No | Optional. OAuth2 Client ID used to identify the application. | |||
Client Secret | No | Optional. OAuth2 Client Secret used to access the authorization server. | |||
Refresh Token | No | Optional. OAuth2 Refresh Token to acquire new access tokens. | |||
Service Account Type | Yes | 6.3.0/1.3.0 | Optional. Select one of the following options:
Make sure that the Google Drive Folder is shared with the service account email. To write files to a Private Google Drive, grant the | ||
Service Account File Path | Yes | 6.3.0/1.3.0 | Optional. Path on the local file system of the service account key used for authorization. Can be set to 'auto-detect' when running on a Dataproc cluster which needs to be created with the following scopes: When running on other clusters, the file must be present on every node in the cluster. |
auto-detect
, the GCE VM needs to be configured with the scope required by the Google Drive API. Otherwise, the preview as well as pipeline run will fail with insufficient permission error. The required scope is https://www.googleapis.com/auth/drive
Default is | |||
Service Account JSON | Yes | 1.4.0 | Optional. Contents of the service account JSON file. Service Account JSON can be generated on Google Cloud Service Account page. |
Steps to Generate OAuth2 Credentials
...