Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insert_table_entity bug certain characters fail with 400 error #7

Open
SPFL-Analysis opened this issue May 24, 2024 · 0 comments
Open

Comments

@SPFL-Analysis
Copy link

SPFL-Analysis commented May 24, 2024

Hello,

I am using table storage and getting a 400 error when using insert_table_entity to try and insert an entity with property of type string that contains a £ sign. Although I don't get the error when using import_table_entities. Example below, any help welcome.
(Using R v4.3.3 on windows and latest available versions of all packages)

Thanks.

key <- "<key>"
tblendpoint <- "<endpoint>"
tblname <- "<tblname>"

df <- data.frame(
  PartitionKey = rep("testtbl", 2),
  RowKey = as.character(1:2),
  Mystring = c("text", "£")
)

endp <- AzureTableStor::table_endpoint(tblendpoint, key = key)
AzureTableStor::create_storage_table(endp, tblname)
tab <- AzureTableStor::storage_table(endp, tblname)

AzureTableStor::import_table_entities(tab, data = df)

tblDl <- try(AzureTableStor::list_table_entities(tab))

testOk <- list(
  PartitionKey = "testtbl",
  RowKey = "3",
  Mystring = "some text"
)

AzureTableStor::insert_table_entity(tab, testOk)

# this will fail with a 400 error
testFail <- list(
  PartitionKey = "testtbl",
  RowKey = "6",
  Mystring = "some text with key <- "<key>"
tblendpoint <- "<endpoint>"
tblname <- "<tblname>"

df <- data.frame(
  PartitionKey = rep("testtbl", 2),
  RowKey = as.character(1:2),
  Mystring = c("text", "£")
)

endp <- AzureTableStor::table_endpoint(tblendpoint, key = key)
AzureTableStor::create_storage_table(endp, tblname)
tab <- AzureTableStor::storage_table(endp, tblname)

AzureTableStor::import_table_entities(tab, data = df)

tblDl <- try(AzureTableStor::list_table_entities(tab))

testOk <- list(
  PartitionKey = "testtbl",
  RowKey = "3",
  Mystring = "some text"
)

AzureTableStor::insert_table_entity(tab, testOk)

# this will fail with a 400 error
testFail <- list(
  PartitionKey = "testtbl",
  RowKey = "6",
  Mystring = "some text with £"
)

AzureTableStor::insert_table_entity(tab, testFail)"
)

AzureTableStor::insert_table_entity(tab, testFail)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant