I’ve created a python script that has the docx library and arcpy library imported in it that takes field values from a GIS feature class and writes it to a docx document successfully. I would like to trigger the python script to run every time that feature class in an enterprise geodatabase is updated.
I am working in the 11.3 Enterprise Environment and have come across this support page regarding implementing webhooks and FME
I will attempt to do the above, but I have a simple question regarding the FME workspace itself.
I have read up on the PythonCreator and PythonCaller transformers, with the PythonCreator not requiring an inpput. If all I want is an update to the GIS feature class to trigger the python script to run, would the FME workspace just have a PythonCreator with the python script in it and a logger? Or would it be more beneficial to have a Creator connected to a PythonCaller transformer then a logger? Is there any best practices to use one over the other if all I want to do is run the python script upon the update trigger?
Thank you in advance!
Best answer by donalmateer
Hi @hawaiialex, thanks for the question! I hope I can give you information for a more informed decision.
PythonCreator:
Ideal for generating features or performing tasks that don't depend on existing data within the workspace.
Simplifies workflows that don't need input data.
Reduces complexity by eliminating unnecessary transformers.
Although - Limited flexibility if future requirements involve processing existing features.
Creator + PythonCaller:
Suitable for scenarios where the Python script needs to process or manipulate incoming features.
Offers greater flexibility for processing existing features.
Easier to integrate with other transformers and data streams.
Although - Slightly more complex setup due to the need for an initial feature generation.
Given that your goal is to execute a Python script upon an update trigger to a GIS feature class, consider the following:
If the Python script operates independently of existing features: Utilize the PythonCreator. This approach simplifies the workspace by removing unnecessary components.
If the Python script needs to process or modify existing features: Implement the Creator + PythonCaller combination. This setup provides the necessary framework to handle and manipulate incoming feature data effectively.
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.
Hi @hawaiialex, thanks for the question! I hope I can give you information for a more informed decision.
PythonCreator:
Ideal for generating features or performing tasks that don't depend on existing data within the workspace.
Simplifies workflows that don't need input data.
Reduces complexity by eliminating unnecessary transformers.
Although - Limited flexibility if future requirements involve processing existing features.
Creator + PythonCaller:
Suitable for scenarios where the Python script needs to process or manipulate incoming features.
Offers greater flexibility for processing existing features.
Easier to integrate with other transformers and data streams.
Although - Slightly more complex setup due to the need for an initial feature generation.
Given that your goal is to execute a Python script upon an update trigger to a GIS feature class, consider the following:
If the Python script operates independently of existing features: Utilize the PythonCreator. This approach simplifies the workspace by removing unnecessary components.
If the Python script needs to process or modify existing features: Implement the Creator + PythonCaller combination. This setup provides the necessary framework to handle and manipulate incoming feature data effectively.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.