shuttle-hq / synth

The Declarative Data Generator
https://www.getsynth.com/
Apache License 2.0
1.37k stars 108 forks source link

doc example with doctors on postgres generates 0 values #422

Open nealchau opened 1 year ago

nealchau commented 1 year ago

The docs give table doctors, and show how synth can import the table information and generate the values. i added a trivial hospitals table with only an id column to complete the schema. Then I ran the import command, I found the doctors.json to have only minor differences with the one in the docs:

21,23c21
<           "subtype": "naive_date",
<           "begin": null,
<           "end": null
---
>           "subtype": "naive_date"
38c36
<       "subtype": "u64"
---
>       "subtype": "i32"
45c43
< }
---
> }

however the generate command gives an error and doesn't populate anything:

synth generate --to postgres://postgres:postgres@localhost/guru99 --schema public guru99 Collection doctors generated 0 values. Skipping insertion...

I would expect values to be generated and inserted.

ubuntu 22.04 synth 0.6.9 psql (PostgreSQL) 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1)

ratskates commented 1 year ago

I have the same set up as above. Can confirm the same issue in addition this seems to be happening for any postgres table