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 Exam. Study with flashcards and multiple-choice questions; each question includes hints and explanations. Ensure your success!

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 Passetra

You can unsubscribe at any time. Read our privacy policy