Shipping SQL script + CSV files in Ignite examples

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Shipping SQL script + CSV files in Ignite examples

dmagda
Igniters,

To demonstrate Ignite SQL capabilities at different events, I usually:

   1. take an SQL script
   2. preload the data from the script with SQLLine tool that is already
   shipped in Ignite
   3. run DML operations from Web Console, code or other SQL tools

While SQLLine tool is available once Ignite is downloaded, the user has
to look for a sample SQL script and adapt it to Ignite SQL specification
(mostly DDL).

Let's ship a script or two in Ignite "examples" folder to facilitate the
user. In general, I would add :

   - DDL + DML script (.sql) that creates a schema and preloads data with
   INSERTS. The script will include a command that turns on/off the streaming
   mode that is in the development.
   - DDL script + CSV file with data. This set of scripts are useful for
   COPY command that should be supported soon.

Presently, I would definitely recommend to include the script below that
represents a world database of Cities and Countries. It shows how to define
affinity collocation, how to use Ignite WITH statement, etc:
https://github.com/dmagda/ignite_world_demo/blob/master/ignite_world.sql

Parts of this database are already in use in our SQL getting started.

As for CSV,  we can take that Cities+Countries files and convert INSERT
commands to CSV records.

Thoughts, ideas?

--
Denis
Reply | Threaded
Open this post in threaded view
|

Re: Shipping SQL script + CSV files in Ignite examples

dmagda
The vote passed by lazy consensus :) Here is a ticket:
https://issues.apache.org/jira/browse/IGNITE-7884

Vladimir, look forward to co-operating with you on that task.

--
Denis

On Mon, Feb 26, 2018 at 4:49 PM, Denis Magda <[hidden email]> wrote:

> Igniters,
>
> To demonstrate Ignite SQL capabilities at different events, I usually:
>
>    1. take an SQL script
>    2. preload the data from the script with SQLLine tool that is already
>    shipped in Ignite
>    3. run DML operations from Web Console, code or other SQL tools
>
> While SQLLine tool is available once Ignite is downloaded, the user has
> to look for a sample SQL script and adapt it to Ignite SQL specification
> (mostly DDL).
>
> Let's ship a script or two in Ignite "examples" folder to facilitate the
> user. In general, I would add :
>
>    - DDL + DML script (.sql) that creates a schema and preloads data with
>    INSERTS. The script will include a command that turns on/off the streaming
>    mode that is in the development.
>    - DDL script + CSV file with data. This set of scripts are useful for
>    COPY command that should be supported soon.
>
> Presently, I would definitely recommend to include the script below that
> represents a world database of Cities and Countries. It shows how to define
> affinity collocation, how to use Ignite WITH statement, etc:
> https://github.com/dmagda/ignite_world_demo/blob/master/ignite_world.sql
>
> Parts of this database are already in use in our SQL getting started.
>
> As for CSV,  we can take that Cities+Countries files and convert INSERT
> commands to CSV records.
>
> Thoughts, ideas?
>
> --
> Denis
>