<?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: Insert values in Array data type - Hive in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120461#M83229</link>
    <description>&lt;P&gt;If you don't already have a table with at least one row, you can accomplish the desired result without creating a dummy table.&lt;/P&gt;&lt;PRE&gt;insert into test_array select 1, array('a','b') from (select '123') x;&lt;/PRE&gt;</description>
    <pubDate>Tue, 30 May 2017 22:05:19 GMT</pubDate>
    <dc:creator>whitsonk</dc:creator>
    <dc:date>2017-05-30T22:05:19Z</dc:date>
    <item>
      <title>Insert values in Array data type - Hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120459#M83227</link>
      <description>&lt;P&gt;I am trying to load the data into Array data type in hive and got below errors . &lt;/P&gt;&lt;P&gt;1 ) INSERT INTO table test_array VALUES (1,array('a','b'));&lt;/P&gt;&lt;P&gt;Error: Error while compiling statement: FAILED: SemanticException [Error 10293]: Unable to create temp file for insert values Expression of type TOK_FUNCTION not supported in insert/values (state=42000,code=10293)&lt;/P&gt;&lt;P&gt;2 ) INSERT INTO test_array (col2) VALUES (array('a','b')) from dummy limit 1; &lt;/P&gt;&lt;P&gt;Error: Error while compiling statement: FAILED: ParseException line 1:54 missing EOF at 'from' near ')' (state=42000,code=40000)&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 11:15:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120459#M83227</guid>
      <dc:creator>nelsonarasu</dc:creator>
      <dc:date>2016-03-10T11:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values in Array data type - Hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120460#M83228</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3274/nelsonarasu.html" nodeid="3274"&gt;@Nelson KA Rajendran&lt;/A&gt; You need to create a dummy table with one row&lt;/P&gt;&lt;PRE&gt;create table dummy(a string); insert into table dummy values ('a');&lt;/PRE&gt;&lt;P&gt;Then you can insert to your test_array table using&lt;/P&gt;&lt;PRE&gt;INSERT INTO table test_array SELECT 1, array('a','b') from dummy;&lt;/PRE&gt;&lt;P&gt;You can't insert a complex type directly to Hive table.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 20:43:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120460#M83228</guid>
      <dc:creator>shishir_saxena4</dc:creator>
      <dc:date>2016-03-10T20:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values in Array data type - Hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120461#M83229</link>
      <description>&lt;P&gt;If you don't already have a table with at least one row, you can accomplish the desired result without creating a dummy table.&lt;/P&gt;&lt;PRE&gt;insert into test_array select 1, array('a','b') from (select '123') x;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 May 2017 22:05:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120461#M83229</guid>
      <dc:creator>whitsonk</dc:creator>
      <dc:date>2017-05-30T22:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values in Array data type - Hive</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120462#M83230</link>
      <description>&lt;P&gt;If you are using Hive 2 or later (including Hive LLAP), you no longer need the dummy table, statements like:&lt;/P&gt;&lt;PRE&gt;INSERT INTO table test_array SELECT 1, array('a','b');&lt;/PRE&gt;&lt;P&gt;will work.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 05:26:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Insert-values-in-Array-data-type-Hive/m-p/120462#M83230</guid>
      <dc:creator>carter</dc:creator>
      <dc:date>2017-07-12T05:26:57Z</dc:date>
    </item>
  </channel>
</rss>

