@Categories(categories="transform") public class ColumnExpression extends Object implements Directive, Lineage
Row record that is
being passed. The result of expression either adds a new column or replaces the value of
the existing column.
Executor step = new ColumnExpression(lineno, directive, column, "if (age > 24 ) { 'adult' } else { 'teen' }");
| Constructor and Description |
|---|
ColumnExpression() |
| Modifier and Type | Method and Description |
|---|---|
UsageDefinition |
define() |
void |
destroy() |
List<Row> |
execute(List<Row> rows,
ExecutorContext context) |
void |
initialize(Arguments args) |
Mutation |
lineage() |
public static final String NAME
public UsageDefinition define()
public void initialize(Arguments args) throws DirectiveParseException
initialize in interface Executor<List<Row>,List<Row>>DirectiveParseExceptionpublic List<Row> execute(List<Row> rows, ExecutorContext context) throws DirectiveExecutionException
Copyright © 2020 CDAP Licensed under the Apache License, Version 2.0.