<?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 Does hive support Photo or images datatypes? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/221473#M77465</link>
    <description />
    <pubDate>Fri, 20 Apr 2018 07:47:23 GMT</pubDate>
    <dc:creator>dcedielunesa</dc:creator>
    <dc:date>2018-04-20T07:47:23Z</dc:date>
    <item>
      <title>Does hive support Photo or images datatypes?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/221473#M77465</link>
      <description />
      <pubDate>Fri, 20 Apr 2018 07:47:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/221473#M77465</guid>
      <dc:creator>dcedielunesa</dc:creator>
      <dc:date>2018-04-20T07:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Does hive support Photo or images datatypes?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/221474#M77466</link>
      <description>&lt;P&gt;You can use the BINARY data type in Hive.  Store the photo/image as binary in the hive table. You may retrieve it back from the query results and display it in your frontend application. &lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-MiscTypes" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-MiscTypes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 13:51:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/221474#M77466</guid>
      <dc:creator>pmohan</dc:creator>
      <dc:date>2018-04-20T13:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Does hive support Photo or images datatypes?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/221475#M77467</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="@Christian Lunesa"&gt; @Christian Lunesa&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Yes store images in &lt;STRONG&gt;binary format&lt;/STRONG&gt;  see below but retrieval is another process altogether&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Create table image&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;beeline&amp;gt; ! connect  jdbc:hive2://texas.us.com:10000/default
Enter username for jdbc:hive2://texas.us.com:10000/default: hive
Enter password for jdbc:hive2://texas.us.com:10000/default: ****
Connected to: Apache Hive (version 1.2.1000.2.6.2.0-205)
Driver: Hive JDBC (version 1.2.1000.2.6.2.0-205)
Transaction isolation: TRANSACTION_REPEATABLE_READ
1: jdbc:hive2://texas.us.com:10000/default&amp;gt; show databases;
+----------------+--+
| database_name  |
+----------------+--+
| default        |
| geolocation    |
+----------------+--+
4 rows selected (2.397 seconds)
use geolocation;
Create table image(picture binary);
show tables;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt; Now to load image in it is as simple as the load data statement as: &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; show databases;
OK
default
geolocation
Time taken: 1.955 seconds, Fetched: 4 row(s)
hive&amp;gt; use geolocation;
hive&amp;gt; load data local inpath '/tmp/photo.jpg' into table image; &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Now check the image&lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; select count(*) from image;
Query ID = geolocation_20180420094947_79e8e1fb-dfb3-40c6-949e-3fb61e8bc7d1
Total jobs = 1
Launching Job 1 out of 1
Status: Running (Executing on YARN cluster with App id application_1524208851011_0003)
--------------------------------------------------------------------------------
        VERTICES      STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  KILLED
--------------------------------------------------------------------------------
Map 1 ..........   SUCCEEDED      1          1        0        0       0       0
Reducer 2 ......   SUCCEEDED      1          1        0        0       0       0
--------------------------------------------------------------------------------
VERTICES: 02/02  [==========================&amp;gt;&amp;gt;] 100%  ELAPSED TIME: 5.87 s
--------------------------------------------------------------------------------
OK
19038
Time taken: 10.114 seconds, Fetched: 1 row(s) &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;A select will return gabbled output, but the is loaded. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Store images/videos into Hadoop HDFS &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;hdfs dfs -put /src_image_file /dst_image_file &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;And if your intent is more than just storing the files, you might find &lt;A href="http://hipi.cs.virginia.edu/" target="_blank"&gt; HIPI&lt;/A&gt; useful. HIPI is a library for Hadoop's MapReduce framework that provides an API for performing image processing tasks in a distributed computing environment &lt;A href="http://hipi.cs.virginia.edu/" target="_blank"&gt;http://hipi.cs.virginia.edu/&lt;/A&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="http://www.tothenew.com/blog/how-to-manage-and-analyze-video-data-using-hadoop/" target="_blank"&gt; http://www.tothenew.com/blog/how-to-manage-and-analyze-video-data-using-hadoop/ &lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://content.pivotal.io/blog/using-hadoop-mapreduce-for-distributed-video-transcoding" target="_blank"&gt; https://content.pivotal.io/blog/using-hadoop-mapreduce-for-distributed-video-transcoding&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Hope that helps&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:02:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/221475#M77467</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2018-04-20T15:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Does hive support Photo or images datatypes?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/283961#M77468</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/67977"&gt;@pmohan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this help with columns having data type - image ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;converting the image data type to binary again is leading to data corruption.&lt;/P&gt;&lt;P&gt;Please see the issue highlighted below :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/Support-Questions/SQOOP-import-of-quot-image-quot-data-type-into-hive/td-p/283584" target="_blank"&gt;https://community.cloudera.com/t5/Support-Questions/SQOOP-import-of-quot-image-quot-data-type-into-hive/td-p/283584&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 12:08:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Does-hive-support-Photo-or-images-datatypes/m-p/283961#M77468</guid>
      <dc:creator>sow</dc:creator>
      <dc:date>2019-11-25T12:08:30Z</dc:date>
    </item>
  </channel>
</rss>

