<?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: Hive Insert into table issue in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216798#M178707</link>
    <description>&lt;P&gt;Yes, it's the better way to solve problems &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Aug 2017 19:12:38 GMT</pubDate>
    <dc:creator>lruizr</dc:creator>
    <dc:date>2017-08-16T19:12:38Z</dc:date>
    <item>
      <title>Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216786#M178695</link>
      <description>&lt;P&gt;I need to create a table with just a field, which is a map of string: string. I have created the table without problems, but when I try to insert the values (they are defined, not in another table) I am not able to achieve it. The code is below.&lt;/P&gt;&lt;PRE&gt;create table comunidades ( codigo MAP&amp;lt;STRING, STRING&amp;gt; );
INSERT INTO TABLE comunidades SELECT 1, {"AND": '01'};
&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Aug 2017 19:35:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216786#M178695</guid>
      <dc:creator>lruizr</dc:creator>
      <dc:date>2017-08-14T19:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216787#M178696</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/29258/luisruiz.html" nodeid="29258"&gt;@Luis Ruiz&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Are you trying to insert from one table to another and facing this issue?&lt;/P&gt;&lt;P&gt;If that is the case then when you are inserting from one table to another then you may need to convert the columns into MAP as you have used MAP in the second table.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2017 20:46:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216787#M178696</guid>
      <dc:creator>balavignesh_nag</dc:creator>
      <dc:date>2017-08-14T20:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216788#M178697</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/29258/luisruiz.html" nodeid="29258"&gt;@Luis Ruiz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You should use map() complex type constructor in your insert statement.&lt;/P&gt;&lt;PRE&gt;insert into table testMap SELECT map('AND','01');&lt;/PRE&gt;&lt;P&gt;You can find more details about complex type constructors from here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 01:16:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216788#M178697</guid>
      <dc:creator>jvaria</dc:creator>
      <dc:date>2017-08-15T01:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216789#M178698</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/262/jvaria.html" nodeid="262"&gt;@Jagruti Varia&lt;/A&gt;&lt;P&gt;I've just tried your command and it returns an error. I'm using the Hortonworks Sandbox, and I don't understand why it throws that error.&lt;/P&gt;&lt;PRE&gt;&lt;SMALL&gt;org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:52 Failed to recognize predicate '&amp;lt;EOF&amp;gt;'. Failed rule: 'regularBody' in statement&lt;/SMALL&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Aug 2017 14:19:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216789#M178698</guid>
      <dc:creator>lruizr</dc:creator>
      <dc:date>2017-08-16T14:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216790#M178699</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/29258/luisruiz.html"&gt;@Luis Ruiz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I tried recreating your situation and it worked. see attached.To use the map function the source tables should already exist. I used a text file ruiz.txt with values &lt;/P&gt;&lt;PRE&gt;$ cat ruiz.txt
"AND": '01'
"TOO": '02'
"MORE": '03'&lt;/PRE&gt;&lt;P&gt;Hope that helps please accept the reponse if it resolved your problem!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 16:22:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216790#M178699</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-08-16T16:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216791#M178700</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I have repeated your steps in Ambari and it throws me an error (below). I have checked the community entries and it's something repeated. I don't know if there is a solution yet for this issue.&lt;/P&gt;&lt;PRE&gt;java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Aug 2017 16:51:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216791#M178700</guid>
      <dc:creator>lruizr</dc:creator>
      <dc:date>2017-08-16T16:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216792#M178701</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/29258/luisruiz.html"&gt;@Luis Ruiz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Try this &lt;/P&gt;&lt;PRE&gt;# cd /tmp/data &lt;/PRE&gt;&lt;PRE&gt;# su - hdfs &lt;/PRE&gt;&lt;PRE&gt;$ hdfs dfs -copyFromLocal autonomias.txt  /apps/hive/warehouse/ &lt;/PRE&gt;&lt;PRE&gt;$ hdfs dfs -chown -R hive:hive  /apps/hive/warehouse/ &lt;/PRE&gt;&lt;PRE&gt;hive&amp;gt; load data inpath '/apps/hive/warehouse/autonomias.txt' into table comunidades;&lt;/PRE&gt;&lt;P&gt;Tell me that should work&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 17:14:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216792#M178701</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-08-16T17:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216793#M178702</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;&lt;P&gt;In Ambari I have no terminal client, I upload files through a visual interface and the permissions for the file and folder are all enabled. I though the same, a problem with the permissions, but not. I don't know if the Sandbox is limited in some Hive operations&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 17:31:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216793#M178702</guid>
      <dc:creator>lruizr</dc:creator>
      <dc:date>2017-08-16T17:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216794#M178703</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/29258/luisruiz.html"&gt;@Luis Ruiz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Install putty to interact with your sandbox from your desktop, let download what is the version of  sandbox?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 18:21:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216794#M178703</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-08-16T18:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216795#M178704</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes I know about putty, but it is possible to do also from Ambari. I will try to do it from putty.&lt;/P&gt;&lt;P&gt;The version of the sandbox is 2.6.1 for VirtualBox. It's available here: &lt;A href="https://es.hortonworks.com/downloads/#sandbox" target="_blank"&gt;https://es.hortonworks.com/downloads/#sandbox&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 18:32:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216795#M178704</guid>
      <dc:creator>lruizr</dc:creator>
      <dc:date>2017-08-16T18:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216796#M178705</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;&lt;P&gt;The table was filled in the previous actions, but the Ambari platform throws me the specified error above. Now I would need to specify the values into file ruiz.txt as proper key-value pairs, and not inserting null after the file rows. I'll look how to do it. Thank you very much for your patience&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 18:55:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216796#M178705</guid>
      <dc:creator>lruizr</dc:creator>
      <dc:date>2017-08-16T18:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216797#M178706</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/29258/luisruiz.html"&gt;@Luis Ruiz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Nice to know it helped, that's the open source spirit &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 19:05:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216797#M178706</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-08-16T19:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert into table issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216798#M178707</link>
      <description>&lt;P&gt;Yes, it's the better way to solve problems &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 19:12:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-into-table-issue/m-p/216798#M178707</guid>
      <dc:creator>lruizr</dc:creator>
      <dc:date>2017-08-16T19:12:38Z</dc:date>
    </item>
  </channel>
</rss>

