none
One double quote outputs to two doublequotes

    Question

  • I have a processor in an assembly that reads XML and returns an sql array of comma delimited strings. If I output with the csv outputter, I get this:

    "111,a,21"
    "222,b,44"

    However, what I want is this:

    "111","a","21"
    "222","b","44"

    To compensate for the missing quotation marks, in USQL I tried to use replace like this:

    SELECT r.value.Replace(",","\",\"")

    but then the csv outputter writes this:

    "111"",""a"",""21"
    "222"",""b"",""44"

    ...i.e., extra double quotes. I also tried to change my processor in the assembly to include the quotation marks in the strings, but that also results in extra double quotes. 

    What am I missing or doing wrong?



    • Edited by zgura Wednesday, September 27, 2017 7:59 AM
    Wednesday, September 27, 2017 7:35 AM

Answers

  • Found a solution: Set the double quotes inside the string in the processor, and then set quoting to false in the outputter. 
    • Marked as answer by zgura Wednesday, September 27, 2017 8:39 AM
    Wednesday, September 27, 2017 8:39 AM