public abstract class Condition extends Object implements PipelineConfigurable
Modifier and Type | Field and Description |
---|---|
static String |
PLUGIN_TYPE |
Constructor and Description |
---|
Condition() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
apply(ConditionContext context)
Returns the result of execution of the condition.
|
void |
configurePipeline(PipelineConfigurer pipelineConfigurer)
Configure an ETL pipeline, registering datasets and plugins that the stage needs.
|
public static final String PLUGIN_TYPE
public abstract boolean apply(ConditionContext context) throws Exception
true
is returned, stages on the
true branch will get executed, otherwise staged on the false branch will get executed.context
- the context which is used for evaluating the conditionsException
- if any error occurred while evaluating the conditionpublic void configurePipeline(PipelineConfigurer pipelineConfigurer)
PipelineConfigurable
ValidationException
if there are any
invalid config properties, or if the input or output schema is not compatible. Output schema
should also be set. This method is called many times during the lifecycle of a pipeline so it
should not generate any side effects.
When the pipeline is being constructed, this is called in order to validate the pipeline and
propagate schema. Any datasets registered at this time will be ignored. Config properties that
contain macros will not have been evaluated yet.
When the pipeline is deployed, this is called in order to validate the pipeline and create any
datasets that are registered. Config properties that contain macros will not have been
evaluated yet.configurePipeline
in interface PipelineConfigurable
pipelineConfigurer
- the configurer used to register required datasets and pluginsCopyright © 2023 Cask Data, Inc. Licensed under the Apache License, Version 2.0.