Skip to content

TheAschr/sqlseeder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlseeder - PostgreSQL Database seeder

Efficiently seed your postgres database from files using a hierarchical dependency structure. Supports parallel execution, file streaming, and query batching.

See a basic example here.

Data file format

Each line in your data files should have the information required to create one database row. The data can be any format but I recommend json. The file then needs to be gzipped.

Example:

users.json

[
    {"id": 1, "name": "John"},
    {"id": 2, "name": "Jane"}
]
jq -c '.[]' users.json | gzip > users.gz