This app contains a full csv file dataset about countries. It is easy to use and I have not noticed problems during import.
Hi
I am not using docker so I imported the class and ran the Import() method as follows:
set sc=##class(dc.data.Country).Import(0,"D:\NiPaRobotica\iris-dataset-countries\data\CountryTable.csv",,1,.count)
Only 16 records were loaded. The method returned 16. I would have expected it to return a Status as there is a parameter RowCount, passed by reference, and it returned 0.
As the method does not return a Status O looked at %objlasterror and this is what it says:
w $system.Status.GetErrorText(sc)
ERROR #5794: Datatype validation failed on type '%Double', with value equal to "Republic"
ERROR #5802: Datatype validation failed on property 'dc.data.Country:gnp', with value equal to "Republic"
ERROR #7207: Datatype value 'Robert G. Mugabe' is not a valid number
ERROR #5802: Datatype validation failed on property 'dc.data.Country:gnpold', with value equal to "Robert G. Mugabe"
ERROR #7207: Datatype value '980,1669000,37.8,595' is not a valid number
ERROR #5802: Datatype validation failed on property 'dc.data.Country:independenceyear', with value equal to "980,1669000,37.8,595"
ERROR #7207: Datatype value 'Zimbabwe' is not a valid number
ERROR #5802: Datatype validation failed on property 'dc.data.Country:lifeexpectancy', with value equal to "Zimbabwe"
So, something is causing a number of records to fail when saved.
The csv file opens correctly in Excel and there are 240 countries. There is nothing that I can see in Excel that would indicate a problem.
Nigel Salm