โ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.