Which method can you use in the PythonCaller to create an FME list from a Python list?

Prepare for the FME Certified Professional Exam. Study with flashcards and multiple-choice questions; each question includes hints and explanations. Ensure your success!

Multiple Choice

Which method can you use in the PythonCaller to create an FME list from a Python list?

Explanation:
In the PythonCaller, to create an FME List from a Python list you assign the Python list to an attribute using the setAttribute method on the FMEFeature. When you call feature.setAttribute('yourList', pythonList), FME converts the Python list into an FME List attribute, preserving the items. The other options don’t create lists: building an aggregate feature is about combining features, retrieving an attribute reads data, and the regex findlist is unrelated to FME list creation.

In the PythonCaller, to create an FME List from a Python list you assign the Python list to an attribute using the setAttribute method on the FMEFeature. When you call feature.setAttribute('yourList', pythonList), FME converts the Python list into an FME List attribute, preserving the items. The other options don’t create lists: building an aggregate feature is about combining features, retrieving an attribute reads data, and the regex findlist is unrelated to FME list creation.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy