1

1: I created a datastore using azure blob Storage and I selected the table which is in parquet format now i am using that table while data assets creation.

2: I am able to create a dataframe of that data asset but..

Can I perform query operation on that azure data asset inside Azure ML notebook ??

I want to perform some DQL operation on those data.

2 Answers2

1

The below code will read from a data asset named 'MyDataAssetName' and read it into a Pandas dataframe.

from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential
import mltable
aml_client = MLClient.from_config(credential=DefaultAzureCredential())
aml_data_asset = aml_client.data.get(name="MyDataAssetName", version="1")
path_to_data_asset = { 'file': aml_data_asset.path}
mltbl = mltable.from_delimited_files(paths=[path_to_data_asset])
my_df = mltbl.to_pandas_dataframe()
my_df.head()
JStrahl
  • 444
  • 1
  • 8
  • 18
  • Ref: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-access-data-interactive?tabs=adls#file-asset – JStrahl Mar 28 '23 at 15:02
0

Here are the docs on working with Tables in AzureML:

https://learn.microsoft.com/en-us/azure/machine-learning/how-to-mltable?tabs=cli%2Cadls

MLTable allows you to do certain transformations on the data, such as reading, subsetting, enforcing schema.

Sam Kemp
  • 21
  • 2