Azure table storage names - invalid characters
Asked Answered
G

3

4

I have the following table names in Azure table storage. Table names are generated automatically in my application and then created using table.CreateIfNotExists(tableName). Some work and some don't. When I dig into the error the extended error information tells me that the resource name contains invalid characters - however I am at a loss to work out what is invalid in the failing names - can anyone spot this?

8836461cc98249bea59dc5f6790d40edstk365developmentusers

– the specified resource name contains invalid characters

8836461cc98249bea59dc5f6790d40edstk365developmenttasks

– the specified resource name contains invalid characters

af0589646af645b98f749d92a5b2ee25stk365developmentusers

– works

Grecoroman answered 25/7, 2017 at 13:58 Comment(0)
A
6

Table names cannot start with a number. So your first example, starting with 8, isn't valid.

Table names are also limited to 63 characters. You haven't shown how you're generating names, but that could also be a limitation you're running into.

Full rule details are here.

Anechoic answered 25/7, 2017 at 14:6 Comment(1)
Perfect - thanks. The prefix is a guid (with - removed) - I'll fix up the ones starting with a number. Should be under 63 characters but I'll add a check for that too.Grecoroman
H
2

I was also getting this error when I was trying to upload a file to my azure blob storage.

enter image description here

My issue was that the container name I used was stating with a capital letters (Daily). Once I changed my parameter schedule value to start with small letter (daily), I started to receive the actual error, which is The specified container does not exist. as I had not created the container in my blob. After I create the container with the name daily, everything started working as expected.

enter image description here

Hifalutin answered 24/7, 2019 at 10:3 Comment(0)
L
0

I also ran into this recently. I was using the Azure CLI with Powershell and found that you cannot use variable names with the command. You also have to use quotes around the container name, and they must be lowercase.

So, for example:

$containerName = "gamers"
az storage container create `
 --name $containerName `
 --connection-string $connectionString

Does not work but:

az storage container create `
 --name 'gamers' `
 --connection-string $connectionString

Does work as expected. I tried even setting up the variable to have the quotes but no luck. I hope this helps someone in the future.

Lepidote answered 21/2, 2020 at 14:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.