Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


rHpcc (version 1.0)

ECLIterate-class: Class "ECLIterate"

Description

Creates an ECL "ITERATE" definition. The ITERATE function processes through all records in the recordset one pair of records at a time, performing the transform function on each pair in turn.

Arguments

Fields

name:
Object of class character Class name.
inDataset:
Object of class ECLDataset Input record name.
outECLRecord:
Object of class ECLRecord Output record name.
def:
Object of class character ECl definition/code

Methods

print():
Prints the ECL code.
addField(id, value):
Used to add ECL definitions.
getName():
Returns class name.

Examples

Run this code
  ## Not run: 
#     ecl1 <- ECL$new(hostName="192.168.217.128", port="8008")
#     resType <- ECLRecord$new(name="rec_resType")
#     resType$addField("INTEGER1", "Val")
#     resType$addField("INTEGER1", "Rtot")
#     ecl1$add(resType)
#     
#     dsRecords <- ECLDataset$new(name="ds_records", datasetType = resType, 
#                     logicalFileName ="~ds::iterate", fileType="CSV")
#     ecl1$add(dsRecords)
#     
#     iterate <- ECLIterate$new(name="ECLIterate", inDataset=dsRecords, 
#                   outECLRecord=resType);
#     iterate$addField("SELF.Rtot", "LEFT.Rtot+RIGHT.Val");
#     iterate$addField("SELF", "RIGHT");
#     ecl1$add(iterate)
#     
#     outputIterate <- ECLOutput$new(name="outputIterate", def = iterate$getName())
#     ecl1$add(outputIterate)
#     ecl1$print()
#     
#     xmlContent <- ecl1$execute()
#     parseResults(xmlContent)
#   ## End(Not run)

Run the code above in your browser using DataLab