简体   繁体   中英

how to dump CSV data into postgresql table using python

I have CSV file whose data i need to dump into postgresql table using python script.Also need to create a dynamic table in postrgresql.

Help me if know any ready made tool or the conventional way .

Regards,

psycopg2 offers support for the COPY command, which is what you'll want to use.

See Using COPY in the psycopg2 docs . You'll want to use COPY ... WITH (FORMAT CSV) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM