-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing Array(String) from parquet file does not work with text[] column #79
Comments
Idle wondering: is this because the names do not match? Is this another symptom of #39 ? |
Field names seem correct but I also plan to introduce EDIT: looks like field name also mismatch for the list element. So yes, another symptom of #39. |
To make it even more tricky, I'm not even sure how to make the field name for the list element match. If the field in the table is changed from It is nice to match on name where possible ... perhaps a smaller useful change here would be to just ignore the name of the field on list elements, as they aren't nameable (afaik, anyways) in postgresql. p.s. thank-you for this tool. Being able to drag data into pgsql from parquet files is very snazzy. |
thanks for the feedback, hopefully we will improve |
you can try checkout to #39 btw. It has good chance to resolve the element name mismatch (cast will allow it), which will merged the next week. |
Cool! I will check this out over the next day and report back how this addresses the issue. Thanks! |
I can confirm that this has resolved the issue I was seeing. Thanks again! :) |
Using the file at
s3://fsq-os-places-us-east-1/release/dt=2024-11-19/places/parquet/places-00000.snappy.parquet
(part of https://opensource.foursquare.com/os-places/ .. ~434MB in size), pg_parquet shows the following schema:and creating a table in postgresql as:
then attempting to copy the file into the table with:
results in the following error:
I also tried with a custom type such as
CREATE TYPE element AS (elment text[]);
but that ends up creating a list of records, which also does not match the parquet file.I'm not sure if I'm doing something wrong here (the documentation is a bit light on how arrays are intended to work?), or if this is a bug in
pg_parquet
.The text was updated successfully, but these errors were encountered: