Add support for different column separator in csv import logic #1096
Reference in New Issue
Block a user
Delete Branch "csv-col-sep-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As we all know, CSV is not always "comma separated values". It is often separated by other characters such as ";" or "|". This PR opens the model layer to support multiple column separators. The implementation is now able to import files with "," and ";" separators. More may come.
Important to know: The normalized representation
normalized_csv_stris still separated by comma (",").I would also like to implement the view support. But I don't want to do anything without a little guidance on what would be a good solution. Maybe just a selector below the upload field or a hidden section with "advanced import options".
@code-constructor I think this all looks good and I'm definitely supportive of adding it in since a lot of non-US imports will have
;as the separator.In terms of the UI, what do you think of grabbing this information on the very first step?
Long term, we'll probably take a second pass at the design of this entire feature and will put this in a more permanent place, but for now this seems like it gets the job done.
Did an update of the Pull-Request. I've implemented your idea 👍. Thanks for the really fast response. Was a pleasure 🙏
Awesome, very nice addition! Just added a little suggestion to fix some form spacing. Otherwise looks and works great.
@@ -1,6 +1,7 @@<%= styled_form_with model: @import do |form| %>@@ -1,6 +1,7 @@<%= styled_form_with model: @import do |form| %>Good catch & Committed 👍