Skip to main content

I am looking to write to a postgres hstore column and seeing if their is a way to use a postgres writer with its 1000 transactions at a time to write to postgres table with a hstore column over using a 1 at a time sql-executor? I have 5 attributes to go into the hstore.

Hi @kouri1986, yes, you can use the PostgreSQL writer to write a string with "hstore" format (e.g. 'a=>1,b=>2,c=>3') into an existing "hstore" type column if you set "text" as its data type in the User Attributes tab of the writer feature type.

However, "hstore" type columns cannot be created through the User Attributes configuration in the writer feature type. If you need to newly create the destination table containing an "hstore" column at run-time of the workspace rather than writing into an existing table, you will have to execute a SQL statement to create the table before starting to write records, with the SQLCreator/Executor or the "SQL to Run Before Write" parameter in the PostgreSQL writer.


Reply