doc-exports/docs/dws/dev/dws_04_0187.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:24:04 +00:00

142 lines
27 KiB
HTML

<a name="EN-US_TOPIC_0000001188323674"></a><a name="EN-US_TOPIC_0000001188323674"></a>
<h1 class="topictitle1">Handling Import Errors</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_s5bc517f6771b4e53b45ed36b7d50db7d"><h4 class="sectiontitle">Scenarios</h4><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_aa4eaf086ec2a4671b94bfeae72fa080a">Handle errors that occurred during data import.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_s7ab6ff0b3b9342d1a61466eba3b252b8"><h4 class="sectiontitle">Querying Error Information</h4><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a78fc965682af467b876181e3c604c8fa">Errors that occur when data is imported are divided into data format errors and non-data format errors.</p>
</div>
<ul id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_u837546339f704b56a8b8ea8b0053b1ec"><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_l1f3b669fb2c44ed39e8a106c02725e1b">Data format error<p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a68b28d318fa540468e2ea37e9e8e97f0"><a name="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_l1f3b669fb2c44ed39e8a106c02725e1b"></a><a name="en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_l1f3b669fb2c44ed39e8a106c02725e1b"></a>When creating a foreign table, specify <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b89481633121015">LOG INTO</strong> <em id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_i8243204021016">error_table_name</em>. Data format errors occurring during the data import will be written into the specified table. You can run the following SQL statement to query error details:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_sf655f233cd03465dae36d86452a6a4e1"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">error_table_name</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
<div class="p" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ad038cfd03755475eb5d04ad5532c4188"><a href="#EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_taed071c5571f4f9a834bdacaf251bac5">Table 1</a> lists the columns of the <strong id="EN-US_TOPIC_0000001188323674__b19327192325517">error_table_name</strong> table.
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_taed071c5571f4f9a834bdacaf251bac5"></a><a name="en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_taed071c5571f4f9a834bdacaf251bac5"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_taed071c5571f4f9a834bdacaf251bac5" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Columns of the <strong id="EN-US_TOPIC_0000001188323674__b96933306557">error_table_name</strong> table</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ra70e13325bd84266a5b2385c674cd711"><th align="left" class="cellrowborder" valign="top" width="19.23807619238076%" id="mcps1.3.3.1.3.3.2.4.1.1"><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a7986653efd2040059c2ac570076b0917">Column</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.706629337066296%" id="mcps1.3.3.1.3.3.2.4.1.2"><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_acadba2f2cf0847918ae7844ca6b7c8b7">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47.05529447055295%" id="mcps1.3.3.1.3.3.2.4.1.3"><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a5979bfe3f2be4899b9dd96980409978e">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_r7478cf6bc54a4c57881142746076bd5a"><td class="cellrowborder" valign="top" width="19.23807619238076%" headers="mcps1.3.3.1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ac169149074514ceeaa4aba73a19ca020">nodeid</p>
</td>
<td class="cellrowborder" valign="top" width="33.706629337066296%" headers="mcps1.3.3.1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a3708ed7e91d641379904285d13124e86">integer</p>
</td>
<td class="cellrowborder" valign="top" width="47.05529447055295%" headers="mcps1.3.3.1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ab031bdc41849499b86b0512bfe93f1bb">ID of the node where an error is reported</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_r26b3cbdf5751475ca4e1cc197eac600b"><td class="cellrowborder" valign="top" width="19.23807619238076%" headers="mcps1.3.3.1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a0f221cf702cb4e8da8c4c876b9511c2f">begintime</p>
</td>
<td class="cellrowborder" valign="top" width="33.706629337066296%" headers="mcps1.3.3.1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a92bb9dba3d5f44d18af98a9d87fbafec">timestamp with time zone</p>
</td>
<td class="cellrowborder" valign="top" width="47.05529447055295%" headers="mcps1.3.3.1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_af766558626e4419db512929027bbf7e6">Time when a data format error is reported</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_rddf476c430c4461694dcd788218ba172"><td class="cellrowborder" valign="top" width="19.23807619238076%" headers="mcps1.3.3.1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a76e2467afba3429888585b18bae39db8">filename</p>
</td>
<td class="cellrowborder" valign="top" width="33.706629337066296%" headers="mcps1.3.3.1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a75d1ea54fece4a23b8d9d5a1f60d2fc0">character varying</p>
</td>
<td class="cellrowborder" valign="top" width="47.05529447055295%" headers="mcps1.3.3.1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a8f0ca597acb64bb4a69af1c1c1451014">Name of the source data file where an error about data format occurs</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_rb5970acdf622437497bea40c7f57b26d"><td class="cellrowborder" valign="top" width="19.23807619238076%" headers="mcps1.3.3.1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_af032531416fb4bf68a7c733b5a36d12a">rownum</p>
</td>
<td class="cellrowborder" valign="top" width="33.706629337066296%" headers="mcps1.3.3.1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_aa25f0fc487fc4d79a20020c0ce5dace2">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="47.05529447055295%" headers="mcps1.3.3.1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_afc47c8fb3a004ffa9769d7f0e7a7da95">Number of the row where an error occurs in a source data file</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_rb5eb7002810e49c5b75d1014c2489124"><td class="cellrowborder" valign="top" width="19.23807619238076%" headers="mcps1.3.3.1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a566c51c173eb482abde2ed614536296c">rawrecord</p>
</td>
<td class="cellrowborder" valign="top" width="33.706629337066296%" headers="mcps1.3.3.1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a3f09cb9f78f748deabc5135420b8b7d4">text</p>
</td>
<td class="cellrowborder" valign="top" width="47.05529447055295%" headers="mcps1.3.3.1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a366ccbaa40b2427f8e073e9253c50c13">Raw record of the data format error in the source data file</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_r1400903fda304bb78340b44a6f13f01c"><td class="cellrowborder" valign="top" width="19.23807619238076%" headers="mcps1.3.3.1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a57e53a2c8c5a4ffa92d214ece0eae9af">detail</p>
</td>
<td class="cellrowborder" valign="top" width="33.706629337066296%" headers="mcps1.3.3.1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_a29a968f32327444ab285f44509145e73">text</p>
</td>
<td class="cellrowborder" valign="top" width="47.05529447055295%" headers="mcps1.3.3.1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_af634b77308454f708e7822dcf6a04136">Error details</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_udb2b3d55ad9a4ab0b849b0090b42dcb0"><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_lf19c6ff9262a4acf9d2c6532554300df">Non-data format error<p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ac0b7b550b0d440a9a883ec1b06b95255"><a name="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_lf19c6ff9262a4acf9d2c6532554300df"></a><a name="en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_lf19c6ff9262a4acf9d2c6532554300df"></a>A non-data format error leads to the failure of an entire data import task. You can locate and troubleshoot a non-data format error based on the error message displayed during data import.</p>
</li></ul>
<div class="section" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_sde26d311bd8d4620916fb0c82f378512"><h4 class="sectiontitle">Handling data import errors</h4><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ab20a60888f73485b8c2daddc1f9ad3f3">Troubleshoot data import errors based on obtained error information and the description in the following table.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_table41091116175519" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Handling data import errors</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_row0113316105513"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.5.3.2.4.1.1"><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p211416163551">Error Information</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38%" id="mcps1.3.5.3.2.4.1.2"><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p19115171685520"><strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0100738203_en-us_topic_0087194649_a7594b9c861bd4cdeaf7578acc1b1e4da">Cause</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39%" id="mcps1.3.5.3.2.4.1.3"><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p144017275544">Solution</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_row51178162558"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p2118316125512">missing data for column "r_reason_desc"</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.5.3.2.4.1.2 "><ol id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ol18632134115545"><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li96321241195411">The number of columns in the source data file is less than that in the foreign table.</li><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li20357448135411">In a TEXT format source data file, an escape character (for example, \) leads to delimiter or quote mislocation.<p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p18126141625514"><a name="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li20357448135411"></a><a name="en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li20357448135411"></a>Example: The target table contains three columns as shown in the following command output. The escape character (\) converts the delimiter (|) into the value of the second column, causing loss of the value of the third column.</p>
<pre class="screen" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_screen20128191613554">BE|Belgium\|1</pre>
</li></ol>
</td>
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.5.3.2.4.1.3 "><ol id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ol176431630185520"><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li15980262569">If an error is reported due to missing columns, perform the following operations:<ul id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ul12312111355618"><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li73123133568">Add the <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0058967664_b842352706162530">r_reason_desc</strong> column to the source data file.</li><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li15208516195614">When creating a foreign table, set the parameter <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b842352706162549">fill_missing_fields</strong> to <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b842352706162552">on</strong>. In this way, if the last column of a row in the source data file is missing, it is set to <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b842352706184352">NULL</strong> and no error will be reported.</li></ul>
</li><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li135761559195518">Check whether the row where an error occurred contains the escape character (\). If the row contains such a character, you are advised to set the parameter <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b842352706162910">noescaping</strong> to <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b842352706162827">true</strong> when creating a foreign table, indicating that the escape character (\) and the characters following it are not escaped.</li></ol>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_row19133121613554"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p121343162551">extra data after last expected column</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p1713631618559">The number of columns in the source data file is greater than that in the foreign table.</p>
</td>
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ul281493110581"><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li12815123113581">Delete the unnecessary columns from the source data file.</li><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li7816173135820">When creating a foreign table, set the parameter <strong id="EN-US_TOPIC_0000001188323674__b1467834745">ignore_extra_data</strong> to <strong id="EN-US_TOPIC_0000001188323674__b2080259065">on</strong>. In this way, if the number of columns in a source data file is greater than that in the foreign table, the extra columns at the end of rows will not be imported.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_row191411716155520"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p1614251614556">invalid input syntax for type numeric: "a"</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p7143101616554">The data type is incorrect.</p>
</td>
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_p8876141213334">In the source data file, change the data type of the columns to be imported. If this error information is displayed, change the data type to <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b84235270615839">numeric</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_row1414517168550"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p201461316105514">null value in column "staff_id" violates not-null constraint</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p214716161550">The not-null constraint is violated.</p>
<p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p101481616145511"></p>
</td>
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_p15281911103315">In the source data file, add values to the specified columns. If this error information is displayed, add values to the <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b84235270619217">staff_id</strong> column.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_row91497166551"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p191508162559">duplicate key value violates unique constraint "reg_id_pk"</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p8152916105514">The unique constraint is violated.</p>
</td>
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_ul88724019590"><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li58834045916">Delete the duplicate rows from the source data file.</li><li id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_li08918403599">Run the <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b148901641153120">SELECT</strong> statement with the <strong id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001145650931_en-us_topic_0125636397_en-us_topic_0125634746_b168901041143117">DISTINCT</strong> keyword to ensure that all imported rows are unique.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_screen29084012599"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">reasons</span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="k">DISTINCT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">foreign_tpcds_reasons</span><span class="p">;</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_row7159216135515"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p11631116155519">value too long for type character varying(16)</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_en-us_topic_0117407722_p1316417167558">The column length exceeds the upper limit.</p>
</td>
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323674__en-us_topic_0000001083024521_en-us_topic_0125636397_en-us_topic_0125634746_p1732851553315">In the source data file, change the column length. If this error information is displayed, reduce the column length to no greater than 16 bytes.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0154.html">Importing CSV/TXT Data from the OBS</a></div>
</div>
</div>