What would you use to place a Python list into a feature attribute using the PythonCaller?

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

What would you use to place a Python list into a feature attribute using the PythonCaller?

Explanation:
Use the FMEFeature.setAttribute method to assign a value to a feature attribute. In a PythonCaller, you work with the current feature object (an FMEFeature). To store a Python list on an attribute, call feature.setAttribute('attributeName', myList). This writes the value into the feature, making the list accessible as that attribute downstream. The getAttribute method reads an attribute, not writes. The other two options are unrelated utilities.

Use the FMEFeature.setAttribute method to assign a value to a feature attribute. In a PythonCaller, you work with the current feature object (an FMEFeature). To store a Python list on an attribute, call feature.setAttribute('attributeName', myList). This writes the value into the feature, making the list accessible as that attribute downstream. The getAttribute method reads an attribute, not writes. The other two options are unrelated utilities.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy