Skip to main content
Question

How to write a PostgreSQL table with an generated column?


dhaulagiri
Contributor
Forum|alt.badge.img+4

Hello,

FME throws an error when I want to write to a PostgreSQL table that contains a generated column (value calculated from another column). Message: generated columns cannot be used in COPY

Is there any way to ignore this column (by clearing the column from the writer, the error still occurs) or work around this problem?

Thanks for your help

2 replies

dhaulagiri
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • September 4, 2021

I tried to change bulk insert parameter to no (using INSERT and not COPY) but it returns also an error. I finally find a way: AttributeCreator to create a sql command with INSERT and SQLExecutor.

Hope it will be useful...


danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • September 5, 2021
dhaulagiri wrote:

I tried to change bulk insert parameter to no (using INSERT and not COPY) but it returns also an error. I finally find a way: AttributeCreator to create a sql command with INSERT and SQLExecutor.

Hope it will be useful...

Nice @dhaulagiri​ 


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