NIFI-6913: PutAzureBlobStorage processor will create container if not exists

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #4237.
This commit is contained in:
Sushil Kumar 2020-04-27 16:44:55 -07:00 committed by Pierre Villard
parent 647a9a60b7
commit 851359c1fc
No known key found for this signature in database
GPG Key ID: BEE1599F0726E9CD
2 changed files with 2 additions and 1 deletions

View File

@ -75,6 +75,7 @@ public class PutAzureBlobStorage extends AbstractAzureBlobProcessor {
try {
CloudBlobClient blobClient = AzureStorageUtils.createCloudBlobClient(context, getLogger(), flowFile);
CloudBlobContainer container = blobClient.getContainerReference(containerName);
container.createIfNotExists();
CloudBlob blob = container.getBlockBlobReference(blobPath);

View File

@ -88,7 +88,7 @@ public final class AzureStorageUtils {
public static final PropertyDescriptor CONTAINER = new PropertyDescriptor.Builder()
.name("container-name")
.displayName("Container Name")
.description("Name of the Azure storage container")
.description("Name of the Azure storage container. In case of PutAzureBlobStorage processor, container will be created if it does not exist.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.required(true)