shuttle-hq / synth

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

WARN synth::cli::telemetry] could not crawl into field #430

Open kaushalyap opened 1 year ago

kaushalyap commented 1 year ago

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

❯ synth import --from [DB_URI] --schema app_public ap

Steps to reproduce the behavior:

  1. Schema (if applicable)
    CREATE TABLE IF NOT EXISTS
    app_public.tbl (
    id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    col1 BIGINT UNIQUE,
    col2 SMALLINT,
    col3 DATE DEFAULT current_date,
    col4 TIMESTAMPTZ DEFAULT current_timestamp,
    col5 TIMESTAMPTZ CHECK (col4 < col5),
    col6 SMALLINT CHECK (col6 > 0),
    col7 SMALLINT,
    col8 NUMERIC(6,2),
    FOREIGN KEY (col1) REFERENCES app_public.tbl2 (id),
    FOREIGN KEY (col2) REFERENCES app_public.tbl3 (col2)
    );
  2. See error
    ❯ synth import --from [DB_URI] --schema app_public ap
    [2023-05-24T15:17:43Z WARN  synth::cli::telemetry] could not crawl into field `0` at `tbl.content.col6`
    [2023-05-24T15:17:43Z WARN  synth::cli::telemetry] could not crawl into field `col6` at `tbl.content`
    [2023-05-24T15:17:43Z WARN  synth::cli::telemetry] could not crawl into field `content` at `tbl`
    [2023-05-24T15:17:43Z WARN  synth::cli::telemetry] could not crawl into field `tbl` at `{top-level}`
    Error: i32 range with low=7 (inclusive) high=7 (exclusive) step=1 is empty

Expected behavior Generating collections according to table schema.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here.