exporting ignite table into CSV file

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

exporting ignite table into CSV file

hi
can we use a SQL query to export data from an Ignite table into a CSV file?
thanks
Mahesh



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
stephendarlington stephendarlington
Reply | Threaded
Open this post in threaded view
|

Re: exporting ignite table into CSV file

Yes.

You could use sqlline.sh:

0: jdbc:ignite:<a href="thin://127.0.0.1/" class="">thin://127.0.0.1/> !set outputFormat csv
0: jdbc:ignite:<a href="thin://127.0.0.1/" class="">thin://127.0.0.1/> !record a.csv
Saving all output to “/tmp/a.csv". Enter "record" with no arguments to stop it.
0: jdbc:ignite:<a href="thin://127.0.0.1/" class="">thin://127.0.0.1/> select * from ignite;
select * from ignite;
'ID','NAME'
'1','Stephen'
1 row selected (0.063 seconds)
0: jdbc:ignite:<a href="thin://127.0.0.1/" class="">thin://127.0.0.1/> 
0: jdbc:ignite:<a href="thin://127.0.0.1/" class="">thin://127.0.0.1/> !record
Recording stopped.


On 19 Mar 2019, at 07:19, mahesh76private <[hidden email]> wrote:

hi
can we use a SQL query to export data from an Ignite table into a CSV file?
thanks
Mahesh



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/