Skip to main content
ranaIrfan
Silver ⭐️
May 30, 2023 12:29 PM UTC
Solved

How to read the files from GoogleDrive in nifi

Hi,

Please let me know how to connect the Google Drive in nifi and read the files.

Which Processor to be used.Please help in this regards,

Best Regards,

Rana

cotopaul
cotopaulAnswer
Platinum ⭐️
May 31, 2023 10:01 AM UTC

Well I am not expert in migrating from a version to another so my answer might not be good enough for you :(. Besides that, I had no time to read the release notes for 1.21.0 and I am not quite sure if anything changed in terms of config files.

 

Assuming that you will keep the hostname and the port for each nifi node and you are using the embedded zookeeper, you should:
1. Stop the current NiFi instance.
2. Copy the authorizations.xml, authorizers.xml, bootstrap.conf, flow.json.gz, flow.xml.gz, logback.xml, login-identity-providers.xml, nifi.properties, stateless.properties, state-management.xml, users.xml and zookeeper.properties into the conf folder from within your new nifi instance.
3. Make sure that in nifi.properties, on your new instance, you are pointing to the same content repository, database repostiory (and all the other repositories) as in the previous instance --> assuming that you followed the best practices and had all those repositories moved on separate disks. Otherwise, make sure that you process all your data on your old instance and start fresh on your new instance.
4. Start the new NiFi Instance.

If you are just interested in migrating just the flows from the canvas, you can add all your flows into a template and save them on your local machine. Afterwards, you can open your new nifi instance, upload your template and add it to your canvas.

3 replies

cotopaul
Platinum ⭐️
May 30, 2023 2:05 PM UTC

@ranaIrfan,

I am not quite sure which version you are using but at least since 1.19, you have the ListGoogleDrive and FetchGoogleDrive Processors, which should be used in order to extract data out of your Google Drive Folder.

FetchGoogleDrive --> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-gcp-nar/1.19.0/org.apache.nifi.processors.gcp.drive.FetchGoogleDrive/index.html
ListGoogleDrive --> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-gcp-nar/1.19.0/org.apache.nifi.processors.gcp.drive.ListGoogleDrive/

 

 

Translate
ranaIrfan
ranaIrfanAuthor
Silver ⭐️
May 31, 2023 8:14 AM UTC

Thank you for reply.

Yes,you are right,I have the old version after the latest version I found the ListGoogleDrive processor.
Please let me know how to migrate old nifi process 1.17.0 to new version 1.21.0 .

Is there any way or need to create again all process.

Best regards,

Rana

 

Translate
cotopaul
cotopaulAnswer
Platinum ⭐️
May 31, 2023 10:01 AM UTC

Well I am not expert in migrating from a version to another so my answer might not be good enough for you :(. Besides that, I had no time to read the release notes for 1.21.0 and I am not quite sure if anything changed in terms of config files.

 

Assuming that you will keep the hostname and the port for each nifi node and you are using the embedded zookeeper, you should:
1. Stop the current NiFi instance.
2. Copy the authorizations.xml, authorizers.xml, bootstrap.conf, flow.json.gz, flow.xml.gz, logback.xml, login-identity-providers.xml, nifi.properties, stateless.properties, state-management.xml, users.xml and zookeeper.properties into the conf folder from within your new nifi instance.
3. Make sure that in nifi.properties, on your new instance, you are pointing to the same content repository, database repostiory (and all the other repositories) as in the previous instance --> assuming that you followed the best practices and had all those repositories moved on separate disks. Otherwise, make sure that you process all your data on your old instance and start fresh on your new instance.
4. Start the new NiFi Instance.

If you are just interested in migrating just the flows from the canvas, you can add all your flows into a template and save them on your local machine. Afterwards, you can open your new nifi instance, upload your template and add it to your canvas.

Translate