分隔符和引号字符问题 [英] Delimiter and quote character issue

查看:120
本文介绍了分隔符和引号字符问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种情况下,谁能提出建议.

->尝试从sql dw读取ADLS时,我在ADLS中有一个管道定界符.csv文件,如果列值作为管道传来,那么它说的列太多了.

-> I have a pipe delimiter .csv file in ADLS when i am trying to read it from sql dw if a column value coming as pipe then its saying too many columns.

->为了解决此问题,我们将Quote字符保持为在ADF中生成文件,以便所有字符串都用"

-> To get rid of this issue we have kept Quote character as " in ADF and generating the file so that all strings are enclosed by "

->现在,记录正在拒绝其列值具有"的记录.或"

-> Now records are rejecting whose column value is having " or ""

->后来我尝试将引号字符作为unicode \ u001c,其中字符串将被该字符括起来,并以STRING_DELIMITER文件格式声明为\ u001c 

-> Later I tried quote character as unicode \u001c where the strings will enclosed by this character and declared in the file format STRING_DELIMITER as \u001c 

->但仍然没有考虑并拒绝记录,这意味着忽略了STRING_DELIMITER

-> but still it is not considering this and rejecting the records , means ignoring STRING_DELIMITER

->最后,我将分隔符本身尝试为\ u001c这是一个unicode,并声明了FIELD_TERMINATOR = \ u001c,但令人惊讶的是,它根本没有接受并且失败了

-> Finally I tried my delimiter itself as \u001c which is a unicode and declared the FIELD_TERMINATOR = \u001c but surprisingly its not taking this at all and failing 

现在的问题是可以将STRING_DELIMETER或FIELD_TERMINATOR视为\ u001c吗?并且STRING_DELIMITER只是封闭字符吗?有解决方案吗?

帮我解决这个问题.

预先感谢

-Poornima M

--Poornima M


推荐答案

您可以使用多个字符作为分隔符来避免出现此问题,例如:〜|〜或不会出现在您的计算机中的东西数据作为连续字符. 
You may be able to use multiple characters as delimiter to avoid this issue ie: ~|~ or something that won't show up in your data as consecutive characters. 


这篇关于分隔符和引号字符问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