Skip to content

lmyboy/mypy-postgresql-export-to-csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My CSV exporter for Postgresql Database

This is a simple script that conect to a PostgreSQL database, and save the select result at a csv file. The scrtp uses the COPY to create the file from the data stream, saving memory during the proccess.

How to use

  • create the .env file based on .env.example file
  • the search variable is an arrey of tuples that must contain two strings, the first one it's the name of the outpu file (name.csv) and the second one must contain the select SQL script and must not cotain the ; at the end. You could use this project to export mutiple files and SQL scripts in series, jus add another tuple.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages