forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
16 lines
1.7 KiB
HTML
16 lines
1.7 KiB
HTML
<a name="mrs_01_1462"></a><a name="mrs_01_1462"></a>
|
|
|
|
<h1 class="topictitle1">Why Is the Data Logged in Bad Records Different from the Original Input Data with Escape Characters?</h1>
|
|
<div id="body1595920215965"><div class="section" id="mrs_01_1462__s4b1a0a42504c457ba12aa948409cbc20"><h4 class="sectiontitle">Question</h4><p id="mrs_01_1462__a61524bc8064749939ff5140faf5d15c8">Why is the data logged in bad records different from the original input data with escaped characters?</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1462__s414a6dcf64544af3a1c1cca78ff2e713"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_1462__a8527380f55284272a6d35028fc12e200">An escape character is a backslash (\) followed by one or more characters. If the input records contain escape characters such as \t, \b, \n, \r, \f, \', \", \\ , java will process the escape character '\' and the following characters together to obtain the escaped meaning.</p>
|
|
</div>
|
|
<p id="mrs_01_1462__a4499143196ec4f6ea894ff4838abf40b">For example, if the CSV data type <strong id="mrs_01_1462__a26569b18407d440ab6eda8e5eede6a36">2010\\10,test</strong> is inserted to String,int type, the value is treated as bad records, because <strong id="mrs_01_1462__ab44688c7fd9447aaa9bd466dbf4f603e">tes</strong>t cannot be converted to int. The value logged in the bad records is <strong id="mrs_01_1462__a7d8ae291c44a4142861735fa1860f064">2010\10</strong> because java processes <strong id="mrs_01_1462__b166296197375">\\</strong> as <strong id="mrs_01_1462__b6179153073718">\</strong>.</p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1457.html">CarbonData FAQ</a></div>
|
|
</div>
|
|
</div>
|
|
|