FetchGoogleDrive

Description:

Fetches files from a Google Drive Folder. Designed to be used in tandem with ListGoogleDrive. Please see Additional Details to set up access to Google Drive.

Additional Details...

Tags:

google, drive, storage, fetch

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
GCP Credentials Provider Servicegcp-credentials-provider-serviceController Service API:
GCPCredentialsService
Implementation: GCPCredentialsControllerService
The Controller Service used to obtain Google Cloud Platform credentials.
File IDdrive-file-id${drive.id}The Drive ID of the File to fetch. Please see Additional Details for information on how to obtain the Drive ID.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Google Doc Export TypeGoogle Doc Export TypePDF
  • PDF
  • Microsoft Word
  • OpenDocument Text
  • Plain Text
  • Rich Text
  • Web Page (HTML)
  • EPUB
Google Documents cannot be downloaded directly from Google Drive but instead must be exported to a specified MIME Type. In the event that the incoming FlowFile's MIME Type indicates that the file is a Google Document, this property specifies the MIME Type to export the document to.
Google Spreadsheet Export TypeGoogle Spreadsheet Export TypePDF
  • PDF
  • Microsoft Excel
  • OpenDocument Spreadsheet
  • CSV (first sheet only) Comma-separated values. Only the first sheet will be exported.
  • TSV (first sheet only) Tab-separate values. Only the first sheet will be exported.
  • Web Page (HTML)
Google Spreadsheets cannot be downloaded directly from Google Drive but instead must be exported to a specified MIME Type. In the event that the incoming FlowFile's MIME Type indicates that the file is a Google Spreadsheet, this property specifies the MIME Type to export the spreadsheet to.
Google Presentation Export TypeGoogle Presentation Export TypePDF
  • PDF
  • Microsoft PowerPoint
  • OpenDocument Presentation
  • Plain Text
Google Presentations cannot be downloaded directly from Google Drive but instead must be exported to a specified MIME Type. In the event that the incoming FlowFile's MIME Type indicates that the file is a Google Presentation, this property specifies the MIME Type to export the presentation to.
Google Drawing Export TypeGoogle Drawing Export TypePDF
  • PDF
  • PNG
  • JPEG
  • SVG
Google Drawings cannot be downloaded directly from Google Drive but instead must be exported to a specified MIME Type. In the event that the incoming FlowFile's MIME Type indicates that the file is a Google Drawing, this property specifies the MIME Type to export the drawing to.
Proxy Configuration Serviceproxy-configuration-serviceController Service API:
ProxyConfigurationService
Implementation: StandardProxyConfigurationService
Specifies the Proxy Configuration Controller Service to proxy network requests. Supported proxies: HTTP + AuthN
Connect Timeoutconnect-timeout20 secMaximum wait time for connection to Google Drive service.
Supports Expression Language: true (will be evaluated using variable registry only)
Read Timeoutread-timeout60 secMaximum wait time for response from Google Drive service.
Supports Expression Language: true (will be evaluated using variable registry only)

Relationships:

NameDescription
successA FlowFile will be routed here for each successfully fetched File.
failureA FlowFile will be routed here for each File for which fetch was attempted but failed.

Reads Attributes:

NameDescription
drive.idThe id of the file

Writes Attributes:

NameDescription
drive.idThe id of the file
filenameThe name of the file
mime.typeThe MIME type of the file
drive.sizeThe size of the file. Set to 0 when the file size is not available (e.g. externally stored files).
drive.size.availableIndicates if the file size is known / available
drive.timestampThe last modified time or created time (whichever is greater) of the file. The reason for this is that the original modified date of a file is preserved when uploaded to Google Drive. 'Created time' takes the time when the upload occurs. However uploaded files can still be modified later.
drive.created.timeThe file's creation time
drive.modified.timeThe file's last modification time
error.codeThe error code returned by Google Drive
error.messageThe error message returned by Google Drive

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.

See Also:

ListGoogleDrive, PutGoogleDrive