PutGoogleDrive 2.0.0

Bundle
org.apache.nifi | nifi-gcp-nar
Description
Writes the contents of a FlowFile as a file in Google Drive.
Tags
drive, google, put, storage
Input Requirement
REQUIRED
Supports Sensitive Dynamic Properties
false
  • Additional Details for PutGoogleDrive 2.0.0

    PutGoogleDrive

    Accessing Google Drive from NiFi

    This processor uses Google Cloud credentials for authentication to access Google Drive. The following steps are required to prepare the Google Cloud and Google Drive accounts for the processors:

    1. Enable Google Drive API in Google Cloud
    2. Grant access to Google Drive folder
      • In Google Cloud Console navigate to IAM & Admin -> Service Accounts.
      • Take a note of the email of the service account you are going to use.
      • Navigate to the folder in Google Drive which will be used as the base folder.
      • Right-click on the Folder -> Share.
      • Enter the service account email.
    3. Find Folder ID
      • Navigate to the folder to be listed in Google Drive and enter it. The URL in your browser will include the ID at the end of the URL. For example, if the URL were https://drive.google.com/drive/folders/1trTraPVCnX5_TNwO8d9P_bz278xWOmGm, the Folder ID would be 1trTraPVCnX5_TNwO8d9P_bz278xWOmGm
    4. Set Folder ID in ‘Folder ID’ property
Properties
Relationships
Name Description
success Files that have been successfully written to Google Drive are transferred to this relationship.
failure Files that could not be written to Google Drive for some reason are transferred to this relationship.
Reads Attributes
Name Description
filename Uses the FlowFile's filename as the filename for the Google Drive object.
Writes Attributes
Name Description
drive.id The id of the file
filename The name of the file
mime.type The MIME type of the file
drive.size The size of the file
drive.timestamp The 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.
error.code The error code returned by Google Drive
error.message The error message returned by Google Drive
See Also