Use the asProjection() serialization function to specify the projection of a field in a SAQL query.
Given this data from a source query:
[
{expression: "first", alias: "foo"}
{expression: "second", alias: "bar"}
]
You can bind the projection of a field in a target query.
q = foreach q generate {{row(stepFoo.selection, [0], ["expression", "alias"]).asProjection()}};
After CRM Analytics evaluates the interaction, the projection becomes:
q = foreach q generate first as 'foo';
To return all rows in the interaction, create this filter.
q = foreach q generate {{row(stepFoo.selection, [], ["expression", "alias"]).asProjection()}};
After CRM Analytics evaluates the interaction, the filter becomes:
q = foreach q generate first as 'foo', second as 'bar';