The error “{{# each data}} not found in the template.” is encountered when creating file for FTP transfer.

Solution:
It’s the validation to have an each loop specifically for the batch_of_records. To solve the issue, Update the handlebar as below. Also set page size to 1 in Export step and skip aggregation set to true in File transfer.
<?xml version="1.0" encoding="UTF-8"?>
{{#each batch_of_records}}
{{this.rows.0.id}}
{{#each this.rows}}
{{this.line}}
{{/each}}
{{/each}}