Closed einhverfr closed 4 years ago
needed for AB 2.0, will be done after 15.https://github.com/adjust/parquet_fdw/issues/15
to be done by @zilder
Hi @einhverfr,
I'm working on a solution. I decided to add a separate function import_parquet()
for this tasks (it think IMPORT FOREIGN SCHEMA
is not well suited for it). You can find its description in README.md in the import
branch. It's still in early stage of development and wasn't tested. I'll add a way to specify extra foreign table options and also to provide a list of table attributes (columns) to import in case end-user would want customize their foreign table.
The feature is ready for testing. The description is in README.md (the import section). The code is in import
branch.
@zilder Would you like to make a PR from this at this point (and also, perhaps, merge the current master in)?
Not a proper review, but there were some compiler warnings about unused variables in the parquet_impl.cpp
On thing I had to add here on MacOS is
#ifndef _GNU_SOURCE
#include <libgen.h>
#endif
that contains basename. Also, basename
won't work on Windows.
@alexeyklyukin I'm going to do some refactoring regarding the use of postgres and c++ exceptions together. Things are not good right now. I'll create a PR after I finish this.
Merged into master
In general there may be different ways we need to be able to import a foreign schema. Someone might assume that all files are to be imported, but others might need to be able to rotate files atomically according to some logic. Having some interface for specifying this function would be really helpful.