none
How to handle incorrect quoting string?

    Question

  • I have to extract data from text file which has incorrect quoting (not escaping double-quote). Are there any workaround for this?


    • Edited by Art Bkk Thursday, February 16, 2017 10:37 AM
    Thursday, February 16, 2017 10:34 AM

All replies

  • Art, can you please tell me a little more about your problem.  What language, USQL, are you using?

    Thank you,

    Guy

    Thursday, February 16, 2017 4:56 PM
  • Maybe not the most elegang approach, but you could try this:

    1. Read the file with Extractors.Text and a seperator not in the file (in order to read a full line)

    2. Replace "," with a temporary character/string 

    3. Replace " with a different character, or include an escape character

    4. Replace the temporary character in step 2 with ",".

    5. Write the output to a new file. This should give you a proper dataset... 

    Friday, February 17, 2017 8:39 AM