Feature Request: Add expression to indicated whether pipeline is in validation mode

When writing expression it would be useful to know, in some cases, whether or not the context is in validation mode or not.

A specific example is when paging in a REST Get Snap: when in validation mode you will get errors about “slot allocation” when the paging exceeds 50 items.

You can put a guard in the “Has next” expression to cut off the paging if the item count is going to exceed 50, but then you have to figure out a way to prevent that guard from interfering when executing the pipeline.

So a simple expression language query would allow you to write something like:
(isValidating() ? (parseInt($.Response['@EndNum']) < 50 : true) && someMethodOfDeterminingHasNext()

OR perhaps there is a better way of accomplishing the same.

Thanks,
TK

1 Like

+1 for the Feature Request. I’ve run into multiple cases where this would be very helpful.

@tk42, Until the feature is added, one potential solution might be to include a pipeline parameter called isValidating that you could set as true in design time but set as false in the task scheduler.

You can test for validation mode using the following variable:

pipe.flags.is_suggest
2 Likes

Thanks @tstack for bringing that option up. pipe.flags does not appear to be documented specifically in the SnapLogic documentation (although it is documented by vague reference when I search the documentation), So I wasn’t aware of it’s availability nor usage. I’ve passed this along to my team with thumbs-up responses by the team.

This looks a like a good option. I am a little concerned about it’s “undocumented” status, Perhaps that could be wrapped in a function so that we might be insulated from that flag being deprecated in the future.

Thanks much for the information @tstack

-TK