Solved

Why did GoodData rearrange the columns in my .csv file?

  • 7 July 2023
  • 7 replies
  • 56 views

Hi there! I’ve uploaded a .csv file to my workspace and when I wanted to update that file, I got an error. I downloaded the .csv template and it turns out that all the columns are now arranged in an alphabetical order.

So if the columns in my original .csv were "p_id","j_id","a_at","l_at","l_type","s","last_l"

the columns in the template are now "a_at","j_id","last_l","l_at","l_type","p_id","s" - i.e., ordered alphabetically.

Is that the reason why I am getting the error “Load data from file failed. We could not read data from the file. Make sure that the data corresponds with the structure in the header, and try again.”? If so, how can I prevent/revert this?

icon

Best answer by Iva Gasparekova 7 July 2023, 14:16

View original

7 replies

Userlevel 3

Hi Darina,

The error really indicates the source file doesn't match the template of your original CSV file used for creation of the dataset.
Are you aware of any recent changes of your model, please?

Also, is this affecting just one particular dataset or the whole model?

Hi Iva,

Thank you! I’ve looked into it a bit more and these are my findings: The simple fact that the columns are in a different order in the template .csv file does not seem to be a problem for the other .csv file in my workspace. The file which I want to upload to update one of the data sets, has the same structure as the previous one, but some of the values have been updated.

Let’s say that in the original file, the value in the “colour” column for id 2 was “blue”, but in the new file for id 2 the value is “red”. That is the only difference I am aware of. Might that be the problem? And if so, how do I go about changing/correcting values in the data sets?

Userlevel 3

Hi Darina,

That shouldn't be an issue here - data should get fully reloaded anyway. Do you still receive the same error message, please?
Could you try to retrieve a requestID or an errorId from your browser DevTools, while retrying to upload the CSV file?

Many thanks in advance.

Hi Iva,

Many thanks! I’ve tried again, in Firefox as well as Chrome, and I still get the error. In the DevTools Network Monitor, I don’t see an error per se - these are the requests/responses that appear:

I think that you might be interested in the POST request. I don’t see any RequestID field anywhere, but perhaps the X-GDC-REQUEST field from the Response Header could be helpful: X-GDC-REQUEST: data_load_UsJEmIEFsz_YUQudGgzHh:dn8lcYDJPZeUcoEB.

Or is there another part of the DevTools that I should be looking at instead?

Userlevel 3

This helps a lot, thank you!

Could you kindly review the dates in your CSV and make sure they are not out of our Platform limits and provided in supported format, please?

Would it be possible that some of your columns contain a year value "1899"? Date values need to be between the years 1900 and 2050.
 

Hi Iva,

Problem solved! It turns out that there were some NULL values among the dates in the updated file. They were probably interpreted as text and considered out of bounds. When I removed them, the upload was successful.

Thank you so much for your support and your patience! 🙏

The error message I kept getting said “Make sure that the data corresponds with the structure in the header, and try again.” So I thought that there was something wrong with the header or the structure of the data. Perhaps it would be useful - in case the load of a file fails - to include an indication of the reason why the load failed to point the user in the right direction. An error message suggesting that there is something wrong with some of the values might be more informative as to what needs to be fixed in a case like this.

Userlevel 3

Hi Darina,

Yay, so happy to hear so and thank you for your kind words!!!

I agree with you completely, I will make sure that our engineers are aware of this vague error message. We will try our best to improve the messaging and make it more user friendly.

Reply