Skip to content

Commit 0c51437

Browse files
Merge pull request #234909 from fbsolo-ms1/updates-for-AMAR
File and TOC updates.
2 parents 6848118 + a3851ec commit 0c51437

File tree

3 files changed

+80
-27
lines changed

3 files changed

+80
-27
lines changed

articles/machine-learning/how-to-connection.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Use connections (preview)
2+
title: Create connections to external data sources (preview)
33
titleSuffix: Azure Machine Learning
44
description: Learn how to use connections to connect to External data sources for training with Azure Machine Learning.
55
services: machine-learning
@@ -9,7 +9,7 @@ ms.topic: how-to
99
ms.author: ambadal
1010
author: AmarBadal
1111
ms.reviewer: franksolomon
12-
ms.date: 04/11/2023
12+
ms.date: 04/18/2023
1313
ms.custom: data4ml
1414

1515
# Customer intent: As an experienced data scientist with Python skills, I have data located in external sources outside of Azure. I need to make that data available to the Azure Machine Learning platform, to train my machine learning models.
@@ -34,9 +34,34 @@ In this article, learn how to connect to data sources located outside of Azure,
3434

3535
- An Azure Machine Learning workspace.
3636

37-
> [!NOTE]
37+
> [!IMPORTANT]
3838
> An Azure Machine Learning connection securely stores the credentials passed during connection creation in the Workspace Azure Key Vault. A connection references the credentials from the key vault storage location for further use. You won't need to directly deal with the credentials after they are stored in the key vault. You have the option to store the credentials in the YAML file. A CLI command or SDK can override them. We recommend that you **avoid** credential storage in a YAML file, because a security breach could lead to a credential leak.
3939
40+
> [!NOTE]
41+
> For a successful data import, please verify that you have installed the latest azure-ai-ml package (version 1.5.0 or later) for SDK, and the ml extension (version 2.15.1 or later).
42+
>
43+
> If you have an older SDK package or CLI extension, please remove the old one and install the new one with the code shown in the tab section. Follow the instructions for SDK and CLI below:
44+
45+
### Code versions
46+
47+
# [SDK](#tab/SDK)
48+
49+
```python
50+
pip uninstall azure-ai-ml
51+
pip install azure-ai-ml
52+
pip show azure-ai-ml #(the version value needs to be 1.5.0 or later)
53+
```
54+
55+
# [CLI](#tab/CLI)
56+
57+
```cli
58+
az extension remove -n ml
59+
az extension add -n ml --yes
60+
az extension show -n ml #(the version value needs to be 2.15.1 or later)
61+
```
62+
63+
---
64+
4065
## Create a Snowflake DB connection
4166

4267
# [CLI: Username/password](#tab/cli-username-password)
@@ -95,8 +120,9 @@ from azure.ai.ml.entities import UsernamePasswordConfiguration
95120

