Lesson 1 of 3 Data Assets and Environments

Understanding Data Assets

This lesson explains why data is registered as assets, how the uri_file, uri_folder and mltable types differ, and how data assets relate to datastores.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain what a data asset references.
  • Choose between uri_file, uri_folder and mltable.
  • Describe what an MLTable file defines.
  • Distinguish data assets from datastores.

Why register data

A training job could read data from a raw storage path, but a path says nothing about which version of the data was used, and its contents can change after the job ran. A data asset gives the data a name, a version, a description and tags, and records which jobs used it. When a model is registered from a job, its lineage then leads back to the exact data version, which is what auditors and debugging require.

A data asset does not copy data that already lives in Azure storage: it references it. Creating an asset from a local file or folder uploads it to the default datastore first. Because the asset references a location, the location should be treated as immutable for that version; refreshed data goes to a new path and becomes a new version.

The three types

Every data asset has one of three types, and the type tells the job how to present the data to the script.

TypeReferencesTypical use
uri_fileOne fileA CSV, Parquet or JSON file read by a script
uri_folderA folderImages, many files, or a model checkpoint folder
mltableFiles plus an MLTable definition of how to read them as a tableAutomated ML tabular jobs, and tables with a defined schema

An MLTable file describes the paths to read and transformations such as the file format, delimiter, encoding, column types and filters, so every consumer reads the table the same way. Automated ML requires mltable for tabular tasks such as classification, regression and forecasting.

# MLTable file stored next to the data files
paths:
  - pattern: ./*.csv
transformations:
  - read_delimited:
      delimiter: ","
      header: all_files_same_headers
      encoding: utf8

Creating data assets

Data assets are created from YAML with az ml data create, from the SDK, or in the studio. The path can be a datastore URI, a storage URI, a public HTTPS URL or a local path.

$schema: https://azuremlschemas.azureedge.net/latest/data.schema.json
name: churn-data
version: 3
type: uri_file
description: Customer churn training data, October 2026 snapshot
path: azureml://datastores/sales_lake/paths/churn/2026-10/churn.csv
tags:
  source: crm
  snapshot: 2026-10
az ml data create --file churn-data.yml --resource-group rg-ml-dev --workspace-name mlw-churn-dev

If the version is omitted, Azure Machine Learning assigns the next integer. Tags record facts such as the source system and snapshot date, which help others choose the right version and can be searched.

Data assets and datastores compared

Datastores and data assets are complementary rather than alternatives, and questions sometimes test which one solves a problem.

Datastore
RepresentsA connection to a storage service
VersionedNo
Holds credentialsOptionally
Used forDefining where and how to connect
Choose when You need to connect a storage account
Data asset
RepresentsSpecific data at a location
VersionedYes
Holds credentialsNever
Used forReproducible inputs to jobs and lineage
Choose when You need jobs to use a named, versioned dataset
Worked example

Choosing the asset type

A team stores daily CSV extracts of transactions in a folder, one file per day, all with the same columns. They want to train a classification model with automated ML on the last 90 days, and they want data scientists to see the data as one table with correct column types.

Create an mltable data asset whose MLTable file reads the CSV files in the folder with read_delimited, using a path pattern that covers the 90 days and column type conversions. Automated ML requires mltable for classification, and the MLTable definition gives every consumer the same table view.

A uri_folder asset would reference the files but give no table definition, and automated ML tabular tasks would not accept it. A uri_file asset references only one file. Merging the files into one CSV by hand would work once but would need repeating for each refresh.

Check yourself

An automated ML classification job rejects a uri_folder data asset. Which type does it need?

Show answer

mltable. Automated ML tabular tasks need an MLTable definition that describes how the files are read as a table.

Exam Tips

Remember for the exam

  • Data assets reference data; they do not copy data already in Azure storage.
  • uri_file, uri_folder and mltable; automated ML tabular tasks need mltable.
  • An MLTable file defines paths and how to read them as a table.
  • Datastores define connections; data assets define versioned data.