Projection Interactions

Use the asProjection() serialization function to specify the projection of a field in a SAQL query.

Given this data from a source query:

1[
2    {expression: "first", alias: "foo"}
3    {expression: "second", alias: "bar"}
4]

You can bind the projection of a field in a target query.

1q = foreach q generate {{row(stepFoo.selection, [0], ["expression", "alias"]).asProjection()}};

After CRM Analytics evaluates the interaction, the projection becomes:

1q = foreach q generate first as 'foo';

To return all rows in the interaction, create this filter.

1q = foreach q generate {{row(stepFoo.selection, [], ["expression", "alias"]).asProjection()}};

After CRM Analytics evaluates the interaction, the filter becomes:

1q = foreach q generate first as 'foo', second as 'bar';