You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by george teVelde <ge...@hotmail.com> on 2012/07/16 19:47:47 UTC

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! 		 	   		  

Re: External Table Question

Posted by Bejoy KS <be...@yahoo.com>.
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 <ge...@hotmail.com>
Date: Mon, 16 Jul 2012 10:47:47 
To: <us...@hive.apache.org>
Reply-To: user@hive.apache.org
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!