I am reading data from Kafka in NiFi and want to use a python script to upload the data into GCS. We have been using PutGCS Object processor in NiFi till now, but want to avoid using the GCP Controller services as we have to disable and enable them again when the GCP service account key changes (we have automated this via python).
So we are thinking to use a python script to get the data in the NiFi flowfile and write it to GCS. The problem is we do not want to write the data to a local file and then push it to GCS. Is there a way to write data held in a python variable directly to a file GCS?
We are looking for something similar to what is available for node.js like below:
How to upload an in memory file data to google cloud storage using nodejs? and
How to upload the multer file buffer in memory to google cloud storage bucket?