Scripted user parameter (Python)

580
2
09-02-2022 03:00 AM
TomGeo
by
Occasional Contributor III

I created an ETL tool, that works fine locally, but after publishing it to our portal my scripted user parameters do not work.

The reason for it:

INFORM: Python version 3.8 loaded successfully
ERROR : Python Exception <ModuleNotFoundError>: No module named 'arcpy'

 

My scripted user parameters are essentially in place to create and write the output of the tool into scratch workspaces. While I am working for several years now with FME, this is my first time creating and publishing an ETL tool. Hence, I am not so familiar with possible automatic path adjustments when publishing tools.

Question 1: So, could it be that I can simply keep the writers destination as an absolute (local) path and when publishing it to our portal the destination path will be pointed to a scratch location?

Question 2: How can it be that I publish something to an ArcGIS Enterprise Portal and that portal is not aware of a module called 'arcpy'?

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
0 Kudos
2 Replies
BruceHarold
Esri Regular Contributor

Hi Tom, to write to a scratch location on your server and make use of the data during translation use this approach:

https://community.esri.com/t5/arcgis-data-interoperability-blog/building-a-data-driven-organization-...

We have a development issue to adopt the job folder scratch environment in ETL tools but it isn't there yet, so please control this as above.

To fix your ArcPy issue log into the server as the arcgis service owner, start Workbench from the fmeworkbench.exe executable and set your FME Options>Translation>Prefered Python Interpreter to Esri ArcGIS Python <version> and in your ETL tools that you publish do the same and also always set the tool Scripting>Python Compatibility to Esri ArcGIS Python <version>.

0 Kudos
TomGeo
by
Occasional Contributor III

Hi @BruceHarold, thanks for the link, and yes that's the approach I am using before hand for the scripted parameters in this workbench.
Also thanks for the guide about my arcpy issue. I will check with our administrators to adjust the settings on the server side.

Do you, by any chance, have a suggestion on how to get a proper choice list in the ETL tool, once it is published to the portal? I I wrote, the 'aliases' are gone and the pure values are shown instead, rendering it impossible for the user to know what they actually selecting.

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
0 Kudos