96121
target= "jdbc:snowflake://<myaccount>.snowflakecomputing.com/?db=<mydb>&warehouse=<mywarehouse>&role=<myrole>"
97122
# add the Snowflake account, database, warehouse name and role name here. If no role name provided it will default to PUBLIC
98-
99-
wps_connection = WorkspaceConnection(type="snowflake",
123+
name= <my_snowflake_connection> # name of the connection
124+
wps_connection = WorkspaceConnection(name= name,
125+
type="snowflake",
100126
target= target,
101127
credentials= UsernamePasswordConfiguration(username="XXXXX", password="XXXXXX")
102128
)
@@ -168,7 +194,9 @@ from azure.ai.ml.entities import UsernamePasswordConfiguration
168194
target= "Server=tcp:<myservername>,<port>;Database=<mydatabase>;Trusted_Connection=False;Encrypt=True;Connection Timeout=30"
169195
# add the sql servername, port addresss and database
170196

171-
wps_connection = WorkspaceConnection(type="azure_sql_db",
197+
name= <my_sql_connection> # name of the connection
198+
wps_connection = WorkspaceConnection(name= name,
199+
type="azure_sql_db",
172200
target= target,
173201
credentials= UsernamePasswordConfiguration(username="XXXXX", password="XXXXXX")
174202
)
@@ -228,7 +256,9 @@ from azure.ai.ml.entities import WorkspaceConnection
228256
from azure.ai.ml.entities import AccessKeyConfiguration
229257

230258
target = "https://<mybucket>.amazonaws.com" # add the s3 bucket details
231-
wps_connection = WorkspaceConnection(type="s3",
259+
name=<my_s3_connection> # name of the connection
260+
wps_connection = WorkspaceConnection(name=name,
261+
type="s3",
232262
target= target,
233263
credentials= AccessKeyConfiguration(access_key_id="XXXXXX",acsecret_access_key="XXXXXXXX")
234264
)

articles/machine-learning/how-to-import-data-assets.md

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: Import Data (preview)
2+
title: Import data (preview)
33
titleSuffix: Azure Machine Learning
4-
description: Learn how to import data from external sources on to Azure Machine Learning platform
4+
description: Learn how to import data from external sources to the Azure Machine Learning platform.
55
services: machine-learning
66
ms.service: machine-learning
77
ms.subservice: mldata
88
ms.topic: how-to
99
ms.author: ambadal
1010
author: AmarBadal
1111
ms.reviewer: franksolomon
12-
ms.date: 04/12/2023
12+
ms.date: 04/18/2023
1313
ms.custom: data4ml
1414
---
1515

@@ -43,9 +43,34 @@ To create and work with data assets, you need:
4343

4444
* [Workspace connections created](how-to-connection.md)
4545

46-
## Importing from external database sources / import from external sources to create a mltable data asset
46+
> [!NOTE]
47+
> For a successful data import, please verify that you have installed the latest azure-ai-ml package (version 1.5.0 or later) for SDK, and the ml extension (version 2.15.1 or later).
48+
>
49+
> If you have an older SDK package or CLI extension, please remove the old one and install the new one with the code shown in the tab section. Follow the instructions for SDK and CLI below:
50+
51+
### Code versions
52+
53+
# [SDK](#tab/SDK)
4754

48-
> [!NOTE]
55+
```python
56+
pip uninstall azure-ai-ml
57+
pip install azure-ai-ml
58+
pip show azure-ai-ml #(the version value needs to be 1.5.0 or later)
59+
```
60+
61+
# [CLI](#tab/CLI)
62+
63+
```cli
64+
az extension remove -n ml
65+
az extension add -n ml --yes
66+
az extension show -n ml #(the version value needs to be 2.15.1 or later)
67+
```
68+
69+
---
70+
71+
## Importing from an external database source as a table data asset
72+
73+
> [!NOTE]
4974
> The external databases can have Snowflake, Azure SQL, etc. formats.
5075
5176
The following code samples can import data from external databases. The `connection` that handles the import action determines the external database data source metadata. In this sample, the code imports data from a Snowflake resource. The connection points to a Snowflake source. With a little modification, the connection can point to an Azure SQL database source and an Azure SQL database source. The imported asset `type` from an external database source is `mltable`.
@@ -87,7 +112,7 @@ from azure.ai.ml import MLClient
87112
# Supported connections include:
88113
# Connection: azureml:<workspace_connection_name>
89114
# Supported paths include:
90-
# Datastore: azureml://datastores/<data_store_name>/paths/<my_path>/${{name}}
115+
# path: azureml://datastores/<data_store_name>/paths/<my_path>/${{name}}
91116

92117
ml_client = MLClient.from_config()
93118

@@ -102,7 +127,7 @@ ml_client.data.import_data(data_import=data_import)
102127

103128
---
104129

105-
## Import data from external data and file system resources to create a uri_folder data asset
130+
## Import data from an external file system source as a folder data asset
106131

107132
> [!NOTE]
108133
> An Amazon S3 data resource can serve as an external file system resource.
@@ -120,7 +145,7 @@ $schema: http://azureml/sdk-2-0/DataImport.json
120145
# Supported connections include:
121146
# Connection: azureml:<workspace_connection_name>
122147
# Supported paths include:
123-
# Datastore: azureml://datastores/<data_store_name>/paths/<my_path>/${{name}}
148+
# path: azureml://datastores/<data_store_name>/paths/<my_path>/${{name}}
124149

125150

126151
type: uri_folder
@@ -148,7 +173,7 @@ from azure.ai.ml import MLClient
148173
# Supported connections include:
149174
# Connection: azureml:<workspace_connection_name>
150175
# Supported paths include:
151-
# Datastore: azureml://datastores/<data_store_name>/paths/<my_path>/${{name}}
176+
# path: azureml://datastores/<data_store_name>/paths/<my_path>/${{name}}
152177

153178
ml_client = MLClient.from_config()
154179

@@ -194,4 +219,4 @@ ml_client.data.show_materialization_status(name="<name>")
194219

195220
- [Read data in a job](how-to-read-write-data-v2.md#read-data-in-a-job)
196221
- [Working with tables in Azure Machine Learning](how-to-mltable.md)
197-
- [Access data from Azure cloud storage during interactive development](how-to-access-data-interactive.md)
222+
- [Access data from Azure cloud storage during interactive development](how-to-access-data-interactive.md)

articles/machine-learning/toc.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,14 @@
594594
- name: Create data assets
595595
displayName: Create data assets
596596
href: how-to-create-data-assets.md
597+
- name: Create data assets by importing data from external sources
598+
items:
599+
- name: Create connections to external data sources (preview)
600+
displayName: Create connections to external data sources (preview)
601+
href: how-to-connection.md
602+
- name: Import data (preview)
603+
displayName: Import data (preview)
604+
href: how-to-import-data-assets.md
597605
- name: Access and explore your data
598606
items:
599607
- name: Access data during interactive development
@@ -602,12 +610,6 @@
602610
- name: Access data in jobs
603611
displayName: Access data in jobs
604612
href: how-to-read-write-data-v2.md
605-
- name: Import data
606-
displayName: Import data
607-
href: how-to-import-data-assets.md
608-
- name: Use connections
609-
displayName: Use connections
610-
href: how-to-connection.md
611613
- name: Working with Tables (mltable)
612614
displayName: Working with Tables (mltable)
613615
href: how-to-mltable.md
@@ -1086,8 +1088,6 @@
10861088
href: how-to-use-pipeline-ui.md
10871089
- name: How to use parallel job in pipeline
10881090
href: how-to-use-parallel-job-in-pipeline.md
1089-
- name: How to use pipeline component in pipeline
1090-
href: how-to-use-pipeline-component.md
10911091
# v1
10921092
- name: Create ML pipelines (Python)
10931093
href: ./v1/how-to-create-machine-learning-pipelines.md
@@ -1235,8 +1235,6 @@
12351235
href: reference-yaml-model.md
12361236
- name: Schedule
12371237
href: reference-yaml-schedule.md
1238-
- name: Pipeline component
1239-
href: reference-yaml-component-pipeline.md
12401238
- name: Compute
12411239
items:
12421240
- name: Compute cluster (AmlCompute)

0 commit comments

Comments
 (0)