Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Bug: Copy Data Delimited File Settings

See Solved: Sudden "DelimitedTextBadDataDetected" Error - Microsoft Fabric Community for background.

 

Copy Data's delimited file settings require that if you have a quote character defined you also have to have an escape character. BUG: The load will fail if your escape character is in your quoted text.

 

Example:

Quote character="

Escape charater=\

 

"abc","123","x,y,z"   <-this row works correctly.

"abc","123","x\y\z" <-this row fails because Fabric thinks the \ is an escape character even though it is between the quotes. 

 

How this SHOULD work is the escape character should only be considered an escape character when paired with the quote charcter. Example:

 

"abc","123","x\y\z" <-this SHOULD work fine. 3rd value should be x\y\z

"abc","123","x\"y\"z" <-this should make 3rd value x"y"z

 

Anonymous 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,
    The internal team has confirmed that its not a bug. This is by-design behavior. Escape char should also be escaped. The correct csv value is "x\\y\\z"

    Hope this helps. Please let us know if you have any further questions.

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 
    Thanks for the ask and using Microsoft Fabric Community.

    At this time, we are reaching out to the internal team to get some help on this. We will update you once we hear back from them.

    Appreciate your patience.
    Thanks.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous ,
      The internal team has confirmed that its not a bug. This is by-design behavior. Escape char should also be escaped. The correct csv value is "x\\y\\z"

      Hope this helps. Please let us know if you have any further questions.

      • Anonymous's avatar
        Anonymous
        Not applicable

        This is a dangerous design. The point of a quoted field is to treat anything between the quotes as free text. Being required to specify an escape charater means there will always be a chance that the job will fail because the free text data could legitimatey contain that escape character. To make this work I'd have to create a process to pre-screen the data looking for escape characters and adjusting them before loading. 

         

        A far better solution is to remove the requirement to have an escape character. If I could set it to "none" then I'll never have a problem loading a quoted free-text field.