Skip to main content
Question

How to write a PostgreSQL table with an generated column?

  • August 31, 2021
  • 2 replies
  • 167 views

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
Celebrity
Forum|alt.badge.img+52
  • Celebrity
  • September 5, 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...

Nice @dhaulagiri​