Solved

Is there a python library to make calls to a postgres db in a startup script?

  • 30 June 2014
  • 1 reply
  • 4 views

I found some documentation for import psycopg2 but when I try to include this in a startup python script on FME workbench 2014 sp2 it says that there is no module named psycopg2.  I am trying to read/write to a postgres db, more specifically i want to set a value based on a previous feature.  I believe that you cannot iterate features in a python caller.  
icon

Best answer by david_r 30 June 2014, 10:52

View original

1 reply

Userlevel 4
Hi,

 

 

that is correct, psycopg2 isn't part of the default Phython install, you will have to install it yourself: http://fmepedia.safe.com/articles/How_To/Install-Python-modules-into-FME

 

 

But why not just use the FMEUniversalReader in the fmeobjects API? The doc is in <FME install dir>/fmeobjects/python/apidoc/fmeobjects.FMEUniversalReader-class.html

 

 

David

Reply