Class: AWSCDK::Timestream::CfnScheduledQuery::TimestreamConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Timestream::CfnScheduledQuery::TimestreamConfigurationProperty
- Defined in:
- timestream/cfn_scheduled_query.rb
Overview
Configuration to write data into Timestream database and table.
This configuration allows the user to map the query result select columns into the destination table columns.
Instance Attribute Summary collapse
-
#database_name ⇒ String
readonly
Name of Timestream database to which the query result will be written.
-
#dimension_mappings ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Timestream::CfnScheduledQuery::DimensionMappingProperty>
readonly
This is to allow mapping column(s) from the query result to the dimension in the destination table.
-
#measure_name_column ⇒ String?
readonly
Name of the measure column.
-
#mixed_measure_mappings ⇒ AWSCDK::IResolvable, ...
readonly
Specifies how to map measures to multi-measure records.
-
#multi_measure_mappings ⇒ AWSCDK::IResolvable, ...
readonly
Multi-measure mappings.
-
#table_name ⇒ String
readonly
Name of Timestream table that the query result will be written to.
-
#time_column ⇒ String
readonly
Column from query result that should be used as the time column in destination table.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(database_name:, dimension_mappings:, table_name:, time_column:, measure_name_column: nil, mixed_measure_mappings: nil, multi_measure_mappings: nil) ⇒ TimestreamConfigurationProperty
constructor
A new instance of TimestreamConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(database_name:, dimension_mappings:, table_name:, time_column:, measure_name_column: nil, mixed_measure_mappings: nil, multi_measure_mappings: nil) ⇒ TimestreamConfigurationProperty
Returns a new instance of TimestreamConfigurationProperty.
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 |
# File 'timestream/cfn_scheduled_query.rb', line 1166 def initialize(database_name:, dimension_mappings:, table_name:, time_column:, measure_name_column: nil, mixed_measure_mappings: nil, multi_measure_mappings: nil) @database_name = database_name Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName") @dimension_mappings = dimension_mappings Jsii::Type.check_type(@dimension_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfdGltZXN0cmVhbS5DZm5TY2hlZHVsZWRRdWVyeS5EaW1lbnNpb25NYXBwaW5nUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "dimensionMappings") @table_name = table_name Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName") @time_column = time_column Jsii::Type.check_type(@time_column, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timeColumn") @measure_name_column = measure_name_column Jsii::Type.check_type(@measure_name_column, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "measureNameColumn") unless @measure_name_column.nil? @mixed_measure_mappings = mixed_measure_mappings Jsii::Type.check_type(@mixed_measure_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfdGltZXN0cmVhbS5DZm5TY2hlZHVsZWRRdWVyeS5NaXhlZE1lYXN1cmVNYXBwaW5nUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "mixedMeasureMappings") unless @mixed_measure_mappings.nil? @multi_measure_mappings = multi_measure_mappings.is_a?(Hash) ? ::AWSCDK::Timestream::CfnScheduledQuery::MultiMeasureMappingsProperty.new(**multi_measure_mappings.transform_keys(&:to_sym)) : multi_measure_mappings Jsii::Type.check_type(@multi_measure_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c190aW1lc3RyZWFtLkNmblNjaGVkdWxlZFF1ZXJ5Lk11bHRpTWVhc3VyZU1hcHBpbmdzUHJvcGVydHkifV19fQ==")), "multiMeasureMappings") unless @multi_measure_mappings.nil? end |
Instance Attribute Details
#database_name ⇒ String (readonly)
Name of Timestream database to which the query result will be written.
1187 1188 1189 |
# File 'timestream/cfn_scheduled_query.rb', line 1187 def database_name @database_name end |
#dimension_mappings ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Timestream::CfnScheduledQuery::DimensionMappingProperty> (readonly)
This is to allow mapping column(s) from the query result to the dimension in the destination table.
1192 1193 1194 |
# File 'timestream/cfn_scheduled_query.rb', line 1192 def dimension_mappings @dimension_mappings end |
#measure_name_column ⇒ String? (readonly)
Name of the measure column.
Also see MultiMeasureMappings and MixedMeasureMappings for how measure name properties on those relate to MeasureNameColumn .
1213 1214 1215 |
# File 'timestream/cfn_scheduled_query.rb', line 1213 def measure_name_column @measure_name_column end |
#mixed_measure_mappings ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies how to map measures to multi-measure records.
1218 1219 1220 |
# File 'timestream/cfn_scheduled_query.rb', line 1218 def mixed_measure_mappings @mixed_measure_mappings end |
#multi_measure_mappings ⇒ AWSCDK::IResolvable, ... (readonly)
Multi-measure mappings.
1223 1224 1225 |
# File 'timestream/cfn_scheduled_query.rb', line 1223 def multi_measure_mappings @multi_measure_mappings end |
#table_name ⇒ String (readonly)
Name of Timestream table that the query result will be written to.
The table should be within the same database that is provided in Timestream configuration.
1199 1200 1201 |
# File 'timestream/cfn_scheduled_query.rb', line 1199 def table_name @table_name end |
#time_column ⇒ String (readonly)
Column from query result that should be used as the time column in destination table.
Column type for this should be TIMESTAMP.
1206 1207 1208 |
# File 'timestream/cfn_scheduled_query.rb', line 1206 def time_column @time_column end |
Class Method Details
.jsii_properties ⇒ Object
1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'timestream/cfn_scheduled_query.rb', line 1225 def self.jsii_properties { :database_name => "databaseName", :dimension_mappings => "dimensionMappings", :table_name => "tableName", :time_column => "timeColumn", :measure_name_column => "measureNameColumn", :mixed_measure_mappings => "mixedMeasureMappings", :multi_measure_mappings => "multiMeasureMappings", } end |
Instance Method Details
#to_jsii ⇒ Object
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'timestream/cfn_scheduled_query.rb', line 1237 def to_jsii result = {} result.merge!({ "databaseName" => @database_name, "dimensionMappings" => @dimension_mappings, "tableName" => @table_name, "timeColumn" => @time_column, "measureNameColumn" => @measure_name_column, "mixedMeasureMappings" => @mixed_measure_mappings, "multiMeasureMappings" => @multi_measure_mappings, }) result.compact end |