Class: AWSCDK::DataBrew::CfnRecipe::ConditionExpressionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
data_brew/cfn_recipe.rb

Overview

Represents an individual condition that evaluates to true or false.

Conditions are used with recipe actions. The action is only performed for column values where the condition evaluates to true.

If a recipe requires more than one condition, then the recipe must specify multiple ConditionExpression elements. Each condition is applied to the rows in a dataset first, before the recipe action is performed.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition:, target_column:, value: nil) ⇒ ConditionExpressionProperty

Returns a new instance of ConditionExpressionProperty.

Parameters:

  • condition (String)

    A specific condition to apply to a recipe action.

  • target_column (String)

    A column to apply this condition to.

  • value (String, nil) (defaults to: nil)

    A value that the condition must evaluate to for the condition to succeed.



590
591
592
593
594
595
596
597
# File 'data_brew/cfn_recipe.rb', line 590

def initialize(condition:, target_column:, value: nil)
  @condition = condition
  Jsii::Type.check_type(@condition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "condition")
  @target_column = target_column
  Jsii::Type.check_type(@target_column, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetColumn")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless @value.nil?
end

Instance Attribute Details

#conditionString (readonly)

A specific condition to apply to a recipe action.

For more information, see Recipe structure in the AWS Glue DataBrew Developer Guide .



605
606
607
# File 'data_brew/cfn_recipe.rb', line 605

def condition
  @condition
end

#target_columnString (readonly)

A column to apply this condition to.



610
611
612
# File 'data_brew/cfn_recipe.rb', line 610

def target_column
  @target_column
end

#valueString? (readonly)

A value that the condition must evaluate to for the condition to succeed.



615
616
617
# File 'data_brew/cfn_recipe.rb', line 615

def value
  @value
end

Class Method Details

.jsii_propertiesObject



617
618
619
620
621
622
623
# File 'data_brew/cfn_recipe.rb', line 617

def self.jsii_properties
  {
    :condition => "condition",
    :target_column => "targetColumn",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



625
626
627
628
629
630
631
632
633
# File 'data_brew/cfn_recipe.rb', line 625

def to_jsii
  result = {}
  result.merge!({
    "condition" => @condition,
    "targetColumn" => @target_column,
    "value" => @value,
  })
  result.compact
end