The change to the syntax has been merged.

On Fri, Oct 27, 2023 at 11:15 AM Taewoo Kim <wangs...@gmail.com> wrote:

> +1
>
> interesting fact - MS has a similar syntax COPY INTO (Transact-SQL) - Azure
> Synapse Analytics and Microsoft Fabric | Microsoft Learn
> <
> https://learn.microsoft.com/en-us/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest
> >
>
> Best,
> Taewoo
>
>
> On Fri, Oct 27, 2023 at 11:11 AM Glenn Justo Galvizo <ggalv...@uci.edu>
> wrote:
>
> > +1 from me as well!
> >
> > > On Oct 27, 2023, at 10:15, Till Westmann <ti...@apache.org> wrote:
> > >
> > > +1 this is much nicer
> > >
> > >> On 2023/10/26 05:05:01 Mike Carey wrote:
> > >> PS - I assume the semantics will be UPSERT-based? (Vs. one-time or
> > >> INSERT-based?)
> > >>
> > >>> On 10/24/23 10:16 AM, Wail Alkowaileet wrote:
> > >>> Hi all,
> > >>>
> > >>> I'm proposing to change the current syntax for COPY FROM. The current
> > >>> syntax looks as follows:
> > >>>
> > >>>> COPY Customers
> > >>>> USING localfs (
> > >>>>   ("path"="asterix_nc1://data/nontagged/customerData.json"),
> > >>>>   ("format"="json")
> > >>>> );
> > >>>>
> > >>> This syntax uses the old way of configuring the adapter localfs. In
> our
> > >>> feeds, we use the WITH clause. Another issue is that the current
> > syntax is
> > >>> missing the keyword FROM, which makes it ambiguous if we add support
> > for
> > >>> COPY TO.
> > >>>
> > >>> I propose to change the syntax to be as follows:
> > >>>
> > >>>> COPY Customers
> > >>>> FROM localfs
> > >>>> PATH ("asterix_nc1://data/nontagged/customerData.json")
> > >>>> WITH {
> > >>>>     "format": "json"
> > >>>> };
> > >>>>
> > >>> First, the proposed syntax introduces the use of FROM <adapterName>.
> > >>> Second, it mandates the use of PATH (instead of having it in the WITH
> > >>> clause). Additionally, the proposed syntax will make both COPY FROM
> and
> > >>> COPY TO less different.
> > >>>
> > >>> Example of COPY TO:
> > >>>
> > >>>> COPY Customers
> > >>>> TO localfs
> > >>>> PATH("localhost:///myData/Customers")
> > >>>> WITH {
> > >>>>     "format" : "json"
> > >>>> };
> > >>>>
> >
>


-- 

*Regards,*
Wail Alkowaileet

Reply via email to