Sample tokenize Function - Aster Execution Engine

Teradata Aster® Developer Guide

Product
Aster Execution Engine
Release Number
7.00.02
Published
July 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
xnl1494366523182.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
ffu1489104705746
lifecycle
previous
Product Category
Software
public void operateOnSomeRows(
                                       RowIterator inputIterator,
                                       RowEmitter outputEmitter
                                       )
{
    while ( inputIterator.advanceToNextRow() )
        {
            String[] parts = splitPattern_.split( inputIterator.getStringAt(0) );
            for (String part : parts)
                {
                    outputEmitter.addString(part);
                    outputEmitter.addInt(1);
                    outputEmitter.emitRow();
                }
        }
}

See the examples/ directory in the SQL-MapReduce SDK for sample SQL-MapReduce functions, as well as a Makefile to build and package them. For reference information on the SQL-MapReduce API, see the Javadoc reference in the SDK bundle.