Skip to main content

I need to transfer a PG table that has a geometry (line) field in below format, to another PG table on another database using FME. 

I know it’s already in the workable final format. 

If I just run queries as below and save results directly to the target database using DBeaver, it works fine.  

          geomfromewkt(comm_path_line_geo)::geometry as sp_geometry

 

But somehow it’s not working on FME to transfer from one to the other. I tried SQLExecutor alone and also with GeometryReplacer.

I tried queries inside SQLExecutor this way:

select geomfromewkt(comm_path_line_geo)::geometry as geometry from my_table

 

and this way:

select comm_path_line_geo::text from my_table  and then to process with GeometryReplacer

 

and also this way:
select comm_path_line_geo as sp_geometry         with this, the FME transformer would convert automatically convert it to binary geometry format but it’s not usable at the end tool. 

 

They all didn’t work. Can someone please help? I know this shouldn’t be that difficult because it's already there.  Thank you. 

 

Hi ​@fpakzat ,

I think this query would work with SQLExecutor.

select geomfromewkt(comm_path_line_geo)::geometry as geometry from my_table

Make sure that these parameters setting in the transformer.

  • Format: PostGIS
  • Combine Geometry: Result Geometry Only

 


Hi ​@takashi , 

 

The solution worked fine this time especially the “Result Geometry Only” option.  Thanks a lot.