03-03-2023 01:11 PM
Hello -
I am trying to provide a schema for the PostgreSQL - Bulk Load snap to use. I’m getting an error that “Expecting a schema document with a map of column names to their descriptions”.
I have a query that returns the column names and their data types. I’ve done this with the parquet writer snap and it works fine. With this snap, it seems like there is a different format needed to send in the schema.
I’ve looked on the documentation for the snap and there is no example. Was looking to see if anyone could provide some insight on this for me.
Thanks!
Chris
03-03-2023 01:21 PM
Hello @chmurray88,
Maybe you can try by using PostgreSQL - Select snap with second open output view to feed the wanted schema to the PostgreSQL - Bulk Load snap, or at least you can get an insight of what’s the expected metadata format.
Try it and let me know if this helps you. 🙂
BR,
Aleksandar.
03-03-2023 01:43 PM
Thanks for responding @AleksandarAngelevski
I think I’m closer now.
I think I’ve narrowed it down to needing to pass in columns and data_type.
Now I’m getting a different error that says “Expecting object or array for wildcard path, found: col1, Resolution: Expecting a schema document with a map of column names to their descriptions.”.
So…any idea?
03-04-2023 01:23 AM
Since I haven’t used any of the PostgreSQL Snaps, could you provide a sample of the metadata from a Select Snap output and a sample of what you are passing to the Bulk Load’s second input view?
03-07-2023 07:38 AM
I heard back from the product team on this. There is no support for providing your own schema directly to the second input of the postgresql bulk upload snap.
As a work around…I created the table first and then pointed to the newly created table. It works, but…if there is no data from the source you have a blank table out there. Not a huge deal, but would like to see SnapLogic support this in the future.