LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Sort - Ascending order

    Employee
    Posted 05-08-2014 10:13

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: sree

    Hi,
    In source one of the column values are like this.


    Reference_ID
    10031194
    10265526
    10038348
    10103088
    10209402
    10023632
    10189654
    10016359
    10093870
    10188861
    10032704
    10122278
    10138799
    10201863
    10088383
    10034972
    10027798
    10191199
    10001401
    10080884

    But in target it should be like this

    Worker_Reference_ID
    10016359
    10023632
    10027798
    10031194
    10032704
    10034972
    10038348
    10080884
    10088383
    10093870
    10103088
    10122278
    10138799
    10188861
    10189654
    10191199
    10201863
    10209402
    10265526

    Need to load the data into target in ascending order(smallest value to lowest value).please suggest me how can i do this.

    Thnaks in advance,
    Regards,
    Sree.


  • 2.  RE: Sort - Ascending order

    Employee
    Posted 05-08-2014 12:28

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    You can use the sort node to sort your data. The field name that you want to sort your data by should go in the "CompareOrderExpr" parameter. By default data is sorted in ascending order by the key you provided in CompareOrderExpr. If your data needs to be sorted in descending order you should use the reverse() function.

    Example

    CompareOrderExpr

    fileldname

    OR

    fieldname.reverse()

    Your sort key can also be multiple field names.

    Example

    field1, field2, field3.reverse()


  • 3.  RE: Sort - Ascending order

    Employee
    Posted 05-08-2014 12:43

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rnukovic

    This is described in the Node Help for the Sort node. It's generally a good idea to check the help pages first before asking the user community.