Skip to content

Importe dans un schéma d'une BDD PostgreSQL l'ensemble des fichiers CSV et SHP d'un dossier / Imports into a schema of a PostgreSQL DB all the CSV and SHP files of a folder

License

Notifications You must be signed in to change notification settings

remifroger/pgimport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgimport

Versions : testé sur Python 2.7.X et Python 3.10.X

Importe dans un schéma d'une BDD PostgreSQL l'ensemble des fichiers CSV et SHP d'un dossier.

Nécessite l'installation de QGIS (ogr2ogr) et PostgreSQL (psql).

Pré-requis

Remplir les variables d'environnement (.env).

Usage

python main.py "path\to\dir" schema

Par exemple, la commande ci-dessous va importer l'ensemble des CSV et SHP du dossier tests (C:\Users\frog\OneDrive - Projet\data\tests) dans le schéma "schema_import".

python main.py "C:\Users\frog\OneDrive - Projet\data\tests" schema_import

Attention, bien veiller à mettre le chemin du dossier entre guillemets.

About

Importe dans un schéma d'une BDD PostgreSQL l'ensemble des fichiers CSV et SHP d'un dossier / Imports into a schema of a PostgreSQL DB all the CSV and SHP files of a folder

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages