1
votes

I've got a CSV I've manipulated and have built a partition schema for my Azure Table. Using Building No for Partition (3-16) and the row keys are individual data points in time from a known point.

I'm having trouble when I upload my CSV to the table, at the moment I'm using Azure Storage Explorer and setting all parameters correctly. The problem is that the partition key is not staying the same once uploaded. It is auto incrementing in a strange way.

I've tried changing it from numeric to character in R before the export. I'm having to use Excel to make it work through import text for the CSV,I am formatting the column as text too. It does seem rather weird way to do it.

Two things I need help with if you can. Anyone got a way I can use write.table or an R function to write my Data frame correctly to CSV for instant upload

And why/how do I fix the Partition Key problem?

1
What do you mean, that the partition number is incrementing in a strange way? Are you referring to the fact that your query is in an unexpected order? Looks like it's simply sorted lexicographically.David Makogon
@DavidMakogon The Partition key can be the same for elements so long as the row key within a partition is unique right? I want all data for say building 1 to use the partition key value 1 and then I can reference the row key (it acts as a specific data point in my time series). The query is sorted Lexicographically yeah, that's fine but of course. I never set the values in the partition column. See my edited answer for an example of the CSV before upload. Do I have to define a schema somewhere in azure maybe?Joen123

1 Answers

1
votes

It looks like your CSV row key is being interpreted as the partition key and the CSV "day" field is being interpreted as the row key. Please double check the mechanism you used to import it to the table. It wouldn't surprise me if whatever import mechanism was used assumes the first CSV field is the partition key and the second CSV field is the row key.

It is no great surprise the the key is sorted lexicographically because the partition key and row key are strings.