Skip to content

Commit 42af40d

Browse files
authored
Update how-to-access-data-interactive.md
1 parent 914727b commit 42af40d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

articles/machine-learning/how-to-access-data-interactive.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ uri = f'azureml://subscriptions/{subscription}/resourcegroups/{resource_group}/w
6969
```
7070
7171
These Datastore URIs are a known implementation of [Filesystem spec](https://filesystem-spec.readthedocs.io/en/latest/index.html) (`fsspec`): A unified pythonic interface to local, remote and embedded file systems and bytes storage.
72+
You can pip install the `azureml-fsspec`package and its dependency `azureml-dataprep` package. And then you can use the Azure Machine Learning Datastore implementation of `fsspec`.
7273
7374
The Azure Machine Learning Datastore implementation of `fsspec` automatically handles credential/identity passthrough used by the Azure Machine Learning datastore. This means you don't need to expose account keys in your scripts or do additional sign-in procedures on a compute instance.
7475
76+
7577
For example, you can directly use Datastore URIs in Pandas - below is an example of reading a CSV file:
7678
7779
```python
@@ -121,10 +123,10 @@ from azureml.fsspec import AzureMachineLearningFileSystem
121123
fs = AzureMachineLearningFileSystem('azureml://subscriptions/<subid>/resourcegroups/<rgname>/workspaces/<workspace_name>/datastore/datastorename')
122124

123125
# you can specify recursive as False to upload a file
124-
fs.upload(lpath='data/upload_files/crime-spring.csv', rpath='data/fsspec', recursive=False, **{'overwrite': MERGE_WITH_OVERWRITE})
126+
fs.upload(lpath='data/upload_files/crime-spring.csv', rpath='data/fsspec', recursive=False, **{'overwrite': 'MERGE_WITH_OVERWRITE'})
125127

126128
# you need to specify recursive as True to upload a folder
127-
fs.upload(lpath='data/upload_folder/', rpath='data/fsspec_folder', recursive=True, **{'overwrite': MERGE_WITH_OVERWRITE})
129+
fs.upload(lpath='data/upload_folder/', rpath='data/fsspec_folder', recursive=True, **{'overwrite': 'MERGE_WITH_OVERWRITE'})
128130
```
129131
`lpath` is the local path, and `rpath` is the remote path.
130132
If the folders you specify in `rpath` do not exist yet, we will create the folders for you.

0 commit comments

Comments
 (0)