You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Nirav Shah <ni...@games24x7.com> on 2015/12/01 10:31:27 UTC

Insert to MySQL from Drill

Hi,

I am trying to move data  from drill to mysql. is Insert/update allowed
from drill to MySQL?
If yes than how?

Thanks in advance.

Best,
Nirav

Re: Insert to MySQL from Drill

Posted by Nirav Shah <ni...@games24x7.com>.
Thanks John,

That's our future plan but for now our main datastore is in MySQL which
collects data from many sources. We are migrating one by one. So for now we
have to move this data to MySQL.
I found solution from one of the site

http://stackoverflow.com/questions/31014910/write-drill-query-output-to-csv-or-some-other-format

use dfs.tmp;
alter session set `store.format`='csv';
create table dfs.tmp.my_output as select * from cp.`employee.json`;


On Tue, Dec 1, 2015 at 6:09 PM, John Omernik <jo...@omernik.com> wrote:

> One option would be to take your reporting results and do a create table as
> select (CTAS) and use parquet files which can be very fast.  Let's say you
> were doing aggregations by day...
>
>
> Create table aggbyday as
> Select dayfield, count(1) as cntbyday from log table group by dayfield
>
> Then point your reporting tool at drill with odbc or jdbc
>
> That's our plan for reporting at least.
>
> On Tuesday, December 1, 2015, Nirav Shah <ni...@games24x7.com> wrote:
>
> > Thanks Magnus,
> >
> > I am fetching data from log files --> Processing It --> want to move to
> > MySql for reporting.
> >
> > Regards,
> > Nirav
> >
> > On Tue, Dec 1, 2015 at 3:10 PM, Magnus Pierre <mpierre@maprtech.com
> > <javascript:;>> wrote:
> >
> > > Hello Nirav,
> > > To my knowledge (just a user so I don’t have any deep insights) there’s
> > no
> > > such functionality as of now included in Apache Drill. It could be
> added
> > > but focus has been on getting data from RDBMS in a convenient way
> rather
> > > than moving data to RDBMS.
> > >
> > > Regards,
> > > Magnus
> > >
> > > > 1 dec 2015 kl. 10:31 skrev Nirav Shah <nirav.shah@games24x7.com
> > <javascript:;>>:
> > > >
> > > > Hi,
> > > >
> > > > I am trying to move data  from drill to mysql. is Insert/update
> allowed
> > > > from drill to MySQL?
> > > > If yes than how?
> > > >
> > > > Thanks in advance.
> > > >
> > > > Best,
> > > > Nirav
> > >
> > >
> >
>
>
> --
> Sent from my iThing
>

Re: Insert to MySQL from Drill

Posted by John Omernik <jo...@omernik.com>.
One option would be to take your reporting results and do a create table as
select (CTAS) and use parquet files which can be very fast.  Let's say you
were doing aggregations by day...


Create table aggbyday as
Select dayfield, count(1) as cntbyday from log table group by dayfield

Then point your reporting tool at drill with odbc or jdbc

That's our plan for reporting at least.

On Tuesday, December 1, 2015, Nirav Shah <ni...@games24x7.com> wrote:

> Thanks Magnus,
>
> I am fetching data from log files --> Processing It --> want to move to
> MySql for reporting.
>
> Regards,
> Nirav
>
> On Tue, Dec 1, 2015 at 3:10 PM, Magnus Pierre <mpierre@maprtech.com
> <javascript:;>> wrote:
>
> > Hello Nirav,
> > To my knowledge (just a user so I don’t have any deep insights) there’s
> no
> > such functionality as of now included in Apache Drill. It could be added
> > but focus has been on getting data from RDBMS in a convenient way rather
> > than moving data to RDBMS.
> >
> > Regards,
> > Magnus
> >
> > > 1 dec 2015 kl. 10:31 skrev Nirav Shah <nirav.shah@games24x7.com
> <javascript:;>>:
> > >
> > > Hi,
> > >
> > > I am trying to move data  from drill to mysql. is Insert/update allowed
> > > from drill to MySQL?
> > > If yes than how?
> > >
> > > Thanks in advance.
> > >
> > > Best,
> > > Nirav
> >
> >
>


-- 
Sent from my iThing

Re: Insert to MySQL from Drill

Posted by Nirav Shah <ni...@games24x7.com>.
Thanks Magnus,

I am fetching data from log files --> Processing It --> want to move to
MySql for reporting.

Regards,
Nirav

On Tue, Dec 1, 2015 at 3:10 PM, Magnus Pierre <mp...@maprtech.com> wrote:

> Hello Nirav,
> To my knowledge (just a user so I don’t have any deep insights) there’s no
> such functionality as of now included in Apache Drill. It could be added
> but focus has been on getting data from RDBMS in a convenient way rather
> than moving data to RDBMS.
>
> Regards,
> Magnus
>
> > 1 dec 2015 kl. 10:31 skrev Nirav Shah <ni...@games24x7.com>:
> >
> > Hi,
> >
> > I am trying to move data  from drill to mysql. is Insert/update allowed
> > from drill to MySQL?
> > If yes than how?
> >
> > Thanks in advance.
> >
> > Best,
> > Nirav
>
>

Re: Insert to MySQL from Drill

Posted by Magnus Pierre <mp...@maprtech.com>.
Hello Nirav,
To my knowledge (just a user so I don’t have any deep insights) there’s no such functionality as of now included in Apache Drill. It could be added but focus has been on getting data from RDBMS in a convenient way rather than moving data to RDBMS.

Regards,
Magnus

> 1 dec 2015 kl. 10:31 skrev Nirav Shah <ni...@games24x7.com>:
> 
> Hi,
> 
> I am trying to move data  from drill to mysql. is Insert/update allowed
> from drill to MySQL?
> If yes than how?
> 
> Thanks in advance.
> 
> Best,
> Nirav