I’m wondering if anyone else is experiencing this issue.
I have a final step in a project that exports a table to a csv using the Export CSV transformation. Unfortunately, fields with spaces in the values are not being quoted. I am not able to use the “quote everything” option as the numeric fields need to remain numeric without quotes.
Am I missing an option to define the field types and thus quoting of the exported CSV or is this a bug?
Thanks in advance,
most commonly used CSV specification doesn’t require fields with spaces to quoted.
Can you please share with us why do you need such values to be quoted?
You can rename fields and wrap field names in quotes using “Rename columns” transformation. E.g. rename [Start Date] into [“Start Date”].
Wow! Thanks dgudkov and andrew.rybka. New to this tool and community having left the world of SSIS/DTS. Appreciative for the help.
Andrew, the need is actually in order to import into a system that is having trouble importing with long strings of text NOT being quoted. We are working with that solution provider who is asking a very similar question to yours, in reverse. I’m just trying to get this working while the solution provider gets it sorted.
dgudkov, while the field names are fine, it is the field values where we run into a problem. Good point though, I could add transformations which enclose values in quotes for affected fields. Interesting suggestion. Thank-you.
I guess I can determine that EasyMorph is determining when to add quotes to values in the Export CSV transformation based upon field values rather than a field data type. Would that be correct? It certainly explains the export results I’ve seen.
Just a feature thought then, perhaps on the Export to CSV transformation there is the ability to set quoting at the column/field level, ie. a check box next to each column name or selecting columns that should be quoted.
Thanks for the assistance!
Thank you for the suggestion. It’s duly noted.
Yes, wrapping values with spaces into quotes can be done using expressions on per column basis with the help of char() or quote() function. Although, note that per RFC4180 double quotes are escaped with another set of double quotes which might be not exactly what you’re looking for.
Agreed per RFC although I’m happy finding a workaround for now. Thanks again.
BTW, great toolset in EasyMorph. Being familiar with ETL process and tools, I had my first usable project completed in about an hour without having read the documentation. That is a testament to the good thought put into the tool and the UX. Now, I’m going through the documentation which is additionally helpful.