Skip to main content
Solved

Dynamically set Database Connection based on published parameters

  • October 3, 2019
  • 1 reply
  • 82 views

I am looking for a way to change the server to which my SQLCreators and FeatureWriters are pointed to based on a parameter. I am not seeing a clear way to do this in FME. It is my understanding that in FME, we can use Python to dynamically set parameters or update transformers.

 

What is the preferred way to do this? Can I update the Server property of a Database connection? Or should I change the connection property of the writers and creators?

Best answer by daveatsafe

Hi @alexcls,

Please create an FME Database Connection (Tools - FME Options - Database Connections) for each of the servers you want to read/write to in those transformers.

In the SQLCreator transformer, click on the triangle button beside the Connection parameter, then choose User Parameter - Create User Parameter from the dropdown menu. Click OK to accept the User Parameter settings.

You now have the ability to choose the desired server by setting the newly created parameter to the appropriate Database Connection for that server. This process will work for the FeatureWriter as well.

View original
Did this help you find an answer to your question?

1 reply

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • October 3, 2019

Hi @alexcls,

Please create an FME Database Connection (Tools - FME Options - Database Connections) for each of the servers you want to read/write to in those transformers.

In the SQLCreator transformer, click on the triangle button beside the Connection parameter, then choose User Parameter - Create User Parameter from the dropdown menu. Click OK to accept the User Parameter settings.

You now have the ability to choose the desired server by setting the newly created parameter to the appropriate Database Connection for that server. This process will work for the FeatureWriter as well.


Reply


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