Package com.airhacks.enhydrator.in

Examples of com.airhacks.enhydrator.in.Row


        }

    }

    void transformRow(Row convertedRow) {
        Row entryColumns = applyRowTransformations(this.beforeTransformations, convertedRow);
        applyNamedFunctions(entryColumns);
        this.flowListener.accept("Named functions processed");
        applyExpressions(convertedRow);
        this.flowListener.accept("Expressions processed");
        Row afterProcessed = applyRowTransformations(this.afterTransformations, entryColumns);
        if (afterProcessed == null) {
            return;
        }
        this.flowListener.accept("After process RowTransformer executed. " + afterProcessed.getNumberOfColumns() + " entries");
        this.sink(afterProcessed);
        this.flowListener.accept("Result processed by sinks");
    }
View Full Code Here


        String destination = sink.getName();
        if (destination == null) {
            this.flowListener.accept(sink + " has a null destination, skipping");
            return;
        }
        Row entriesForSink = groupByDestinations.get(destination);
        if (entriesForSink != null) {
            this.flowListener.accept("Processing entries " + entriesForSink + " with " + destination);
            sink.processRow(entriesForSink);
            this.flowListener.accept("Entries processed!");
        } else {
View Full Code Here

    static Row applyRowTransformations(List<Function<Row, Row>> trafos, Row convertedColumns) {
        if (trafos == null || trafos.isEmpty()) {
            return convertedColumns;
        }
        final Function<Row, Row> composition = trafos.stream().reduce((i, j) -> i.compose(j)).get();
        Row result = composition.apply(convertedColumns);
        if (result == null) {
            return null;
        } else {
            return result;
        }
View Full Code Here

        }
        row.successfullyProcessed();
    }

    void transformRow(Row convertedRow) {
        Row entryColumns = applyRowTransformations(this.beforeTransformations, convertedRow);
        applyNamedFunctions(entryColumns);
        this.flowListener.accept("Named functions processed");
        applyExpressions(convertedRow);
        this.flowListener.accept("Expressions processed");
        Row afterProcessed = applyRowTransformations(this.afterTransformations, entryColumns);
        if (afterProcessed == null) {
            return;
        }
        this.flowListener.accept("After process RowTransformer executed. " + afterProcessed.getNumberOfColumns() + " entries");
        this.sink(afterProcessed);
        this.flowListener.accept("Result processed by sinks");
    }
View Full Code Here

        String destination = sink.getName();
        if (destination == null) {
            this.flowListener.accept(sink + " has a null destination, skipping");
            return;
        }
        Row entriesForSink = groupByDestinations.get(destination);
        if (entriesForSink != null) {
            this.flowListener.accept("Processing entries " + entriesForSink + " with " + destination);
            sink.processRow(entriesForSink);
            this.flowListener.accept("Entries processed!");
        } else {
View Full Code Here

    static Row applyRowTransformations(List<Function<Row, Row>> trafos, Row convertedColumns) {
        if (trafos == null || trafos.isEmpty()) {
            return convertedColumns;
        }
        final Function<Row, Row> composition = trafos.stream().reduce((i, j) -> i.andThen(j)).get();
        Row result = composition.apply(convertedColumns);
        if (result == null) {
            return null;
        } else {
            return result;
        }
View Full Code Here

    }

    public Row execute(Row input, String expression) {
        Bindings bindings = this.engine.createBindings();
        bindings.put("$ROW", input);
        bindings.put("$EMPTY", new Row(input.getIndex()));
        try {
            this.expressionListener.accept("Executing: " + expression);
            Object result = this.engine.eval(expression, bindings);
            this.expressionListener.accept("Got result: " + result);
            if (!(result instanceof Row)) {
View Full Code Here

        }
        row.successfullyProcessed();
    }

    void transformRow(Row convertedRow) {
        Row entryColumns = applyRowTransformations(this.beforeTransformations, convertedRow);
        applyNamedFunctions(entryColumns);
        this.flowListener.accept("Named functions processed");
        applyExpressions(convertedRow);
        this.flowListener.accept("Expressions processed");
        Row afterProcessed = applyRowTransformations(this.afterTransformations, entryColumns);
        if (afterProcessed == null) {
            return;
        }
        this.flowListener.accept("After process RowTransformer executed. " + afterProcessed.getNumberOfColumns() + " entries");
        this.sink(afterProcessed);
        this.flowListener.accept("Result processed by sinks");
    }
View Full Code Here

        String destination = sink.getName();
        if (destination == null) {
            this.flowListener.accept(sink + " has a null destination, skipping");
            return;
        }
        Row entriesForSink = groupByDestinations.get(destination);
        if (entriesForSink != null) {
            this.flowListener.accept("Processing entries " + entriesForSink + " with " + destination);
            sink.processRow(entriesForSink);
            this.flowListener.accept("Entries processed!");
        } else {
View Full Code Here

    static Row applyRowTransformations(List<Function<Row, Row>> trafos, Row convertedColumns) {
        if (trafos == null || trafos.isEmpty()) {
            return convertedColumns;
        }
        final Function<Row, Row> composition = trafos.stream().reduce((i, j) -> i.andThen(j)).get();
        Row result = composition.apply(convertedColumns);
        if (result == null) {
            return null;
        } else {
            return result;
        }
View Full Code Here

TOP

Related Classes of com.airhacks.enhydrator.in.Row

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.