Skip to content

Commit 8b42830

Browse files
authored
Update how-to-access-data-interactive.md
1 parent 7cb704a commit 8b42830

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,17 @@ from azureml.fsspec import AzureMachineLearningFileSystem
117117
fs = AzureMachineLearningFileSystem('azureml://subscriptions/<subid>/resourcegroups/<rgname>/workspaces/<workspace_name>/datastore/datastorename')
118118

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

122122
# you need to specify recursive as True to upload a folder
123-
fs.upload(lpath='data/upload_folder/', rpath='data/fsspec_folder', recursive=True, **{'overwrite': True})
124-
123+
fs.upload(lpath='data/upload_folder/', rpath='data/fsspec_folder', recursive=True, **{'overwrite': MERGE_WITH_OVERWRITE})
125124
```
126125

126+
We support 3 modes for 'overwrite':
127+
- APPEND: if there is already a file with the same name in the destination path, will keep the original file
128+
- FAIL_ON_FILE_CONFLICT: if there is already a file with the same name in the destination path, will throw an error
129+
- MERGE_WITH_OVERWRITE: if there is already a file with the same name in the destination path, will overwrite with the new file
130+
127131
### Download files via AzureMachineLearningFileSystem
128132
```python
129133
# you can specify recursive as False to download a file

0 commit comments

Comments
 (0)