Azure ML SDK v2 Data Asset Protocol Selection

AI-300 By islever Editorial Last updated

Short answer

Select wasbs for the Path protocol and URI_FOLDER for the Asset type.

Question

HOTSPOT
You manage an Azure Machine Learning workspace named workspace1 by using the Python SDK v2. You create a General Purpose v2 Azure storage account named mlstorage1. The storage account includes a publicly accessible container named mlcontainer1. The container stores 10 blobs with files in the CSV format.
You must develop Python SDK v2 code to create a data asset referencing all blobs in the container named mlcontainer1.
You need to complete the Python SDK v2 code.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Exhibit: Azure ML SDK v2 Data Asset Protocol Selection

Key Takeaways

The main trap is confusing wasbs (standard blob) with abfss (Data Lake Gen 2); always match the protocol to the underlying storage service type.

Learn how to correctly configure Azure Machine Learning SDK v2 data assets for public blob containers by selecting the wasbs protocol and URI_FOLDER asset type.

Common mistake: Learners often select abfss because it is common in Databricks and Data Lake scenarios, but it fails here because the storage is a standard General Purpose v2 blob container, not a Data Lake Gen 2 filesystem.

Expert Analysis

The scenario requires creating a data asset in an Azure Machine Learning workspace that references a publicly accessible Blob Storage container using the Python SDK v2. The key constraint is the storage account type and access level: it is a General Purpose v2 account with a public container.

The most attractive but incorrect approach is to use the azureml:// protocol or abfss://. Learners often confuse these because azureml:// is used for internal workspace assets, and abfss:// is standard for Data Lake Gen 2 (which uses hierarchical namespaces). However, the question specifies a standard Blob Storage container without mentioning hierarchical namespaces. Using abfss:// would fail or be inappropriate for a non-hierarchical blob container. Similarly, azureml:// refers to assets stored within the workspace's managed storage, not external public containers.

The correct solution relies on recognizing that wasbs:// (Web HDFS Secure) is the supported URI scheme for accessing Azure Blob Storage via the SDK when dealing with public or SAS-authenticated blobs in this context. Specifically, for a public container, the path format wasbs://<container-name>@<account-name>.blob.core.windows.net/ allows direct read access. Since the goal is to reference all blobs in the container as a folder-like asset, the asset type must be defined as URI_FOLDER. This tells the SDK to treat the entire container content as a single directory structure rather than individual files. Therefore, the protocol is wasbs://, and the asset type is URI_FOLDER.

Comments support this by distinguishing between wasbs (Blob), abfss (Data Lake Gen 2), and azureml (Workspace internal), confirming that wasbs is the correct choice for general blob storage.

Official Reference

Exam Strategy

When configuring data assets in Azure ML, always check if the source storage has hierarchical namespaces enabled. If it is a standard Blob Storage container (even GPv2), use wasbs://. If it is a Data Lake Gen 2 filesystem, use abfss://. For public containers, ensure you are not trying to use azureml:// which is reserved for internal workspace management.

Frequently Asked Questions

What is the difference between wasbs and abfss protocols?

wasbs is used for Azure Blob Storage containers without hierarchical namespaces. abfss is used for Azure Data Lake Storage Gen 2, which supports hierarchical namespaces and file-system-like operations.

Can I use azureml:// for external blob containers?

No, azureml:// is used for data assets stored within the Azure ML workspace's managed storage. External public or private containers require wasbs:// or https:// depending on authentication.

More AI-300 FAQ →

Discussion 3 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 3

  1. rveney 👍 8
    Path: wasbs Type: URI_FOLDER
  2. cayenne06 👍 4
    I think it's wasbs for blob storage access. Abfss is for Data Lake Gen 2 and azureml for internal storage of azure ml.
  3. exam_upskill 👍 1
    Path protocol: wasbs Asset type: URI_FOLDER wasbs is the appropriate choice because the path directly references an Azure Blob Storage container.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to AI-300 Study Guide