Description Extends Fields Methods Examples
Creates an ECL "TABLE" definition. The TABLE function is similar to OUTPUT, but instead of writing records to a file, it outputs those records in a new table (a new dataset in the supercomputer), in memory. The new table is temporary and exists only while the specific query that invoked it is running.
Class "ECLDataset"
, directly.
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.
inDataset
:Object of class ECLDataset
The set of records to process. This may be the name of a dataset or a record set derived from some filter condition, or any expression that results in a derived record set.
format
:Object of class ECLRecord
An output RECORD structure definition that defines the type, name, and source of the data for each field
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")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
ecl1 <- ECL$new(hostName="127.0.0.1")
recPerson <- ECLRecord$new(name="rec_person")
recPerson$addField("STRING", "code")
recPerson$addField("STRING", "firstName")
recPerson$addField("STRING", "lastName")
recPerson$addField("STRING", "address")
recPerson$addField("STRING", "stateCode")
recPerson$addField("STRING", "city")
recPerson$addField("STRING", "zip")
ecl1$add(recPerson)
dsPerson <- ECLDataset$new(name="ds_person", datasetType = recPerson,
logicalFileName ="~ds::person", fileType="CSV")
ecl1$add(dsPerson)
recPersonTable <- ECLRecord$new(name="personNewTableFormat")
recPersonTable$addField(dsPerson$getName(), "code", seperator=".")
recPersonTable$addField(dsPerson$getName(), "firstName", seperator=".")
recPersonTable$addField(dsPerson$getName(), "lastName", seperator=".")
ecl1$add(recPersonTable)
tblPerson <- ECLTable$new(name="PersonNewTable", inDataset = dsPerson, format= recPersonTable)
ecl1$add(tblPerson)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.