SlideShare a Scribd company logo
Integrating FME with
Python: Tips, Demos, and
Best Practices for
Powerful Automation
Crystal
Fitzpatrick
Technical Support
Specialist, FME Form
Ali
Mokheamer
Technical Support
Specialist, FME Form
Welcome to Livestorm.
A few ways to engage with us during the webinar:
Audio issues? Click this for 4 simple
troubleshooting steps.
How to download slides
1. Hover over the
slide deck in the
webinar room
2. Click this button
Agenda
1 Introduction
2 Integrating Python with FME
3 Tips and Troubleshooting
4 Conclusion, Resources, and Next Steps
5 Q&A
Agenda
1
Introduction
● Python is a scripting language
What is Python?
Python and FME Basics, Python FME API
documentation
Why is Python attractive?
● Free and open source
● Extensive documentation
● Compatible with many GIS applications
● Cross-platform language
Python can be cumbersome.
When using Python on its own to develop data integration solutions, it can be:
● Time-consuming
● Hard to manage (dependencies, scripts, etc.)
● Slower development time
Python and FME Basics
Integrate Python in FME
to extend functionality.
Reasons for using Python
in FME:
● Performing operations that FME workbench
doesn’t support
● Leverage third party modules and libraries
● Call or run a workspace via script (outside FME
Workbench with an Integrated Development
Environment(IDE))
● Migrate ArcPy or other Python scripts
● Automate data tasks
● And more…
Python and FME Basics
However…
Ref: FME Transformers Documentation
Can it be done using FME
transformers instead of Python?
One platform, two technologies
FME Form FME Flow
Data Movement and transformations
(“ETL”) workflows are built here.
Brings life to FME Form workflows
FME Flow Hosted
Safe Software managed FME Flow
fme.safe.com/platform
FME Enterprise Integration Platform
Safe & FME
2
Integrating
Python with FME
Ways of integrating Python with FME
● Startup and shutdown scripts, scripted parameters, PythonCaller &
PythonCreator
● Demo on ArcPy within FME
● Using FME’s AI Assist to optimize your workflows
● Tackle Python package installations using the command line (pip)
● Import FME Objects for external IDEs
Startup and
Shutdown
Scripts
Startup Scripts
● Check database connection
● Move data
● Scan log for particular message
or condition
● Capture translation stats
● Define global python variables
● Pre-translation check
Ref: Startup Python Scripts in FME
Shutdown Scripts
● Write to a translation history log
● Can access a number of global
variables which FME creates
● Open output dataset with default
application
● Send email if the translation fails
Tip: A shutdown script should not use any
modules from the FME Objects Python API
Ref: Shutdown Python Scripts in FME
1
2
Scripted
Parameters
Scripted Parameters
● Run before Startup Scripts
● Set a parameter in FME
derived or calculated from
another parameter
● Give output a unique name
Ref: Python Scripted Parameters in FME
PythonCaller
& Python
Creator
PythonCaller & Python
Creator
● Make changes to features or groups
of features using Python script
Tip: Import all essential modules
Tip: Make sure to remember to change the
class to process feature to the class name in
the script (2) and to expose the attribute
created in the script (3)
Ref: PythonCaller Transformer
ArcPy
Demo
● Make use of ArcGIS geoprocessing
tools
● Export python scripts from
ModelBuilder
Why use ArcPy in FME?
Slide Title
Use ArcPy in
PythonCaller to
run Kriging
Spatial Analyst
tool.
Goal Block Key
ArcPy Demo
Result
Not as
straightforward
to do with FME.
May take many
more steps.
Use ArcPy Script
in PythonCaller
to use Kriging
tool within FME.
The ArcPy script
and FME
workspace can
be used again for
multiple
datasets.
Demo
● PythonCaller to run Kriging Spatial
Analyst tool
● ArcPy within FME: very beneficial for
utilizing ArcGIS geoprocessing tools
Tips: Ensure workspace Python Compatibility
parameter is set to the interpreter installed by
ArcGIS and that you have a valid ArcGIS
license on your machine
Key Takeaways
Ref: Using Arcpy for FME Feature Processing
AI Assist
● Helpful if you are new to python
● Generate code, refine code, explain
code and add comments
● Explanation can be helpful for
troubleshooting
Tip: Look at the AI Assist help documentation
“Generating Python” for help with generating
prompts
Tip: Review the output before using in your
script
AI Assist
Ref: AI Assist
1
2
3
Installing
Python
Packages
● FME 2020.1 +
Windows
fme.exe python -m pip install <package_name>
Mac/Linux
./fme python -m pip install <package_name>, ./fme python -m pip install
<package_name> [--system]
● < FME 2020.1
Windows
fme.exe python -m pip install <package_name> --target <package_destination_folder>
Linux/Mac
./fme python -m pip install <package_name> --system --target
<package_destination_folder>
Python Packages
Installing Python Packages to FME Form
FME ships with the Standard Python Library.
● You can use Python module like import os, pathlib, csv etc
Python Standard Library
Third-party modules
● Must be installed via a package and imported (same Python version)
● To upload a module to Flow: EnginePluginspython##[#]
Python Modules
Installing the
pyfiglet package
into an FME
Python directory
Goal Block Key
Installing Packages Demo
Result
It can be
confusing where
particular
packages reside
Using pip (pypi)
via command
prompt to install
packages
Have packages
installed in FME
directories
Demo
● Make sure to place packages in the right
Python version directory (e.g.,
python312 - use 2024.1 fme.exe)
● Make sure to set your compatibility
setting to the correct version before
importing a module (bundled with mac)
Key Takeaways
Using Python with FME Flow
Importing
FME Objects
into an
External IDE
● Make sure to add an interpreter that is not
FME’s (system interpreter)
● The Python interpreter version must be one
that is supported by the FME version used.
The bit-version must also match
Importing modules into PyCharm
Use PyCharm as FMEObjects Python IDE
Slide Title
Importing the
FME Objects
module into
PyCharm
Goal Block Key
Importing FME Objects into PyCharm Demo
Result
It can be
cumbersome to
set up
Imported via Local
and Project
Interpreter Settings
Able to run a
workspace with the
FMEObjects
module in PyCharm
Demo
● Make sure to add FME_HOME as an
environment variable
● Test the import to make sure its
readable
● fmebootstrap library was created
to help resolve load-time
dependencies.
Key Takeaways
Use PyCharm as FMEObjects Python IDE
3
Tips and
Troubleshooting
Tips: Python Packages and Modules
Confirm…
1. Modules are imported in their script(s)
2. 3rd-party packages are installed in the right python version directory
i.e., python311 in C:Users<user>DocumentsFMEPluginsPythonpython311 |
~/.fme/Plugins/Python/python<version> | ~/Library/Application
Support/FME/Plugins/Python/python<version>
3. Python Exception <ModuleNotFoundError>
No module named ‘x’ may be caused by the system path variable, python interpreter, or multiple
python versions conflicting (Ref: No Module Named ArcPy: Importing Esri's ArcPy for Use with FME)
Installing Python Packages to FME Form,
Importing Custom Python Modules to FME Flow
Tips: Python Troubleshooting
1. Check version compatibility
2. Check Python Interpreter for Python versioning
3. Ensure system path variables are correct
4. Workspaces authored on one machine may not work on another machine if they depend
on custom Python libraries
Python Troubleshooting
Tips: Common HTTPS/SSL Issues
FME’s Python Interpreter may use the System Truststore or
Certifi’s collection of Root Certificates.
If using self-signed or private CA (Certificate Authority)
certificates
● they need to be manually added to cacert.pem or the
system truststore.
● Watch out for certificate expiry.
If you are experiencing SSL issues only then should you attempt
importing certificates.
FME Flow Troubleshooting: Configuring for HTTPS/SSL
Tips: Going from Form to Flow
1. Python Exception <ModuleNotFoundError>
No module named ‘example’ is sometimes caused by the extraction process not
completing successfully in Resources > Engine
(Ref: FME Server and Packages: Python Exception <ModuleNotFoundError>)
2. When a job is submitted on FME Flow via the FMEFlowJobSubmitter with "Submit Jobs" =
In Sequence and "Wait for Jobs to Complete" = Yes, the job gets stuck in the queued state.
(Ref: Known Issue: Python mismatch causes sequenced child workspaces to stay in
queue forever)
Using Python with FME Flow, Importing Custom
Python Modules to FME Flow
4
Conclusion
Summary
● Python is great to add logic that’s not
available (make sure there is logic)
● Additional functionality to workspaces (e.g.,
Startup scripts)
● Install packages not shipped with FME via
download or pip
● Run scripts outside FME with an IDE or
other program of your choice
Python Articles
29+
27K+
128
190
20K+
years of solving data
challenges
FME Community
members
countries with
FME customers
organizations worldwide
global partners with
FME services
30+
29K+
128
140+
25K+
years of solving data
challenges
FME Community
members
countries with
FME customers
organizations worldwide
global partners with
FME services
200K+
users worldwide
Safe & FME
5
Resources
● Python and FME Basics
● Python Troubleshooting
● AI Assist in FME FAQ
Python Resources
Get our Ebook
Spatial Data for the
Enterprise
fme.ly/gzc
Guided learning
experiences at your
fingertips
academy.safe.com
FME Academy
Resources
Check out how-to’s &
demos in the knowledge
base
support.safe.com
Knowledge Base Webinars
Upcoming &
on-demand webinars
safe.com/webinars
Check out
our podcasts
on-demand.
featuring special guest
speakers over at EM360
Resources
6
Next Steps
We’d love to help you get
started.
Get in touch with us at
info@safe.com
Experience the
FME Accelerator
Contact Us
A world where data is not just a
commodity but a catalyst for
real change.
fme.safe.com/accelerator
Next Steps
ClaimYour Community Badge &
Dive into the new Community!
● Get community badges for watching
webinars
● community.safe.com
● Today’s code: AEE3R5
Join the Community today!
Next Steps
7
Q&A
ThankYou
Recap of Next Steps
1 Follow us on LinkedIn!
2 Contact us
3 Experience the FME Accelerator
Please fill out our
webinar survey
Ad

More Related Content

Similar to Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Automation (20)

PYTHON-Unit-I-Notes for python learnerss
PYTHON-Unit-I-Notes for python learnerssPYTHON-Unit-I-Notes for python learnerss
PYTHON-Unit-I-Notes for python learnerss
Sree Saraswathi Thiagaraja College
 
Introduction to Python and Basic Syntax.pptx
Introduction to Python and Basic Syntax.pptxIntroduction to Python and Basic Syntax.pptx
Introduction to Python and Basic Syntax.pptx
GevitaChinnaiah
 
10 useful Python development setup tips to boost your productivity
10 useful Python development setup tips to boost your productivity10 useful Python development setup tips to boost your productivity
10 useful Python development setup tips to boost your productivity
Agile Infoways LLC
 
vvvvReadme
vvvvReadmevvvvReadme
vvvvReadme
Mitazaki Yan
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
Eran Shlomo
 
Elevate your programming expertise with Xplore IT Corp’s python training in C...
Elevate your programming expertise with Xplore IT Corp’s python training in C...Elevate your programming expertise with Xplore IT Corp’s python training in C...
Elevate your programming expertise with Xplore IT Corp’s python training in C...
xploreitcorp
 
Summer Training Project.pdf
Summer Training Project.pdfSummer Training Project.pdf
Summer Training Project.pdf
Lovely professinal university
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshop
amptiny
 
Exploring Five Lesser-Known Python Libraries
Exploring Five Lesser-Known Python LibrariesExploring Five Lesser-Known Python Libraries
Exploring Five Lesser-Known Python Libraries
MinhazulAbedin27
 
Core python programming tutorial
Core python programming tutorialCore python programming tutorial
Core python programming tutorial
Amarjeetsingh Thakur
 
Hello World! with Python
Hello World! with PythonHello World! with Python
Hello World! with Python
Dhanashree Prasad
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Ranjith kumar
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txt
Inexture Solutions
 
The New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by PythonThe New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by Python
All Things Open
 
When to use python in FME
When to use python in FMEWhen to use python in FME
When to use python in FME
Daniela Perri
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
BijuAugustian
 
Python Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computerPython Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computer
sharanyarashmir5
 
Python
Python Python
Python
Edureka!
 
Tutorial_Python1.pdf
Tutorial_Python1.pdfTutorial_Python1.pdf
Tutorial_Python1.pdf
MuzamilFaiz
 
Introducing the new Package SDK, Create and Share Python Based Transformers
Introducing the new Package SDK, Create and Share Python Based Transformers Introducing the new Package SDK, Create and Share Python Based Transformers
Introducing the new Package SDK, Create and Share Python Based Transformers
Safe Software
 
Introduction to Python and Basic Syntax.pptx
Introduction to Python and Basic Syntax.pptxIntroduction to Python and Basic Syntax.pptx
Introduction to Python and Basic Syntax.pptx
GevitaChinnaiah
 
10 useful Python development setup tips to boost your productivity
10 useful Python development setup tips to boost your productivity10 useful Python development setup tips to boost your productivity
10 useful Python development setup tips to boost your productivity
Agile Infoways LLC
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
Eran Shlomo
 
Elevate your programming expertise with Xplore IT Corp’s python training in C...
Elevate your programming expertise with Xplore IT Corp’s python training in C...Elevate your programming expertise with Xplore IT Corp’s python training in C...
Elevate your programming expertise with Xplore IT Corp’s python training in C...
xploreitcorp
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshop
amptiny
 
Exploring Five Lesser-Known Python Libraries
Exploring Five Lesser-Known Python LibrariesExploring Five Lesser-Known Python Libraries
Exploring Five Lesser-Known Python Libraries
MinhazulAbedin27
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Ranjith kumar
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txt
Inexture Solutions
 
The New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by PythonThe New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by Python
All Things Open
 
When to use python in FME
When to use python in FMEWhen to use python in FME
When to use python in FME
Daniela Perri
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
BijuAugustian
 
Python Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computerPython Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computer
sharanyarashmir5
 
Tutorial_Python1.pdf
Tutorial_Python1.pdfTutorial_Python1.pdf
Tutorial_Python1.pdf
MuzamilFaiz
 
Introducing the new Package SDK, Create and Share Python Based Transformers
Introducing the new Package SDK, Create and Share Python Based Transformers Introducing the new Package SDK, Create and Share Python Based Transformers
Introducing the new Package SDK, Create and Share Python Based Transformers
Safe Software
 

More from Safe Software (20)

Managing Changing Data with FME: Part 2 – Flexible Approaches to Tracking Cha...
Managing Changing Data with FME: Part 2 – Flexible Approaches to Tracking Cha...Managing Changing Data with FME: Part 2 – Flexible Approaches to Tracking Cha...
Managing Changing Data with FME: Part 2 – Flexible Approaches to Tracking Cha...
Safe Software
 
Driving Transportation Forward: Real-World Data Solutions
Driving Transportation Forward: Real-World Data SolutionsDriving Transportation Forward: Real-World Data Solutions
Driving Transportation Forward: Real-World Data Solutions
Safe Software
 
Managing Changing Data with FME Part 1 - Compare & Detect
Managing Changing Data with FME Part 1 - Compare & DetectManaging Changing Data with FME Part 1 - Compare & Detect
Managing Changing Data with FME Part 1 - Compare & Detect
Safe Software
 
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-WorldAll-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
Safe Software
 
Safer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safer’s Picks: The 6 FME Transformers You Didn’t Know You NeededSafer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safe Software
 
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Safe Software
 
Navigating SharePoint Integration: From Seamless Configuration to Workflow Au...
Navigating SharePoint Integration: From Seamless Configuration to Workflow Au...Navigating SharePoint Integration: From Seamless Configuration to Workflow Au...
Navigating SharePoint Integration: From Seamless Configuration to Workflow Au...
Safe Software
 
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
Safe Software
 
Data-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second CountsData-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second Counts
Safe Software
 
AI Agents Made Simple: Unleash the Power of All Your Data with Any AI
AI Agents Made Simple: Unleash the Power of All Your Data with Any AIAI Agents Made Simple: Unleash the Power of All Your Data with Any AI
AI Agents Made Simple: Unleash the Power of All Your Data with Any AI
Safe Software
 
All-Data Any-AI Integration Innovations with FME and Google
All-Data Any-AI Integration Innovations with FME and GoogleAll-Data Any-AI Integration Innovations with FME and Google
All-Data Any-AI Integration Innovations with FME and Google
Safe Software
 
FME Hub Unlocked: Your Guide to Sharing and Discovering Resources
FME Hub Unlocked: Your Guide to Sharing and Discovering ResourcesFME Hub Unlocked: Your Guide to Sharing and Discovering Resources
FME Hub Unlocked: Your Guide to Sharing and Discovering Resources
Safe Software
 
Web Mapping 101: Creating Dynamic Web Maps with Geospatial Data
Web Mapping 101: Creating Dynamic Web Maps with Geospatial DataWeb Mapping 101: Creating Dynamic Web Maps with Geospatial Data
Web Mapping 101: Creating Dynamic Web Maps with Geospatial Data
Safe Software
 
Building Scalable FME Solutions: Best Practices for Workspaces, Automation an...
Building Scalable FME Solutions: Best Practices for Workspaces, Automation an...Building Scalable FME Solutions: Best Practices for Workspaces, Automation an...
Building Scalable FME Solutions: Best Practices for Workspaces, Automation an...
Safe Software
 
How to Connect to Any REST API with No-Code
How to Connect to Any REST API with No-CodeHow to Connect to Any REST API with No-Code
How to Connect to Any REST API with No-Code
Safe Software
 
Bridging Classroom and Career: Cutting-Edge Data Integration Grants for Educa...
Bridging Classroom and Career: Cutting-Edge Data Integration Grants for Educa...Bridging Classroom and Career: Cutting-Edge Data Integration Grants for Educa...
Bridging Classroom and Career: Cutting-Edge Data Integration Grants for Educa...
Safe Software
 
From Pixels to Insights: Getting Started with Imagery in FME
From Pixels to Insights: Getting Started with Imagery in FMEFrom Pixels to Insights: Getting Started with Imagery in FME
From Pixels to Insights: Getting Started with Imagery in FME
Safe Software
 
FME Flow Takes Flight! 12 Days of FME: Community Contest Kickoff
FME Flow Takes Flight! 12 Days of FME: Community Contest KickoffFME Flow Takes Flight! 12 Days of FME: Community Contest Kickoff
FME Flow Takes Flight! 12 Days of FME: Community Contest Kickoff
Safe Software
 
5 Data Integration Techniques to Improve Your Excel Data
5 Data Integration Techniques to Improve Your Excel Data5 Data Integration Techniques to Improve Your Excel Data
5 Data Integration Techniques to Improve Your Excel Data
Safe Software
 
Optimizing XML & JSON Workflows for Seamless Data Integration
Optimizing XML & JSON Workflows for Seamless Data IntegrationOptimizing XML & JSON Workflows for Seamless Data Integration
Optimizing XML & JSON Workflows for Seamless Data Integration
Safe Software
 
Managing Changing Data with FME: Part 2 – Flexible Approaches to Tracking Cha...
Managing Changing Data with FME: Part 2 – Flexible Approaches to Tracking Cha...Managing Changing Data with FME: Part 2 – Flexible Approaches to Tracking Cha...
Managing Changing Data with FME: Part 2 – Flexible Approaches to Tracking Cha...
Safe Software
 
Driving Transportation Forward: Real-World Data Solutions
Driving Transportation Forward: Real-World Data SolutionsDriving Transportation Forward: Real-World Data Solutions
Driving Transportation Forward: Real-World Data Solutions
Safe Software
 
Managing Changing Data with FME Part 1 - Compare & Detect
Managing Changing Data with FME Part 1 - Compare & DetectManaging Changing Data with FME Part 1 - Compare & Detect
Managing Changing Data with FME Part 1 - Compare & Detect
Safe Software
 
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-WorldAll-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
Safe Software
 
Safer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safer’s Picks: The 6 FME Transformers You Didn’t Know You NeededSafer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safer’s Picks: The 6 FME Transformers You Didn’t Know You Needed
Safe Software
 
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Safe Software
 
Navigating SharePoint Integration: From Seamless Configuration to Workflow Au...
Navigating SharePoint Integration: From Seamless Configuration to Workflow Au...Navigating SharePoint Integration: From Seamless Configuration to Workflow Au...
Navigating SharePoint Integration: From Seamless Configuration to Workflow Au...
Safe Software
 
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
Safe Software
 
Data-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second CountsData-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second Counts
Safe Software
 
AI Agents Made Simple: Unleash the Power of All Your Data with Any AI
AI Agents Made Simple: Unleash the Power of All Your Data with Any AIAI Agents Made Simple: Unleash the Power of All Your Data with Any AI
AI Agents Made Simple: Unleash the Power of All Your Data with Any AI
Safe Software
 
All-Data Any-AI Integration Innovations with FME and Google
All-Data Any-AI Integration Innovations with FME and GoogleAll-Data Any-AI Integration Innovations with FME and Google
All-Data Any-AI Integration Innovations with FME and Google
Safe Software
 
FME Hub Unlocked: Your Guide to Sharing and Discovering Resources
FME Hub Unlocked: Your Guide to Sharing and Discovering ResourcesFME Hub Unlocked: Your Guide to Sharing and Discovering Resources
FME Hub Unlocked: Your Guide to Sharing and Discovering Resources
Safe Software
 
Web Mapping 101: Creating Dynamic Web Maps with Geospatial Data
Web Mapping 101: Creating Dynamic Web Maps with Geospatial DataWeb Mapping 101: Creating Dynamic Web Maps with Geospatial Data
Web Mapping 101: Creating Dynamic Web Maps with Geospatial Data
Safe Software
 
Building Scalable FME Solutions: Best Practices for Workspaces, Automation an...
Building Scalable FME Solutions: Best Practices for Workspaces, Automation an...Building Scalable FME Solutions: Best Practices for Workspaces, Automation an...
Building Scalable FME Solutions: Best Practices for Workspaces, Automation an...
Safe Software
 
How to Connect to Any REST API with No-Code
How to Connect to Any REST API with No-CodeHow to Connect to Any REST API with No-Code
How to Connect to Any REST API with No-Code
Safe Software
 
Bridging Classroom and Career: Cutting-Edge Data Integration Grants for Educa...
Bridging Classroom and Career: Cutting-Edge Data Integration Grants for Educa...Bridging Classroom and Career: Cutting-Edge Data Integration Grants for Educa...
Bridging Classroom and Career: Cutting-Edge Data Integration Grants for Educa...
Safe Software
 
From Pixels to Insights: Getting Started with Imagery in FME
From Pixels to Insights: Getting Started with Imagery in FMEFrom Pixels to Insights: Getting Started with Imagery in FME
From Pixels to Insights: Getting Started with Imagery in FME
Safe Software
 
FME Flow Takes Flight! 12 Days of FME: Community Contest Kickoff
FME Flow Takes Flight! 12 Days of FME: Community Contest KickoffFME Flow Takes Flight! 12 Days of FME: Community Contest Kickoff
FME Flow Takes Flight! 12 Days of FME: Community Contest Kickoff
Safe Software
 
5 Data Integration Techniques to Improve Your Excel Data
5 Data Integration Techniques to Improve Your Excel Data5 Data Integration Techniques to Improve Your Excel Data
5 Data Integration Techniques to Improve Your Excel Data
Safe Software
 
Optimizing XML & JSON Workflows for Seamless Data Integration
Optimizing XML & JSON Workflows for Seamless Data IntegrationOptimizing XML & JSON Workflows for Seamless Data Integration
Optimizing XML & JSON Workflows for Seamless Data Integration
Safe Software
 
Ad

Recently uploaded (20)

The Microsoft Excel Parts Presentation.pdf
The Microsoft Excel Parts Presentation.pdfThe Microsoft Excel Parts Presentation.pdf
The Microsoft Excel Parts Presentation.pdf
YvonneRoseEranista
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of ExchangesJignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah Innovator
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
The Microsoft Excel Parts Presentation.pdf
The Microsoft Excel Parts Presentation.pdfThe Microsoft Excel Parts Presentation.pdf
The Microsoft Excel Parts Presentation.pdf
YvonneRoseEranista
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of ExchangesJignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah Innovator
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
Ad

Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Automation

  • 1. Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Automation
  • 2. Crystal Fitzpatrick Technical Support Specialist, FME Form Ali Mokheamer Technical Support Specialist, FME Form
  • 3. Welcome to Livestorm. A few ways to engage with us during the webinar: Audio issues? Click this for 4 simple troubleshooting steps.
  • 4. How to download slides 1. Hover over the slide deck in the webinar room 2. Click this button
  • 5. Agenda 1 Introduction 2 Integrating Python with FME 3 Tips and Troubleshooting 4 Conclusion, Resources, and Next Steps 5 Q&A Agenda
  • 7. ● Python is a scripting language What is Python? Python and FME Basics, Python FME API documentation Why is Python attractive? ● Free and open source ● Extensive documentation ● Compatible with many GIS applications ● Cross-platform language
  • 8. Python can be cumbersome. When using Python on its own to develop data integration solutions, it can be: ● Time-consuming ● Hard to manage (dependencies, scripts, etc.) ● Slower development time Python and FME Basics
  • 9. Integrate Python in FME to extend functionality.
  • 10. Reasons for using Python in FME: ● Performing operations that FME workbench doesn’t support ● Leverage third party modules and libraries ● Call or run a workspace via script (outside FME Workbench with an Integrated Development Environment(IDE)) ● Migrate ArcPy or other Python scripts ● Automate data tasks ● And more… Python and FME Basics However…
  • 11. Ref: FME Transformers Documentation Can it be done using FME transformers instead of Python?
  • 12. One platform, two technologies FME Form FME Flow Data Movement and transformations (“ETL”) workflows are built here. Brings life to FME Form workflows FME Flow Hosted Safe Software managed FME Flow fme.safe.com/platform FME Enterprise Integration Platform Safe & FME
  • 14. Ways of integrating Python with FME ● Startup and shutdown scripts, scripted parameters, PythonCaller & PythonCreator ● Demo on ArcPy within FME ● Using FME’s AI Assist to optimize your workflows ● Tackle Python package installations using the command line (pip) ● Import FME Objects for external IDEs
  • 16. Startup Scripts ● Check database connection ● Move data ● Scan log for particular message or condition ● Capture translation stats ● Define global python variables ● Pre-translation check Ref: Startup Python Scripts in FME
  • 17. Shutdown Scripts ● Write to a translation history log ● Can access a number of global variables which FME creates ● Open output dataset with default application ● Send email if the translation fails Tip: A shutdown script should not use any modules from the FME Objects Python API Ref: Shutdown Python Scripts in FME 1 2
  • 19. Scripted Parameters ● Run before Startup Scripts ● Set a parameter in FME derived or calculated from another parameter ● Give output a unique name Ref: Python Scripted Parameters in FME
  • 21. PythonCaller & Python Creator ● Make changes to features or groups of features using Python script Tip: Import all essential modules Tip: Make sure to remember to change the class to process feature to the class name in the script (2) and to expose the attribute created in the script (3) Ref: PythonCaller Transformer
  • 23. ● Make use of ArcGIS geoprocessing tools ● Export python scripts from ModelBuilder Why use ArcPy in FME?
  • 24. Slide Title Use ArcPy in PythonCaller to run Kriging Spatial Analyst tool. Goal Block Key ArcPy Demo Result Not as straightforward to do with FME. May take many more steps. Use ArcPy Script in PythonCaller to use Kriging tool within FME. The ArcPy script and FME workspace can be used again for multiple datasets.
  • 25. Demo
  • 26. ● PythonCaller to run Kriging Spatial Analyst tool ● ArcPy within FME: very beneficial for utilizing ArcGIS geoprocessing tools Tips: Ensure workspace Python Compatibility parameter is set to the interpreter installed by ArcGIS and that you have a valid ArcGIS license on your machine Key Takeaways Ref: Using Arcpy for FME Feature Processing
  • 28. ● Helpful if you are new to python ● Generate code, refine code, explain code and add comments ● Explanation can be helpful for troubleshooting Tip: Look at the AI Assist help documentation “Generating Python” for help with generating prompts Tip: Review the output before using in your script AI Assist Ref: AI Assist 1 2 3
  • 30. ● FME 2020.1 + Windows fme.exe python -m pip install <package_name> Mac/Linux ./fme python -m pip install <package_name>, ./fme python -m pip install <package_name> [--system] ● < FME 2020.1 Windows fme.exe python -m pip install <package_name> --target <package_destination_folder> Linux/Mac ./fme python -m pip install <package_name> --system --target <package_destination_folder> Python Packages Installing Python Packages to FME Form
  • 31. FME ships with the Standard Python Library. ● You can use Python module like import os, pathlib, csv etc Python Standard Library Third-party modules ● Must be installed via a package and imported (same Python version) ● To upload a module to Flow: EnginePluginspython##[#] Python Modules
  • 32. Installing the pyfiglet package into an FME Python directory Goal Block Key Installing Packages Demo Result It can be confusing where particular packages reside Using pip (pypi) via command prompt to install packages Have packages installed in FME directories
  • 33. Demo
  • 34. ● Make sure to place packages in the right Python version directory (e.g., python312 - use 2024.1 fme.exe) ● Make sure to set your compatibility setting to the correct version before importing a module (bundled with mac) Key Takeaways Using Python with FME Flow
  • 36. ● Make sure to add an interpreter that is not FME’s (system interpreter) ● The Python interpreter version must be one that is supported by the FME version used. The bit-version must also match Importing modules into PyCharm Use PyCharm as FMEObjects Python IDE
  • 37. Slide Title Importing the FME Objects module into PyCharm Goal Block Key Importing FME Objects into PyCharm Demo Result It can be cumbersome to set up Imported via Local and Project Interpreter Settings Able to run a workspace with the FMEObjects module in PyCharm
  • 38. Demo
  • 39. ● Make sure to add FME_HOME as an environment variable ● Test the import to make sure its readable ● fmebootstrap library was created to help resolve load-time dependencies. Key Takeaways Use PyCharm as FMEObjects Python IDE
  • 41. Tips: Python Packages and Modules Confirm… 1. Modules are imported in their script(s) 2. 3rd-party packages are installed in the right python version directory i.e., python311 in C:Users<user>DocumentsFMEPluginsPythonpython311 | ~/.fme/Plugins/Python/python<version> | ~/Library/Application Support/FME/Plugins/Python/python<version> 3. Python Exception <ModuleNotFoundError> No module named ‘x’ may be caused by the system path variable, python interpreter, or multiple python versions conflicting (Ref: No Module Named ArcPy: Importing Esri's ArcPy for Use with FME) Installing Python Packages to FME Form, Importing Custom Python Modules to FME Flow
  • 42. Tips: Python Troubleshooting 1. Check version compatibility 2. Check Python Interpreter for Python versioning 3. Ensure system path variables are correct 4. Workspaces authored on one machine may not work on another machine if they depend on custom Python libraries Python Troubleshooting
  • 43. Tips: Common HTTPS/SSL Issues FME’s Python Interpreter may use the System Truststore or Certifi’s collection of Root Certificates. If using self-signed or private CA (Certificate Authority) certificates ● they need to be manually added to cacert.pem or the system truststore. ● Watch out for certificate expiry. If you are experiencing SSL issues only then should you attempt importing certificates. FME Flow Troubleshooting: Configuring for HTTPS/SSL
  • 44. Tips: Going from Form to Flow 1. Python Exception <ModuleNotFoundError> No module named ‘example’ is sometimes caused by the extraction process not completing successfully in Resources > Engine (Ref: FME Server and Packages: Python Exception <ModuleNotFoundError>) 2. When a job is submitted on FME Flow via the FMEFlowJobSubmitter with "Submit Jobs" = In Sequence and "Wait for Jobs to Complete" = Yes, the job gets stuck in the queued state. (Ref: Known Issue: Python mismatch causes sequenced child workspaces to stay in queue forever) Using Python with FME Flow, Importing Custom Python Modules to FME Flow
  • 46. Summary ● Python is great to add logic that’s not available (make sure there is logic) ● Additional functionality to workspaces (e.g., Startup scripts) ● Install packages not shipped with FME via download or pip ● Run scripts outside FME with an IDE or other program of your choice Python Articles
  • 47. 29+ 27K+ 128 190 20K+ years of solving data challenges FME Community members countries with FME customers organizations worldwide global partners with FME services 30+ 29K+ 128 140+ 25K+ years of solving data challenges FME Community members countries with FME customers organizations worldwide global partners with FME services 200K+ users worldwide Safe & FME
  • 49. ● Python and FME Basics ● Python Troubleshooting ● AI Assist in FME FAQ Python Resources
  • 50. Get our Ebook Spatial Data for the Enterprise fme.ly/gzc Guided learning experiences at your fingertips academy.safe.com FME Academy Resources Check out how-to’s & demos in the knowledge base support.safe.com Knowledge Base Webinars Upcoming & on-demand webinars safe.com/webinars
  • 51. Check out our podcasts on-demand. featuring special guest speakers over at EM360 Resources
  • 53. We’d love to help you get started. Get in touch with us at info@safe.com Experience the FME Accelerator Contact Us A world where data is not just a commodity but a catalyst for real change. fme.safe.com/accelerator Next Steps
  • 54. ClaimYour Community Badge & Dive into the new Community! ● Get community badges for watching webinars ● community.safe.com ● Today’s code: AEE3R5 Join the Community today! Next Steps
  • 55. 7 Q&A
  • 56. ThankYou Recap of Next Steps 1 Follow us on LinkedIn! 2 Contact us 3 Experience the FME Accelerator Please fill out our webinar survey
  翻译: