Hi all,
I'm looking for a way to automatically generate an output table schema based on 
the input and query.  Basically, a given input schema and SELECT statement 
produce a deterministic result schema.  And Hive will complain if a given 
output table does not have a matching schema.  Like so:

FAILED: SemanticException [Error 10044]: Line 3:23 Cannot insert into target 
table because column number/types are different 'test_out': Table insclause-0 
has 1 columns, but query has 3 columns.

I am developing a process that will accept input data with an arbitrary known 
schema, and an HQL SELECT statement to query that data.  I'm looking for a way 
to automatically generate the correct output table schema.  I'm starting to 
poke through the code in SemanticAnalyzer.java (which generates the above error 
string) to see if I can use something in there.  But I certainly welcome any 
thoughts or suggestions on this topic.

Thanks!
Sean

--

sean.col...@nasdaqomx.com<mailto:sean.col...@nasdaqomx.com>
www.nasdaqomx.com/finqloud<http://www.nasdaqomx.com/finqloud>

Reply via email to