all AI news
Easily Generate Mock Data with PostgreSQL
DEV Community dev.to
Original Post: https://www.dylanpaulus.com/posts/easily-generate-mock-data-with-postgresql
When writing articles about PostgreSQL there are times I need to generate large swaths of data to test and demonstrate a topic (for example, these Timescale articles here and here).
It can be a pain to manually insert data or create a CSV and import it into PostgreSQL--which I always have to StackOverflow.
Lately, I ran into a much simpler solution to generating data: the generate_series
function.
It's perfectly suited for integers and timestamp data …
articles csv data database datascience example generate import pain postgres postgresql sql stackoverflow test timescale writing