0
votes

Im new to using Azure and I am using Azure Storage explorer to import data from a csv file. The csv file contains fields with numbers in a decimal format along with other text fields. When I import the csv file (I select CSV (Comma delimited)), the field data types look correct as double for the numeric fields and string for the other fields when Storage explorer shows the column names from the csv file. So, I move forward with importing the csv file and everything is imported successfully.

However, when my app (its a C# Asp.Net MVC webapp) goes to retrieve an entity from the Azure Storage table containing the imported data, all I get back is the string data. The data that Azure Storage explorer saw as double, none of that data was retrieved. Instead, those fields end up getting assigned a null value in my app but i see them in the table in Azure Storage explorer.

Am i missing something that needs to go into my csv file or is there something configuration related that I need to do with my Azure storage account so that I can retrieve the data as i see it in the table?

It all looks straight forward with the import csv step but obviously im missing something.

Any help or guidance would be appreciated.

2
Can you share some more details please? Please include some screenshots, sample data and code you're using to fetch the data from the table.Gaurav Mantri
Gaurav, thanks for responding but, i have found the answer to my question. I'll post it here in case anyone else new to this might run into the same issue.Tim

2 Answers

2
votes

I should also mention that im new to NoSQL DB.

The problem was that I did not have the type definitions in my csv file for each of the entities.

My csv looked something like this at first:

PartitionKey|RowKey|Language|sample1|

country| 3 | English | 28.345 |

When it should have looked like this:

PartitionKey|RowKey|Language|Language@type|sample1|sample1@type|

country | 3 | English | Edm.String | 28.345 | Edm.Double |

After adding the types for the entities, I saved the csv file as filename.typed.csv Then uploaded it to my Azure Storage account and now I get all the values from my table as opposed to getting null for the sample1 (double) value i was getting at first.

Hope this helps someone else who may run into this. :)

0
votes

Try changing the delimited setting, instead of using comma in this cas as your working with numeric values I would suggest " or |