{"record":{"id":"eeecdaf3456e6b81","repo":"apache/beam","slug":"this-container-does-not-exist-creating-containers-is-not","errorCode":null,"errorMessage":"This container does not exist. Creating containers is not supported.","messagePattern":"This container does not exist\\. Creating containers is not supported\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/azure/src/main/java/org/apache/beam/sdk/io/azure/blobstore/AzureBlobStoreFileSystem.java","lineNumber":274,"sourceCode":"    }\n\n    return MatchResult.create(\n        MatchResult.Status.OK,\n        ImmutableList.of(\n            toMetadata(\n                path.withSize(blobProperties.getBlobSize())\n                    .withLastModified(Date.from(blobProperties.getLastModified().toInstant())),\n                blobProperties.getContentEncoding(),\n                blobProperties.getETag())));\n  }\n\n  @Override\n  protected WritableByteChannel create(AzfsResourceId resourceId, CreateOptions createOptions)\n      throws IOException {\n    BlobContainerClient blobContainerClient =\n        client.get().getBlobContainerClient(resourceId.getContainer());\n    if (!blobContainerClient.exists()) {\n      throw new FileNotFoundException(\n          \"This container does not exist. Creating containers is not supported.\");\n    }\n\n    BlobClient blobClient = blobContainerClient.getBlobClient(resourceId.getBlob());\n    // The getBlobOutputStream method overwrites existing blobs,\n    // so throw an error in this case to prevent data loss\n    if (blobClient.exists()) {\n      throw new IOException(\"This filename is already in use.\");\n    }\n\n    OutputStream outputStream;\n    try {\n      outputStream = blobClient.getBlockBlobClient().getBlobOutputStream();\n    } catch (BlobStorageException e) {\n      throw (IOException) e.getCause();\n    }\n    return newChannel(outputStream);\n  }","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/azure/src/main/java/org/apache/beam/sdk/io/azure/blobstore/AzureBlobStoreFileSystem.java#L256-L292","documentation":"AzureBlobStoreFileSystem.create refuses to write when the target blob's container does not exist, throwing FileNotFoundException('This container does not exist. Creating containers is not supported.'). The connector never auto-creates containers, so the destination must pre-exist.","triggerScenarios":"Writing to an azure:// account.container/blob path whose container has not been created; create() checks blobContainerClient.exists() and fails.","commonSituations":"Typo in the container name, pointing output at a new environment (staging/prod) where the container was never provisioned, assuming the connector creates containers like a local filesystem creates directories.","solutions":["Create the container beforehand, e.g. `az storage container create --name mycontainer --account-name ...`.","Verify the container name in the output path matches an existing container (case-sensitive).","Add a pre-provisioning step to pipeline deployment (Terraform/CLI) for all output containers.","Check credentials can see the container — missing permissions can surface as 'does not exist'."],"exampleFix":"// before\n.apply(\"Write\", TextIO.write().to(\"azure://account.newcontainer/output\"));\n// after\n// run first: az storage container create --name newcontainer\n.apply(\"Write\", TextIO.write().to(\"azure://account.newcontainer/output\"));","handlingStrategy":"validation","validationCode":"// ensure the container exists before writing\naz storage container exists --name $CONTAINER --account-name $ACCOUNT","typeGuard":null,"tryCatchPattern":"try {\n  filesink.write();\n} catch (FileNotFoundException e) {\n  if (e.getMessage().contains(\"container does not exist\")) {\n    log.error(\"Create the container first: az storage container create --name \" + container);\n  }\n}","preventionTips":["Provision containers as part of deployment (IaC or CLI pre-step)","Validate output paths (container exists) before pipeline launch","Watch for container-name typos and case sensitivity","Ensure credentials allow container-level existence checks (list permission)"],"tags":["azure","blobstore","container","file-not-found"],"backgroundTag":"resource-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}