<?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: NULL columns importing csv data into table in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69560#M79822</link>
    <description>Thanks a lot.</description>
    <pubDate>Wed, 04 Jul 2018 08:19:58 GMT</pubDate>
    <dc:creator>uur</dc:creator>
    <dc:date>2018-07-04T08:19:58Z</dc:date>
    <item>
      <title>NULL columns importing csv data into table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69340#M79817</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to import a csv file to a table. But after I created the table and load the data into the table some columns (data types except STRING) is getting NULL. Here is the create table statement I used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CREATE TABLE deneme6 (framenumber int,frametime TIMESTAMP, ipsrc STRING, ipdst STRING, protocol STRING, flag int, windowsize int, info STRING)

ROW FORMAT DELIMITED

FIELDS TERMINATED BY ','

STORED AS TEXTFILE ;

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then I'm loading my data file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;load data inpath 'hdfs:///user/hive/warehouse/deneme4/deneme4.csv' into table deneme6;&lt;/PRE&gt;&lt;P&gt;But for the columns framenumber,&amp;nbsp; frametime, flag, windowsize data is returning NULL. These are the columns that their data type are not STRING. What can I do for the issue? And here is an example of the csv file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;frame.number,frame.time_relative,ip.src,ip.dst,_ws.col.Protocol,tcp.flags,tcp.window_size_value,_ws.col.Info&amp;nbsp;&lt;/P&gt;&lt;P&gt;1,"0.000000000","147.32.84.165","91.212.135.158","TCP","0x00000002","64240","1040 â†’ 5678 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1"&lt;/P&gt;&lt;P&gt;2,"0.000009000","147.32.84.165","91.212.135.158","TCP","0x00000002","64240","[TCP Out-Of-Order] 1040 â†’ 5678 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1"&lt;/P&gt;&lt;P&gt;3,"0.062970000","91.212.135.158","147.32.84.165","TCP","0x00000012","65535","5678 â†’ 1040 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1460 SACK_PERM=1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the result for the table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NULL NULL "147.32.84.165" "91.212.135.158" "TCP" NULL NULL "1040 → 5678 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1"&lt;BR /&gt;NULL NULL "147.32.84.165" "91.212.135.158" "TCP" NULL NULL "[TCP Out-Of-Order] 1040 → 5678 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1"&lt;/P&gt;&lt;P&gt;NULL NULL "91.212.135.158" "147.32.84.165" "TCP" NULL NULL "5678 → 1040 [SYN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:22:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69340#M79817</guid>
      <dc:creator>uur</dc:creator>
      <dc:date>2022-09-16T13:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: NULL columns importing csv data into table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69489#M79818</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can you please share the version of Hive or CDH you are using? So that I can try to see if I can re-produce?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 30 Jun 2018 19:51:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69489#M79818</guid>
      <dc:creator>EricL</dc:creator>
      <dc:date>2018-06-30T19:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: NULL columns importing csv data into table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69537#M79819</link>
      <description>&lt;P&gt;Clouder Quickstart 5.13 on VM.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 13:17:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69537#M79819</guid>
      <dc:creator>uur</dc:creator>
      <dc:date>2018-07-03T13:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: NULL columns importing csv data into table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69538#M79820</link>
      <description>&lt;DIV class="lia-quilt-row lia-quilt-row-forum-message-main"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-right lia-quilt-column-main-right"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;&lt;DIV class="lia-message-body lia-tooltip-trigger"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Clouder Quickstart 5.13 on VM.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-forum-message-footer"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Jul 2018 13:43:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69538#M79820</guid>
      <dc:creator>uur</dc:creator>
      <dc:date>2018-07-03T13:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: NULL columns importing csv data into table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69549#M79821</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested, it works for me, at least the first column returned correctly, compare with yours. My result below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;+----------------------+--------------------+-------------------+-------------------+-------------------+---------------+---------------------+----------------------------------------------------+--+
| deneme6.framenumber  | deneme6.frametime  |   deneme6.ipsrc   |   deneme6.ipdst   | deneme6.protocol  | deneme6.flag  | deneme6.windowsize  |                    deneme6.info                    |
+----------------------+--------------------+-------------------+-------------------+-------------------+---------------+---------------------+----------------------------------------------------+--+
| 1                    | NULL               | "147.32.84.165"   | "91.212.135.158"  | "TCP"             | NULL          | NULL                | "1040 â†’ 5678 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1" |
| 2                    | NULL               | "147.32.84.165"   | "91.212.135.158"  | "TCP"             | NULL          | NULL                | "[TCP Out-Of-Order] 1040 â†’ 5678 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1" |
| 3                    | NULL               | "91.212.135.158"  | "147.32.84.165"   | "TCP"             | NULL          | NULL                | "5678 â†’ 1040 [SYN                                |
+----------------------+--------------------+-------------------+-------------------+-------------------+---------------+---------------------+----------------------------------------------------+--+&lt;/PRE&gt;&lt;P&gt;The reason for the NULL values for frametime, flag and windowsize columns is because you define them as INT type, but you have double quotes around those numbers. Hive does not interpret quotes in the file, as it only sees text file, not CSV file. Suggestion is that you remove all quotes in the file and try again, so that Hive can convert those numbers to INT correctly.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 22:45:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69549#M79821</guid>
      <dc:creator>EricL</dc:creator>
      <dc:date>2018-07-03T22:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: NULL columns importing csv data into table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69560#M79822</link>
      <description>Thanks a lot.</description>
      <pubDate>Wed, 04 Jul 2018 08:19:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NULL-columns-importing-csv-data-into-table/m-p/69560#M79822</guid>
      <dc:creator>uur</dc:creator>
      <dc:date>2018-07-04T08:19:58Z</dc:date>
    </item>
  </channel>
</rss>

