hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mperformer <>
Subject Data are not displayed correctly on hive tables
Date Mon, 07 May 2012 00:34:27 GMT

I am using

   - Hadoop 0.20.2
   - Hive 0.8.1
   - Sqoop 1.4.1-incubating

in my sample project. Currently I am importing data from PostgreSQL to Hive
table using Sqoop. My database table in PostgreSQL has 4 columns and one
column stores a bit large XML file as TEXT data type. The same column
defined in HIVE as string, but after that column data is not importing and
shows as null;

*Table structure in PostgreSQL*

CREATE TABLE public.messagetemplate (
  messagetemplateid BIGSERIAL,
  messagetemplatename TEXT,
  data TEXT,
  messagetemplatetype TEXT,
  CONSTRAINT pk_messagetemplate PRIMARY KEY(messagetemplateid)

*Table structure in Hive*

hive> desc messagetemplate;
messagetemplateid       bigint
messagetemplatename     string
data    string
messagetemplatetype     string*

The *data* column store the XML file as text, but during the import to
hive, all data are imported properly (checked the files in HDFS). But using
HIVE select statement, it only shows small part from the XML text and the
rest column (last column) is null.

Could someone please help me to sort this out. Thanks.

View raw message