Wed Aug 15, 2018 4:30 pm
Login Register Lost Password? Contact Us

SORT required for ITERATE?

Topics specific to using ECL from a Data Analyst standpoint

Tue Nov 17, 2015 10:27 pm Change Time Zone

I was reviewing the code of a co-worker who is a stat modeler not familiar with ECL. He was doing a GROUP and then an ITERATE. I was concerned because there was no SORT within his grouping and he was trying to determine the change in a value between consecutive records. But strangely the ECL Language Reference doesn't mention sorting with regards to ITERATE at all and the examples don't use SORT either. Am I missing something? Shouldn't ITERATE be as dependent on sort order as a function like DEDUP (where the documentation does mention SORT)?

Thanks for any feedback.
Posts: 29
Joined: Wed Jul 17, 2013 5:31 pm

Wed Nov 18, 2015 3:07 pm Change Time Zone

Hi Janet,

SORT is not required for ITERATE, but in some cases, yes, it can help. There may be some uses of ITERATE (like sequencing records) where a SORT is definitely not needed. The success of the ITERATE depends on how it is used, and it is not always required to SORT.

Using a DEDUP, a sorted recordset based on the DEDUP condition is definitely required.

But yes, if ITERATE was to be used on a GROUPed dataset, the GROUP of course should be SORTed.


Community Advisory Board Member
Community Advisory Board Member
Posts: 975
Joined: Wed Jun 29, 2011 7:13 pm

Return to ECL for Analysts

Who is online

Users browsing this forum: No registered users and 1 guest