cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

PostgreSQL - Bulk Load with schema provided

chmurray88
New Contributor II

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

4 REPLIES 4

AleksandarAngel
Contributor III

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.

chmurray88
New Contributor II

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?

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?

chmurray88
New Contributor II

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.