Class: AWSCDK::QuickSight::CfnDataSet::CastColumnTypeOperationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
quick_sight/cfn_data_set.rb

Overview

A transform operation that casts a column to a different type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(column_name:, new_column_type:, format: nil, sub_type: nil) ⇒ CastColumnTypeOperationProperty

Returns a new instance of CastColumnTypeOperationProperty.

Parameters:

  • column_name (String)

    Column name.

  • new_column_type (String)

    New column data type.

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

    When casting a column from string to datetime type, you can supply a string in a format supported by Quick Sight to denote the source data format.

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

    The sub data type of the new column.



1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
# File 'quick_sight/cfn_data_set.rb', line 1150

def initialize(column_name:, new_column_type:, format: nil, sub_type: nil)
  @column_name = column_name
  Jsii::Type.check_type(@column_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "columnName")
  @new_column_type = new_column_type
  Jsii::Type.check_type(@new_column_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "newColumnType")
  @format = format
  Jsii::Type.check_type(@format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "format") unless @format.nil?
  @sub_type = sub_type
  Jsii::Type.check_type(@sub_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subType") unless @sub_type.nil?
end

Instance Attribute Details

#column_nameString (readonly)

Column name.



1165
1166
1167
# File 'quick_sight/cfn_data_set.rb', line 1165

def column_name
  @column_name
end

#formatString? (readonly)

When casting a column from string to datetime type, you can supply a string in a format supported by Quick Sight to denote the source data format.



1175
1176
1177
# File 'quick_sight/cfn_data_set.rb', line 1175

def format
  @format
end

#new_column_typeString (readonly)

New column data type.



1170
1171
1172
# File 'quick_sight/cfn_data_set.rb', line 1170

def new_column_type
  @new_column_type
end

#sub_typeString? (readonly)

The sub data type of the new column.

Sub types are only available for decimal columns that are part of a SPICE dataset.



1182
1183
1184
# File 'quick_sight/cfn_data_set.rb', line 1182

def sub_type
  @sub_type
end

Class Method Details

.jsii_propertiesObject



1184
1185
1186
1187
1188
1189
1190
1191
# File 'quick_sight/cfn_data_set.rb', line 1184

def self.jsii_properties
  {
    :column_name => "columnName",
    :new_column_type => "newColumnType",
    :format => "format",
    :sub_type => "subType",
  }
end

Instance Method Details

#to_jsiiObject



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
# File 'quick_sight/cfn_data_set.rb', line 1193

def to_jsii
  result = {}
  result.merge!({
    "columnName" => @column_name,
    "newColumnType" => @new_column_type,
    "format" => @format,
    "subType" => @sub_type,
  })
  result.compact
end