Learn R Programming

rHpcc (version 1.0)

ECLJoin-class: Class "ECLJoin"

Description

Creates an ECL "JOIN" definition. A inner join if omitted, else one of the listed types in the JOIN Types JOIN Types: INNER,LEFT OUTER,RIGHT OUTER,FULL OUTER,LEFT ONLY,RIGHT ONLY,FULL ONLY

Arguments

Extends

Class "ECLDataset", directly.

Fields

name:
Object of class character Class name.
datasetType:
Object of class ECLRecord Input record name.
logicalFileName:
Object of class character A string constant containing the logical file name.
fileType:
Object of class character One of the following keywords, optionally followed by relevant options for that specific type of file: THOR/FLAT, CSV, XML, PIPE.
def:
Object of class character ECl definition/code.
leftRecordSet:
Object of class ECLDataset The left set of records to process
rightRecordSet:
Object of class ECLDataset The right set of records to process
joinCondition:
Object of class character An expression specifying how to match records in the leftrecset and rightrecset
joinType:
Object of class character Optional. An inner join if omitted, else one of the listed types in the JOIN Types section below

Methods

setName(value):
Define class name.
getName():
Returns class name.
print():
Prints the ECL code.
The following methods are inherited (from the corresponding class): print ("ECLDataset"), getName ("ECLDataset"), getDatasetType ("ECLDataset"), addExpression ("ECLDataset")

Examples

Run this code
  ## Not run: 
#     transfrm <- ECLTransform$new(name="transfrm", outECLRecord=rec_revenueDef);
#     transfrm$addField("SELF.orderNumber", "RIGHT.orderNumber");
#     transfrm$addField("SELF.prodCode", "LEFT.productCode");
#     transfrm$addField("SELF.prodName", "LEFT.productName");
#     transfrm$addField("SELF.revenue", "RIGHT.priceEach * RIGHT.quantityOrdered");
#     
#     joinCondition <- "LEFT.productCode=RIGHT.productCode"
#     ds_revenue <- ECLJoin$new(name="ds_revenue", leftRecordSet= ds_products, 
#                       rightRecordSet=ds_orderDetails, joinCondition = joinCondition, 
#                       joinType = "INNER", def=transfrm$print());
#     ecl1$add(ds_revenue)
#     output <- ECLOutput$new(name="output", def = ds_revenue$getName())
#     ecl$add(output)
#     ecl$print()
#     xmlContent <- ecl$execute()
#     data <- parseResults(xmlContent)
#   ## End(Not run)

Run the code above in your browser using DataLab