Well you can create using like.

CREATE EXTERNAL TABLE sales5 LIKE sales;


On Thu, Aug 4, 2016 at 5:06 PM Mich Talebzadeh <mich.talebza...@gmail.com>
wrote:

> Which process creates the master table in Hive as an external table? There
> must be a process that creates the master table as external table?  Hive
> knows about the schema of that table. It is in Hive metastore.
>
> You cannot create an external table with CREATE EXTERNAL TABLE AS ...
>
> hive> CREATE EXTERNAL TABLE sales5 AS SELECT * FROM SALES;
> FAILED: SemanticException [Error 10070]: CREATE-TABLE-AS-SELECT cannot
> create external table
>
> Dr Mich Talebzadeh
>
>
>
> LinkedIn * 
> https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
> <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>
>
>
> http://talebzadehmich.wordpress.com
>
>
> *Disclaimer:* Use it at your own risk. Any and all responsibility for any
> loss, damage or destruction of data or any other property which may arise
> from relying on this email's technical content is explicitly disclaimed.
> The author will in no case be liable for any monetary damages arising from
> such loss, damage or destruction.
>
>
>
> On 4 August 2016 at 22:56, Nagabhushanam Bheemisetty <
> nbheemise...@gmail.com> wrote:
>
>> I only get the table names that I need to ingest. So I don't know the
>> master table schema upfront.
>>
>> Yes the new table based on master table which is partitioned but new
>> table should not be partitioned and should not have partition column.
>>
>> On Thu, Aug 4, 2016 at 4:54 PM Mich Talebzadeh <mich.talebza...@gmail.com>
>> wrote:
>>
>>> Do you know the existing table schema? The new table schema will be
>>> based on that table without partitioning?
>>>
>>>
>>>
>>> Dr Mich Talebzadeh
>>>
>>>
>>>
>>> LinkedIn * 
>>> https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
>>> <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>>>
>>>
>>>
>>> http://talebzadehmich.wordpress.com
>>>
>>>
>>> *Disclaimer:* Use it at your own risk. Any and all responsibility for
>>> any loss, damage or destruction of data or any other property which may
>>> arise from relying on this email's technical content is explicitly
>>> disclaimed. The author will in no case be liable for any monetary damages
>>> arising from such loss, damage or destruction.
>>>
>>>
>>>
>>> On 4 August 2016 at 22:05, Nagabhushanam Bheemisetty <
>>> nbheemise...@gmail.com> wrote:
>>>
>>>> Hi I've a scenario where I need to create a table from partitioned
>>>> table but my destination table should not be partitioned. I won't be
>>>> knowing the schema so I cannot create manually the destination table. By
>>>> the way both tables are external tables.
>>>>
>>>
>>>
>

Reply via email to