We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


COPY gzip file to vertica using python — Vertica Forum

COPY gzip file to vertica using python

 As mentioned in the docs, I am trying to COPY gzip file to vertica using python, my copy command is below

 

import vertica_python
conn_info
= {******}connection = vertica_python.connect(**conn_info)cur = connection.cursor()cur.execute("DROP TABLE IF EXISTS home01")cur.execute( "CREATE TABLE home01( ....;")cur.copy("copy home01(path, directories, files, reported_bytes, actual_bytes, path_level) from local '/work/directory.home01.out.gz' GZIP ;")

My error is

 

Traceback (most recent call last):
File "./pyvertica.py", line 16, in cur.copy("copyhome01(path, directories, files, reported_bytes, actual_bytes, path_level) from local '/work/directory.home01.out.gz' GZIP ;")

TypeError: copy() takes exactly 3 arguments (2 given)

 

I can copy the same file if its decompressed, but with the compressed mode I cannot.What is the error here?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file