If an API call returns a binary payload stored in the _response_body attribute, which transformer can you use to save that file locally?

Prepare for the FME Certified Professional Test with our comprehensive quiz, featuring flashcards and multiple-choice questions complete with hints and explanations. Ensure you're fully ready to ace your exam!

Multiple Choice

If an API call returns a binary payload stored in the _response_body attribute, which transformer can you use to save that file locally?

Explanation:
When you have a binary payload in an attribute and you want to persist it to disk, you use a transformer that writes the contents of an attribute to a file. AttributeFileWriter does this: it takes the binary data from an attribute (like _response_body) and writes it to a file path you specify (via another attribute or a constant). This is the direct way to save the actual bytes as a local file. The other options don’t fit the requirement as cleanly. AttributeFileReader reads a file’s contents into an attribute rather than writing data out to disk. BinaryDecoder and BinaryEncoder transform how the data is encoded or decoded in memory, but they don’t perform the act of saving a file to disk themselves.

When you have a binary payload in an attribute and you want to persist it to disk, you use a transformer that writes the contents of an attribute to a file. AttributeFileWriter does this: it takes the binary data from an attribute (like _response_body) and writes it to a file path you specify (via another attribute or a constant). This is the direct way to save the actual bytes as a local file.

The other options don’t fit the requirement as cleanly. AttributeFileReader reads a file’s contents into an attribute rather than writing data out to disk. BinaryDecoder and BinaryEncoder transform how the data is encoded or decoded in memory, but they don’t perform the act of saving a file to disk themselves.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy