exyi / pg2parquet

Export PostgreSQL table or query into Parquet file
Apache License 2.0
57 stars 11 forks source link

uuid does not work? #8

Closed jaakla closed 1 year ago

jaakla commented 1 year ago

error with export:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: General("Invalid FIXED_LEN_BYTE_ARRAY length: -1 for field 'id'")', /Users/jaakl/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pg2parquet-0.1.0-beta.3/src/postgres_cloner.rs:404:55
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

My table structure:

CREATE TABLE tour_parameters (
    id uuid NOT NULL DEFAULT gen_random_uuid(),
    tour_id uuid NOT NULL,
    qualifier text NULL,
    value text NULL,
    description text NULL,
    visibility_shipper text NULL,
    visibility_supplier text NULL,
    visibility_carrier text NULL,
    visibility_mom text NULL,
    group_index int4 NULL,
    group_locale_property text NULL,
    export_to_carrier text NULL,
    created_at timestamptz NOT NULL DEFAULT now(),
    CONSTRAINT tour_parameters_pkey PRIMARY KEY (id)
);
exyi commented 1 year ago

Sorry, there was a bug in uuids and I forgot to publish the fix. It should now be available as version 0.1.0-beta.4 on crates.io, if you use cargo:

cargo install pg2parquet@0.1.0-beta.4
jaakla commented 1 year ago

Wow that was fast :) Works for me now. You saved my day at least, thank you!