Plugin

ApplyRules

It is not a whether to use business rules or machine learning. PredictiveWorks. externalizes a Drools rule engine as a plugin component for CDAP data pipelines.

@Plugin(type = SparkCompute.PLUGIN_TYPE)
@Name("ApplyRules")
@Description("A transformation stage that leverages a Drools compliant business rule engine "
  + "to apply business rules to pipeline data records.")
public class ApplyRules extends SparkCompute<StructuredRecord, StructuredRecord> {

    ...

}

Parameters

Drools Ruleset Please provide Drools compliant specification of business rules to filter or score the data records that have been published by your previous data stage.
Ruleset Type This component supports business rules to either filter or score data records. The default rule type is 'filter'. If you select 'score' as an alternative use case, this component and extra field to the output records.

The benefit of this approach is that rule execution and machine learning (or any other plugin) can co-exist in the same data pipeline to process historical datasets and real-time events of a data stream.

Integration