Bug regarding types in az storage entity?
We have problems using Azure CLI to update a storage table (non-Cosmos). A string like "2021.4" will be converted to a Double and there seems to be no way to avoid that.
I have looked here: https://stackoverflow.com/questions/46834171/how-do-i-specify-the-field-types-when-using-the-azure-cli-entity-insert-command
but passing odata.type=Edm.String causes the call to fail in this case.
See the following commands:
az storage entity merge (account, table etc) --table-name Products --entity PartitionKey=”fisken” RowKey=”” DisplayVersion=”Fisk”
-> Success, data type is String
az storage entity merge (…) --entity PartitionKey=”fisken” RowKey=”” DisplayVersion=”2021”
-> Success, data type is Int64
az storage entity merge (…) --entity PartitionKey=”fisken” RowKey=”” **DisplayVersion=”2021” ****@odata.type=Edm.String
-> Success, data type is String
az storage entity merge (…) --entity PartitionKey=”fisken” RowKey=”” DisplayVersion=”2021.4”
-> Success, data type is Double
az storage entity merge (…) --entity PartitionKey=”fisken” RowKey=”” **DisplayVersion=”2021.4” ****@odata.type=Edm.String
-> ERROR!
Client-Request-ID=(...) Retry policy did not allow for a retry: Server-Timestamp=Fri, 17 Dec 2021 13:16:09 GMT, Server-Request-ID=(...), HTTP status code=400, Exception=Bad Request{"odata.error":{"code":"InvalidInput","message":{"lang":"en-US","value":"An error occurred while processing this request.\nRequestId:(...)\nTime:2021-12-17T13:16:09.9515564Z"}}}.
Bad Request
{"odata.error":{"code":"InvalidInput","message":{"lang":"en-US","value":"An error occurred while processing this request.\nRequestId:(...)\nTime:2021-12-17T13:16:09.9515564Z"}}}
Surely this must be a bug?