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
  • 34 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
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

david_r
Evangelist
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

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