Archi Forum

Archi => General Archi Discussion => Topic started by: Pascal Dussart on April 07, 2017, 10:22:34 AM

Title: space-character preventing csv-import in Archi 4 beta 8
Post by: Pascal Dussart on April 07, 2017, 10:22:34 AM
Just found out that a simple space character in combination with one or more comma-signs between quotes-as-delimiters can lead to a lot of head-scratching

elements.csv:
"ID","Type","Name","Documentation"
,"BusinessProcess","zzProcess1", "No comma in the Documentation and a space before the previous quote. This will import just fine"
,"BusinessProcess","zzProcess2","A comma in the Documentation, with no space before the previous quote. This will import just fine"
,"BusinessProcess","zzProcess3", "A comma in the Documentation, but with a space before the previous quote. This will throw an Incorrect record size"

Not sure if this works as expected (part of the official csv-spec, if there is such a thing?), or if it is Archi being too strict while importing csv (I don't think you can be too strict while importing anything,btw, as long as it is documented)


What I've also noticed: when importing the first line in the example above (with the space-character before the quote), the corresponding Documentation-field for that element will also contain the surrounding quotes (I'd expect them to be stripped). When importing the second line, the surrounding quotes were stripped correctly from the corresponding Documentation-field.

cheers
pascal
Title: Re: space-character preventing csv-import in Archi 4 beta 8
Post by: Phil Beauvoir on April 07, 2017, 10:34:13 AM
Hi, I just tested this. It seems that you must not have spaces between comma separated fields for it to work OK.

Phil
Title: Re: space-character preventing csv-import in Archi 4 beta 8
Post by: Pascal Dussart on April 07, 2017, 10:42:06 AM
Yes, I know. I was simply reporting this for future reference  ;)

pascal
Title: Re: space-character preventing csv-import in Archi 4 beta 8
Post by: Phil Beauvoir on April 07, 2017, 10:44:43 AM
Quote from: Pascal Dussart on April 07, 2017, 10:42:06 AM
Yes, I know. I was simply reporting this for future reference  ;)

pascal

OK. Yes, thanks. Might be worth me mentioning this in the documentation.