Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Data are not displayed correctly on hive tables


Copy link to this message
-
Re: Data are not displayed correctly on hive tables
Could you share the output of the following command in Hive:
describe formatted messagetemplate

My hunch is that your Hive table is using a delimiter (e.g. '\t') that appears in the content of your XML.

Mark Grover, Business Intelligence Analyst
OANDA Corporation

www: oanda.com www: fxtrade.com

----- Original Message -----
From: "mperformer" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Sunday, May 6, 2012 8:34:27 PM
Subject: Data are not displayed correctly on hive tables

Hi

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)
) WITHOUT OIDS;

Table structure in Hive

hive> desc messagetemplate;
OK
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.