Skip to main content
Question

Passing a list parameter to an FME workbench from the command line


Hello,

 

I am passing in a list of values to a user parameter (eg: LGA LGATYPE ABBNAME). The user parameter is assigned to a parameter of ChangeDetector (Selected Attributes).

 

2021-08-31 17_58_42-ChangeDetector Parameters 

If I open the FME workbench and run it, the ChangeDetector recognises the parameter value passed as a list of attributes. It then uses those attributes to check for any differences between 2 datasets. That is as expected.

 

However, if I run the tool from the command line and pass in the attribute list as a parameter, (eg: LGA LGATYPE ABBNAME), ChangeDetector does not recognise it as a list and does not find any attribute based changes.

 

If I reduce the command line parameter down to just one attribute (eg: LGA) then it works.

 

The parameter is a list parameter:

 

2021-08-31 18_09_21-User Parameters for 'Main' 

Any thoughts on what might be going wrong?

2 replies

david_r
Celebrity
  • August 31, 2021

Make sure you have double quotation marks around the list of values, e.g.

--MATCHATTRS "LGA LGATYPE ABBNAME"

 


  • Author
  • August 31, 2021

Thanks for the reply David.

 

Sorry, I should not have said 'command line'. I am calling this from a Python program and I am using ArcGIS Data Interoperability extension to access FME functionality.

 

The parameter is passed as a string. I am logging the parameter values using MessageLogger and if I use additional quotes then I can see those quotes as part of the parameter value, ie `_MATCHATTRS' has value `"LGA LGATYPE ABBNAME"' and it doesn't fix the ChangeDetector issue.

 

Looking at the parameter logs for both the FME workbench run and the Python run I cannot see any difference if values, which has me confused: `_MATCHATTRS' has value `LGA LGATYPE ABBNAME'. It kind of makes me feel like FME is not interpreting the parameter as a list but rather a single value, when passed through Python.


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