If I have understood you correctly, I don't think Drill can use Java
collection as source.
Regarding temporary table, after you create it, you can't modify it, so
yes, for every data change you would have to re-create temporary table.
One option I can think of is that you can keep your array data in file and
modify that file each time collection changes, then you can select from
this file directly or create a view over this file.

Kind regards
Arina

On Fri, Apr 7, 2017 at 9:23 AM, <jasbir.s...@accenture.com> wrote:

> Hi Arina,
>
> Thanks for your reply. I got that it can work like this also.
>
> But how to use it with Java collection, Array List which has records
> ranging from 5000 - 100,000.
> For every different hit, I will be creating a different temporary table.
>
>
> Regards,
> Jasbir Singh
>
> -----Original Message-----
> From: Arina Yelchiyeva [mailto:arina.yelchiy...@gmail.com]
> Sent: Wednesday, April 05, 2017 11:42 PM
> To: user <u...@drill.apache.org>
> Cc: dev@drill.apache.org
> Subject: Re: Temporary table issue
>
> HI Jasbir,
>
> may be union all and values(1) can help you.
>
> Example:
>
> create temporary table t1 as select i1, i2 from (
>
> select 0 as i1, 5 as i2 from (values(1))
>
> union all
>
> select 5 as i1, 10 as i2 from (values(1)));
>
>
> Kind regards
>
> Arina
>
> On Wed, Apr 5, 2017 at 7:31 PM, <jasbir.s...@accenture.com> wrote:
>
> > Hi,
> >
> > I want to create temporary table in Apache Drill at runtime and want
> > to insert few uuid's which user select. It could range from 5000 to
> 100,000.
> > Using CTTAS if I do it requires data from some file whereas here I
> > want to store it using a collection.
> >
> > Is this possible using Apache Drill?
> >
> > Regards,
> > Jasbir Singh
> >
> > ________________________________
> >
> > This message is for the designated recipient only and may contain
> > privileged, proprietary, or otherwise confidential information. If you
> > have received it in error, please notify the sender immediately and
> > delete the original. Any other use of the e-mail by you is prohibited.
> > Where allowed by local law, electronic communications with Accenture
> > and its affiliates, including e-mail and instant messaging (including
> > content), may be scanned by our systems for the purposes of
> > information security and assessment of internal compliance with
> Accenture policy.
> > ____________________________________________________________
> > __________________________
> >
> > www.accenture.com
> >
>
> ________________________________
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise confidential information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the e-mail by you is prohibited. Where allowed
> by local law, electronic communications with Accenture and its affiliates,
> including e-mail and instant messaging (including content), may be scanned
> by our systems for the purposes of information security and assessment of
> internal compliance with Accenture policy.
> ____________________________________________________________
> __________________________
>
> www.accenture.com
>

Reply via email to