Skip to main content
Solved

Can I use a postgres writer over a sqlexecutor to write to a postgres hstore column?

  • June 18, 2018
  • 1 reply
  • 22 views

Forum|alt.badge.img

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.

Best answer by takashi

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.

View original
Did this help you find an answer to your question?

1 reply

takashi
Influencer
  • Best Answer
  • June 19, 2018

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings