I'm drawing a NiFi pipeline to move files from a remote filesystem to a bucket on Google Cloud Storage. The goal is to move files to specific folders (to be created automatically if they do not exist) in a bucket based on their name.
Entering the path (e.g. bucketname/subdir) as the processor's "bucket" property returns error.
Any of you have done this task before? How to upload files to a specific subfolder in a Google Cloud bucket?
Thanks in advance
I believe you need to put the subdir
as part of the key property on that processor -- GCS buckets are one level and all objects within can be in subdirectories but that path is part of the key. The key property supports NiFi Expression Language, so you can construct various keys based on flowfile attributes, etc. (e.g. literalFolder/${subDirFromAttribute}/${filename}
).