Skip to main content
Solved

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

  • June 30, 2014
  • 1 reply
  • 63 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.  

Best answer by david_r

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • Best Answer
  • June 30, 2014
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