exyi / pg2parquet

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

parquet2pg? #19

Closed mhkeller closed 3 months ago

mhkeller commented 3 months ago

This would obviously be a different library, but I wanted to see if there was any interest in making the inverse of this library: going from a parquet file to a postgres table. I could see it being useful to use pg2parquet to extract a sample of data, work on it in a scripting language like Python and then add that table back into postgres.

exyi commented 3 months ago

Yea, I was also thinking about adding an pg2parquet import subcommand. There is number of tools which should do this, including Spark, DuckDB, https://github.com/adjust/parquet_fdw, ... but unsurprisingly neither supports complex data types and similar. For now, I don't have excessive amount of free time, and I'd prefer to do exporting well before expanding the scope. However, if you, or anyone else would like to add the feature, it is welcome and I'd be happy to help

mhkeller commented 3 months ago

Makes sense!