I've created a flow that accepts a CSV via a form-data API POST and then processes each row in a batch job. Ideally, I do not want to hand-map each column before passing it to the batch executor, but I could not figure out how to just "pass through" the key/value pairs dynamically. I want to ensure that the CSV can have new columns and we'll pass them through without knowing about them beforehand... This is what I have:
%dw 1.0
%output application/java
---
payload map {
title: $.title,
description: $.description,
template_id: $.template_id,
pricing_flat_price: $.pricing_flat_price,
scheduled_start_date: $.scheduled_start_date,
resource_id: $.resource_id,
industry_id: $.industry_id,
owner_email: $.owner_email,
location_offsite: $.location_offsite
}
And this is what I'm going for (in non-sensical psuedocode):
%dw 1.0
%output application/java
---
payload map {
*:*
}
I have to imagine this is easily done, but I couldn't figure it out.
Thank you, Steve