Azure / Azure/azure-sdk-for-python

Documentation for upload_data parameter is confusing

Open
#43,478 1 comment 0 reactions 2 assignees Claimed by @jalauzon-msft View on GitHub
Client customer-reported needs-team-attention question Service Attention Storage
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

### Type of issue

Missing information

### Description

The documentation for the parameter `overwrite` to the function `upload_data`, is currently

> to overwrite an existing file or not.

This lead me to believe that I should set it to true if I wanted to overwrite a file, and that if it was false it would signal an error if I tried to write to a file that already exists.

However, what seems to be the case is that if it is set to false, it will try to append the data to an existing file, and fail it it does not exist.

If that is the case, I would suggest to write something along the lines of

> Append the data to an existing file if false. If true, create a new file or overwrite an existing one.

### Page URL

https://learn.microsoft.com/en-us/python/api/azure-storage-file-datalake/azure.storage.filedatalake.datalakefileclient?view=azure-python#azure-storage-filedatalake-datalakefileclient-upload-data

### Content source URL

https://github.com/MicrosoftDocs/azure-docs-sdk-python/blob/main/docs-ref-autogen/azure-storage-file-datalake/azure.storage.filedatalake.DataLakeFileClient.yml

### Document Version Independent Id

5399f9d1-65df-b907-aee4-69584cc3e7f1

### Platform Id

16b0a723-a007-f205-99c8-96e03a7faea9

### Article author

@lmazuel

### Metadata

* ID: 50acce08-5aa7-19f6-a652-d8606ad7595d
* PlatformId: 16b0a723-a007-f205-99c8-96e03a7faea9
* Service: **azure-storage**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.