Skip to main content

Writing Pandas dataframe to vertica

  • April 2, 2015
  • 4 replies
  • 11 views

Sushmit_Roy
Forum|alt.badge.img

Is there a way by which we can wrtite pandas dataframe into vertica tables.

 

I am trying to use this 

 

http://pandas.pydata.org/pandas-docs/dev/generated/pandas.DataFrame.to_sql.html

 

Is there any vertica sql alchemy engine? 

4 replies

Navin_C
Forum|alt.badge.img+2
  • Participating Frequently
  • April 3, 2015

Hi,

 

Not tested much , you can use this:

Vertica-sqlalchemy

 

Hope this helps.

NC


Sushmit_Roy
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • April 3, 2015

Yes I saw this and I am not able to get this work. Btw my objective here is to export a table from mysql to vertica . I know this can be done like 1) Export mysql to csv 2) Define the table in vertica 3) use load to import data from csv to vertica . But Is there any other way possibly a more programmatic thing to do


Navin_C
Forum|alt.badge.img+2
  • Participating Frequently
  • April 6, 2015

Hi Sushmit,

 

If your requirement is load  data from Mysql to Vertica, why use a approach which involves lot of steps.

You can do it one statement.

 

Check this UDL on marketplace

Vertica Marketplace

 

It simplifies a lot of things.

 

 


Sushmit_Roy
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • April 6, 2015

Thanks Navin,

Can you direct me to steps to install the packages. I have never used it before