How do I register ADLS as datastore in AMLW (via cli) corrcetly?

Linn Eklund Öström 1 Reputation point
2022-11-21T14:34:58.113+00:00

Hi!

I'm trying to create a datastore from an ADLS (Gen2) using azure cli (using version 2.42), with credentials using service principal. The service principal is added as Storage Blob Data Reader to my ADLS. I use the following schema (with XXX replaced by correct details), file is named create-datastore-azure-adls.yml .

$schema: https://azuremlschemas.azureedge.net/latest/azureDataLakeGen2.schema.json
type: azure_data_lake_gen2
name: XXX
description: Datastore, ADLS and service principal
account_name: XXX
filesystem: XXX
credentials:
tenant_id: XXX
client_id: XXX
client_secret: XXX

and run
az ml datastore create --file create-datastore-azure-adls.yml --workspace-name $WORKSPACENAME --resource-group $RESOURCENAME --subscription $SUBSCRIPTIONID

The datastore ends up in my workspace but I can't read from the datastore. When I look at it in the workspace it is not connected to any subscription-id nor resource group (see image).

262722-screenshot-from-2022-11-21-15-09-46.png

However, if I choose update authentication and fill in subscription-id and resource group everything works. So my question is if there is any way I can't do it correctly, only using the cli, eg. adding this info (subscription-id and rg-name) to the schema? So I don't have to update authentication in the workspace every time :)

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,712 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.