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

Switch to Plain View
Hive >> mail # user >> External Table Question


+
george teVelde 2012-07-16, 17:47
Copy link to this message
-
Re: External Table Question
Hi George

Your understanding is right.

If your data has more columns that those defined for the table, the rest of columns at the end in your data won't be considered.

Also if your table has more columns and the data has less then the last columns on your table row will have NULL.
Regards
Bejoy KS

Sent from handheld, please excuse typos.

-----Original Message-----
From: george teVelde <[EMAIL PROTECTED]>
Date: Mon, 16 Jul 2012 10:47:47
To: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: External Table Question
I have two questions regarding external tables:
Every day I create a staging table based on a data dump of the previous days data, the table and feed have 10 columns.  Yesterday they added an 11th column to the feed without teling me.  If I create an external table with 10 columns and point it at the feed with 11 columns, will the first 10 columns be read and the 11th ignored?
Also, if the feed goes from 10 columns to 9 columns, will the 10th column be NULL?

I am a newbie to hive so please forgive the question.

Thanks!