cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

CSV file includes quotes

klandry
Deputy Chef II
Deputy Chef II

I am creating CSV files (technically TAB delimited) using Compose CSV. I am using a List for the source.
I have the option to Force Quotes Set to NO, yet for any fields where I am not supplying a value (as they are not required), double quotes are being inserted.

This does not seem to be correct to me as I should be able to have no values between delimiters without Quotes.
eg:    1 000[TAB]102095[TAB][TAB]DP[TAB][TAB]March

Instead, I am getting this:
1000[TAB]102095[TAB]""[TAB]DP[TAB]""[TAB]March

1 ACCEPTED SOLUTION

shivakumara
Executive Chef I
Executive Chef I

Hi @klandry ,

We have found a solution to the problem you are having. The problem comes from the array values โ€‹โ€‹you pass to create the CSV.
1. If the field value is empty, ""(double Quote) problem occurs because the empty value is called "" (double quotes).
 In this case, we operate differently at the source or target level.

โ€‹Example: 1000 NoValue 102095 NoValue DP

In this case you can use Value.present?? Value: skip

Here is an example of a recipe screenshotPlease check it out and let me know if you need help..
CSV data_1.pngCSV data_2.pngCSV data_3.pngCSV data_4.png

View solution in original post

5 REPLIES 5

gary1
Executive Chef III
Executive Chef III

I'm seeing the same behavior and I can only assume it's intentional. Is it causing an issue elsewhere in your recipe or workflow?

klandry
Deputy Chef II
Deputy Chef II

I donโ€™t understand the logic behind it. Firstly, there is the force quote option, which I have turned off. I can understand encapsulating data in quotes when a delimiting character is found in the data โ€” like a comma character when using CSV format, but I am using TAB. The whole reason for tab delimited format is because TABs are seldom if ever found as part of the data.

In any case, these are empty values. It is not practical for me to supply values for these columns, as they are optional and receive default values once in imported into the destination system.

I spent hours today looking for a workaround, but the Composer CSV connector inserts quotes when it encounters NIL or empty strings. The destination system requires TAB delimited format.

shivakumara
Executive Chef I
Executive Chef I

Hi @klandry ,

We have found a solution to the problem you are having. The problem comes from the array values โ€‹โ€‹you pass to create the CSV.
1. If the field value is empty, ""(double Quote) problem occurs because the empty value is called "" (double quotes).
 In this case, we operate differently at the source or target level.

โ€‹Example: 1000 NoValue 102095 NoValue DP

In this case you can use Value.present?? Value: skip

Here is an example of a recipe screenshotPlease check it out and let me know if you need help..
CSV data_1.pngCSV data_2.pngCSV data_3.pngCSV data_4.png

klandry
Deputy Chef II
Deputy Chef II

Thanks very much for that solution. This will work for me.
You've saved me from pulling the rest of my hair out.
๐Ÿ™‚