I had the same problem sometime back and I found a dirty workaround that
actually works.
1) create view foo as # this automatically creates foo
view with select output schema, this can contain joins, sel conditions,
group/count operators etc.
2) create table bar like foo # creates bar with schema
Very interesting. At least for the time being, I think this may be our
way forward. Too bad the create-as-select statement wont work for
external tables. Because that would really be our solution.
Thanks for the help! :)
Sean
*Sean Colgan*
NASDAQ OMX® | FinQloud
Direct: +1 720 889 5169
Mob
its a not via an API but what if you experimented with "create table XXX as
select . where 1=0" followed by "desc XXX".
Maybe something like that can tide you over until a more programmatic way
comes to light?
On Fri, Dec 20, 2013 at 3:01 PM, Sean Colgan wrote:
> Hi all,
> I'm looking for
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:
FA