Skip to main content

How to dump data from a table using jdbc locally.

  • March 18, 2014
  • 4 replies
  • 13 views

Siddarth
Forum|alt.badge.img+1
Need to dump records from Vertica tables using jdbc connection on local machine from where we have setup a jdbc connection.

4 replies

Forum|alt.badge.img+2
  • Participating Frequently
  • March 18, 2014
Hi Siddarth,

This is typically done in two parts.

First, it is very easy to retrieve a recordset from Vertica -- just run a SELECT statement.

Once you have the recordset, if you do a Web search for "jdbc to file", you will find many packages that will take that recordset and directly export it to a file in any of a variety of different formats.

There's an example on the CsvJdbc homepage:
http://csvjdbc.sourceforge.net/

Adam

Siddarth
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • March 18, 2014
Hi Adam,

My requirement is that I have a Vertica running on server-1 and jdbc job running on server-2.

Now I want to dump data from Vertica tables in Server-1 to Server-2 using my jdbc client application.

Thanks
Siddarth

Forum|alt.badge.img+2
  • Participating Frequently
  • March 18, 2014
Great!  The above example will work perfectly for that use case.

If you have a different use case, feel free to clarify and/or re-post.

Siddarth
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • March 18, 2014
Thanks a lot Adam!!

I will explore this further.