Search in sources :

Example 1 with SqlEngine

use of com.hortonworks.streamline.streams.runtime.rule.sql.SqlEngine in project streamline by hortonworks.

the class RuleProcessorRuntime method createSqlScript.

private Script createSqlScript(Rule rule) {
    SqlEngine sqlEngine = new SqlEngine();
    LOG.info("Built sqlEngine {}", sqlEngine);
    StormSqlExpression stormSqlExpression = createSqlExpression(rule);
    SqlScript sqlScript = new SqlScript(stormSqlExpression, sqlEngine);
    LOG.info("Built SqlScript {}", sqlScript);
    SqlScript.CorrelatedValuesToStreamlineEventConverter valuesConverter = new SqlScript.CorrelatedValuesToStreamlineEventConverter(sqlScript.getOutputFields());
    sqlScript.setValuesConverter(valuesConverter);
    LOG.info("valuesConverter {}", valuesConverter);
    return sqlScript;
}
Also used : SqlEngine(com.hortonworks.streamline.streams.runtime.rule.sql.SqlEngine) SqlScript(com.hortonworks.streamline.streams.runtime.rule.sql.SqlScript) StormSqlExpression(com.hortonworks.streamline.streams.runtime.rule.condition.expression.StormSqlExpression)

Aggregations

StormSqlExpression (com.hortonworks.streamline.streams.runtime.rule.condition.expression.StormSqlExpression)1 SqlEngine (com.hortonworks.streamline.streams.runtime.rule.sql.SqlEngine)1 SqlScript (com.hortonworks.streamline.streams.runtime.rule.sql.SqlScript)1