<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: sqoop import when source table contains string with CRLF in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-when-source-table-contains-string-with-CRLF/m-p/85771#M45174</link>
    <description>Hi all, finally found a solution actually it was under my eyes but didn't get soon# I simply added to my sqoop import command the option: --hive-drop-import-delims bye!</description>
    <pubDate>Fri, 01 Feb 2019 15:03:18 GMT</pubDate>
    <dc:creator>marcodiv</dc:creator>
    <dc:date>2019-02-01T15:03:18Z</dc:date>
    <item>
      <title>sqoop import when source table contains string with CRLF</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-when-source-table-contains-string-with-CRLF/m-p/85749#M45173</link>
      <description>&lt;DIV class="lia-message-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I have to import a mysql table into hive environment.&lt;BR /&gt;&lt;BR /&gt;The table has a "notes" column with free text, including the possibility for the user to insert CRLF.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;when I try to sqoop import that table, it seems the sqoop command interprets this CRLF as a end of row....&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Then everything, from that point on, is not correctly imported: I mean that the CRLF is the end of the row and the first column of the next row in filled in with the "rest" of free text and so on&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;I use this command:&lt;BR /&gt;
&lt;PRE&gt;sqoop import --connect jdbc:mysql://myserver:3306/mydb --username myusername --password mypwd
--table mytable --hive-import --hive-table mytable --hive-database mydb --as-textfile
--warehouse-dir /user/mydb --fields-terminated-by '|' --direct -m 1 --driver com.mysql.jdbc.Driver&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:06:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-when-source-table-contains-string-with-CRLF/m-p/85749#M45173</guid>
      <dc:creator>marcodiv</dc:creator>
      <dc:date>2022-09-16T14:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import when source table contains string with CRLF</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-when-source-table-contains-string-with-CRLF/m-p/85771#M45174</link>
      <description>Hi all, finally found a solution actually it was under my eyes but didn't get soon# I simply added to my sqoop import command the option: --hive-drop-import-delims bye!</description>
      <pubDate>Fri, 01 Feb 2019 15:03:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-when-source-table-contains-string-with-CRLF/m-p/85771#M45174</guid>
      <dc:creator>marcodiv</dc:creator>
      <dc:date>2019-02-01T15:03:18Z</dc:date>
    </item>
  </channel>
</rss>

