drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From François Méthot <fmetho...@gmail.com>
Subject Re: Question regarding CTAS Command
Date Thu, 17 Nov 2016 14:18:27 GMT
Here is a workaround to insert large *batch *of data, each batch insert is
done on their own partition.

create table hdfs.`/mytable/1`  as (select....)

Later on, If you want to insert new batch of data to the same table:
create table hdfs.`/mytable/2`  as (select....)

Then when you query
select * from hdfs.`/mytable`

will include results from partition 1 and 2.

If  you query while a partition is generated, error may occurs.
As a workaround for this, you may use a script (we use python) that ctas a
batch of data on a tmp folder then move the tmp table to the mytable
location as a partition.

Hope it helps






On Thu, Nov 17, 2016 at 9:02 AM, Arina Yelchiyeva <
arina.yelchiyeva@gmail.com> wrote:

> Hi Sanjiv,
>
> currently Drill doesn't support insert or update of data in tables.
>
> Kind regards
> Arina
>
> On Thu, Nov 17, 2016 at 3:54 PM, Sanjiv Kumar <sanjivktr@gmail.com> wrote:
>
> > Hello
> >         I have one doubt. In Drill we can create table using CTAS
> Command.
> > Like :- CREATE TABLE new_table_name AS <query>;
> >
> > As Mention in official site:-
> > http://drill.apache.org/docs/create-table-as-ctas-command/
> >
> > My query is:- Is it possible to update or insert data in CTAS Created
> > Table?
> >
> >
> >
> > --
> > Thanks & Regards.
> > Sanjiv Kumar.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message