kanors-emr / Veda2.0-Installation

Veda2.0 is a data handling system for The Integrated MARKAL-EFOM System (TIMES) - a bottom-up optimization model for energy-environment systems
https://www.kanors-emr.org/
3 stars 0 forks source link

Handling of a "duplicate" column error #11

Closed olejandro closed 7 months ago

olejandro commented 1 year ago

Currently Veda shows that there is an error when two columns of the same nature (e.g. other_indexes and commodity_group) are present in an input table. However it won't tell what the error is.

Antti-L commented 10 months ago

I concur with that.
Recently I was very confused when I tried to be smart and specified SHAPE index data in a Valfield column (because it does not have a Region index) and some other parameters in the AllRegions column. I just got a red Error Status in the Task List, but no other visible explanation. By carefully inspecting the Process Log, I did also find there the suggestion: "Email the error log to support@kanors.com. " (@akanudia here you are). It took me a while to grasp that the Error was due to Valfield and AllRegions being both used, because looking at the log file was not too helpful either:

  Exception data:
    Severity: ERROR
    SqlState: 21000
    MessageText: more than one row returned by a subquery used as an expression

Valfield-err.txt

I also hope that using AllRegions does not mean that copies of the the SHAPE indexes are stored for all regions?

akanudia commented 10 months ago

We will either allow this duplication - previous cols being overwritten by subsequent ones (left to right), or give a clear error message.

@Antti-L, all global parameters are stored without a region index irrespective of how the values are specified by a user.

akanudia commented 7 months ago

@olejandro, version 3.0.1.0 recognizes duplications due to aliases as well.

olejandro commented 7 months ago

Thanks @akanudia