├── aws_athena_cost_and_usage.model.lkml ├── LICENSE ├── README.md ├── aws_cost_and_usage_overview.dashboard.lookml └── cost_and_usage.view.lkml /aws_athena_cost_and_usage.model.lkml: -------------------------------------------------------------------------------- 1 | connection: "aws_optimizer" 2 | 3 | # include all the views 4 | include: "*.view" 5 | 6 | # include all the dashboards 7 | include: "*.dashboard" 8 | 9 | 10 | explore: cost_and_usage {} 11 | persist_for: "24 hours" 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 Looker 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ### Major Cost Saving Levers 5 | 6 | This write-up will focus on: 7 | 8 | * Purchasing of Reserved vs On-Demand instances 9 | * Data Transfer costs 10 | * Allocating costs over Users or other Attributes (denoted with resource tags) 11 | 12 | 13 | #### On-Demand, Spot, and Reserved Instances 14 | 15 | Purchasing Reserved Instances vs On-Demand instances is arguably going to be the biggest cost lever for heavy AWS users (Reserved Instances run up to 75% cheaper!). AWS offers three options for purchasing instances, including On-Demand, Spot (variable cost), and Reserved Instances. On-Demand instances allows you to simply pay as you use, Spot instances allow you to bid on spare Amazon EC2 computing capacity, while Reserved Instances allows you to pay for an Instance for a specific, allotted period of time. When purchasing a Reserved Instance, you can also choose to pay all-upfront, partial-upfront, or monthly. The more you pay upfront, the greater the discount. 16 | 17 | If your company has been using AWS for some time now, you should have a good sense of your overall instance usage on a per-month or per-day basis. Rather than paying for these instances On-Demand, you should try to forecast the number of instances you’ll need, and reserve them with upfront payments. The total amount of usage with Reserved Instances versus overall usage with all instances is called your coverage ratio. It’s important not to confuse your coverage ratio with your Reserved Instance utilization. Utilization represents the amount of reserved hours that we’re actually used. Don’t worry about exceeding capacity, you can still set-up auto-scaling preferences so that more instances get added whenever your coverage or utilization crosses a certain threshold (we often see a target of 80% for both coverage and utilization among savvy customers). 18 | 19 | It’s an iterative process to understand the appropriate number of Reserved Instances to meet your business needs. Once you’ve properly integrated Reserved Instances into your purchasing patterns, the savings can be significant. If your coverage is consistently below 70%, you should seriously consider adjusting your purchase types and opt for more Reserved instances. 20 | 21 | 22 | #### Data Transfer Costs 23 | 24 | One of the great things about AWS data storage, is that it’s incredibly cheap. Most charges often come from moving and processing that data. There are several different prices for transferring data, broken out largely by transfers between regions and availability zones. Transfers between regions are the most costly, followed by transfers between Availability Zones. Transfers within the same region and same availability zone are free unless using elastic or public IP addresses, in which case there is a cost. You can find more detailed information in the AWS Pricing Docs. With this in mind, there are several simple strategies for helping reduce costs here. 25 | 26 | First, since costs increase when transferring data between regions, it’s wise to ensure that as many services as possible reside within the same region. The more you can localize services to one specific region, the lower your costs will be. Second, you should maximize the data you’re routing directly within AWS services and IPs. Transfers out to the open Internet are the most costly and least performant mechanisms of data transfers, so it’s best to keep transfers within AWS services. Lastly, data transferred between private IP addresses are cheaper than elastic or public IPs, so utilizing private IPs as much as possible is the most cost-effective strategy. 27 | 28 | 29 | 30 | #### Analysis by Tags 31 | 32 | AWS provides the option to apply custom tags to individual resources, so you can allocate costs over whatever customized segment makes the most sense for your business. For a SaaS company that hosts software for customers on AWS, maybe you’d want to tag the size of each customer. The below query uses custom tags to display the reserved, data transfer, and total cost for each AWS service, broken out by tag categories, over the last 30 days. You’ll want to substitute the text highlighted in red with the name of your customer field. 33 | 34 | 35 | Setup Instructions: 36 | https://aws.amazon.com/blogs/big-data/analyzing-aws-cost-and-usage-reports-with-looker-and-amazon-athena/ 37 | -------------------------------------------------------------------------------- /aws_cost_and_usage_overview.dashboard.lookml: -------------------------------------------------------------------------------- 1 | - dashboard: aws_cost_and_usage_overview 2 | title: AWS Cost and Usage Overview 3 | layout: newspaper 4 | elements: 5 | - name: Total Cost Latest Week 6 | title: Total Cost Latest Week 7 | model: aws_athena_cost_and_usage 8 | explore: cost_and_usage 9 | type: single_value 10 | fields: 11 | - cost_and_usage.total_blended_cost 12 | - cost_and_usage.usage_start_week 13 | fill_fields: 14 | - cost_and_usage.usage_start_week 15 | sorts: 16 | - cost_and_usage.usage_start_week desc 17 | limit: 500 18 | column_limit: 50 19 | dynamic_fields: 20 | - table_calculation: cost_last_week 21 | label: Cost Last Week 22 | expression: offset(${cost_and_usage.total_blended_cost},1) 23 | value_format: 24 | value_format_name: usd_0 25 | custom_color_enabled: false 26 | custom_color: forestgreen 27 | show_single_value_title: true 28 | show_comparison: true 29 | comparison_type: progress_percentage 30 | comparison_reverse_colors: false 31 | show_comparison_label: true 32 | stacking: '' 33 | show_value_labels: false 34 | label_density: 25 35 | legend_position: center 36 | x_axis_gridlines: false 37 | y_axis_gridlines: true 38 | show_view_names: true 39 | limit_displayed_rows: false 40 | y_axis_combined: true 41 | show_y_axis_labels: true 42 | show_y_axis_ticks: true 43 | y_axis_tick_density: default 44 | y_axis_tick_density_custom: 5 45 | show_x_axis_label: true 46 | show_x_axis_ticks: true 47 | x_axis_scale: auto 48 | y_axis_scale_mode: linear 49 | ordering: none 50 | show_null_labels: false 51 | show_totals_labels: false 52 | show_silhouette: false 53 | totals_color: "#808080" 54 | series_types: {} 55 | comparison_label: Percent of Cost Prior Week 56 | single_value_title: Total Cost Latest Week 57 | row: 6 58 | col: 0 59 | width: 8 60 | height: 4 61 | - name: Total Cost Latest Month 62 | title: Total Cost Latest Month 63 | model: aws_athena_cost_and_usage 64 | explore: cost_and_usage 65 | type: single_value 66 | fields: 67 | - cost_and_usage.total_blended_cost 68 | - cost_and_usage.usage_start_month 69 | fill_fields: 70 | - cost_and_usage.usage_start_month 71 | sorts: 72 | - cost_and_usage.usage_start_month desc 73 | limit: 500 74 | column_limit: 50 75 | dynamic_fields: 76 | - table_calculation: cost_last_week 77 | label: Cost Last Week 78 | expression: offset(${cost_and_usage.total_blended_cost},1) 79 | value_format: 80 | value_format_name: usd_0 81 | custom_color_enabled: false 82 | custom_color: forestgreen 83 | show_single_value_title: true 84 | show_comparison: true 85 | comparison_type: progress_percentage 86 | comparison_reverse_colors: false 87 | show_comparison_label: true 88 | stacking: '' 89 | show_value_labels: false 90 | label_density: 25 91 | legend_position: center 92 | x_axis_gridlines: false 93 | y_axis_gridlines: true 94 | show_view_names: true 95 | limit_displayed_rows: false 96 | y_axis_combined: true 97 | show_y_axis_labels: true 98 | show_y_axis_ticks: true 99 | y_axis_tick_density: default 100 | y_axis_tick_density_custom: 5 101 | show_x_axis_label: true 102 | show_x_axis_ticks: true 103 | x_axis_scale: auto 104 | y_axis_scale_mode: linear 105 | ordering: none 106 | show_null_labels: false 107 | show_totals_labels: false 108 | show_silhouette: false 109 | totals_color: "#808080" 110 | series_types: {} 111 | comparison_label: Percent of Cost Prior Month 112 | single_value_title: Total Cost Latest Month 113 | row: 6 114 | col: 8 115 | width: 8 116 | height: 4 117 | - name: Total Cost YTD 118 | title: Total Cost YTD 119 | model: aws_athena_cost_and_usage 120 | explore: cost_and_usage 121 | type: single_value 122 | fields: 123 | - cost_and_usage.total_blended_cost 124 | - cost_and_usage.usage_start_year 125 | fill_fields: 126 | - cost_and_usage.usage_start_year 127 | sorts: 128 | - cost_and_usage.usage_start_year desc 129 | limit: 500 130 | column_limit: 50 131 | dynamic_fields: 132 | - table_calculation: cost_last_year 133 | label: Cost Last Year 134 | expression: offset(${cost_and_usage.total_blended_cost},1) 135 | value_format: 136 | value_format_name: usd_0 137 | custom_color_enabled: false 138 | custom_color: forestgreen 139 | show_single_value_title: true 140 | show_comparison: true 141 | comparison_type: progress_percentage 142 | comparison_reverse_colors: false 143 | show_comparison_label: true 144 | stacking: '' 145 | show_value_labels: false 146 | label_density: 25 147 | legend_position: center 148 | x_axis_gridlines: false 149 | y_axis_gridlines: true 150 | show_view_names: true 151 | limit_displayed_rows: false 152 | y_axis_combined: true 153 | show_y_axis_labels: true 154 | show_y_axis_ticks: true 155 | y_axis_tick_density: default 156 | y_axis_tick_density_custom: 5 157 | show_x_axis_label: true 158 | show_x_axis_ticks: true 159 | x_axis_scale: auto 160 | y_axis_scale_mode: linear 161 | ordering: none 162 | show_null_labels: false 163 | show_totals_labels: false 164 | show_silhouette: false 165 | totals_color: "#808080" 166 | series_types: {} 167 | comparison_label: Percent of Cost Prior Year (Entire Year) 168 | single_value_title: Total Cost (Year to Date) 169 | row: 6 170 | col: 16 171 | width: 8 172 | height: 4 173 | - name: Reserved EC2 Cost Latest Month 174 | title: Reserved EC2 Cost Latest Month 175 | model: aws_athena_cost_and_usage 176 | explore: cost_and_usage 177 | type: single_value 178 | fields: 179 | - cost_and_usage.EC2_blended_cost 180 | - cost_and_usage.usage_start_month 181 | fill_fields: 182 | - cost_and_usage.usage_start_month 183 | filters: 184 | cost_and_usage.ri_line_item: RI Line Item 185 | sorts: 186 | - cost_and_usage.usage_start_month desc 187 | limit: 500 188 | column_limit: 50 189 | dynamic_fields: 190 | - table_calculation: cost_last_month 191 | label: Cost Last Month 192 | expression: offset(${cost_and_usage.EC2_blended_cost},1) 193 | value_format: 194 | value_format_name: usd_0 195 | query_timezone: America/Los_Angeles 196 | custom_color_enabled: false 197 | custom_color: forestgreen 198 | show_single_value_title: true 199 | show_comparison: true 200 | comparison_type: progress_percentage 201 | comparison_reverse_colors: false 202 | show_comparison_label: true 203 | stacking: '' 204 | show_value_labels: false 205 | label_density: 25 206 | legend_position: center 207 | x_axis_gridlines: false 208 | y_axis_gridlines: true 209 | show_view_names: true 210 | limit_displayed_rows: false 211 | y_axis_combined: true 212 | show_y_axis_labels: true 213 | show_y_axis_ticks: true 214 | y_axis_tick_density: default 215 | y_axis_tick_density_custom: 5 216 | show_x_axis_label: true 217 | show_x_axis_ticks: true 218 | x_axis_scale: auto 219 | y_axis_scale_mode: linear 220 | ordering: none 221 | show_null_labels: false 222 | show_totals_labels: false 223 | show_silhouette: false 224 | totals_color: "#808080" 225 | series_types: {} 226 | single_value_title: Reserved EC2 Cost Latest Month 227 | comparison_label: Percent of Cost Prior Month 228 | row: 2 229 | col: 0 230 | width: 8 231 | height: 4 232 | - name: Non Reserved EC2 Cost Latest Month 233 | title: Non Reserved EC2 Cost Latest Month 234 | model: aws_athena_cost_and_usage 235 | explore: cost_and_usage 236 | type: single_value 237 | fields: 238 | - cost_and_usage.EC2_blended_cost 239 | - cost_and_usage.usage_start_month 240 | fill_fields: 241 | - cost_and_usage.usage_start_month 242 | filters: 243 | cost_and_usage.ri_line_item: Non RI Line Item 244 | sorts: 245 | - cost_and_usage.usage_start_month desc 246 | limit: 500 247 | column_limit: 50 248 | dynamic_fields: 249 | - table_calculation: cost_last_month 250 | label: Cost Last Month 251 | expression: offset(${cost_and_usage.EC2_blended_cost},1) 252 | value_format: 253 | value_format_name: usd_0 254 | query_timezone: America/Los_Angeles 255 | custom_color_enabled: false 256 | custom_color: forestgreen 257 | show_single_value_title: true 258 | show_comparison: true 259 | comparison_type: progress_percentage 260 | comparison_reverse_colors: false 261 | show_comparison_label: true 262 | stacking: '' 263 | show_value_labels: false 264 | label_density: 25 265 | legend_position: center 266 | x_axis_gridlines: false 267 | y_axis_gridlines: true 268 | show_view_names: true 269 | limit_displayed_rows: false 270 | y_axis_combined: true 271 | show_y_axis_labels: true 272 | show_y_axis_ticks: true 273 | y_axis_tick_density: default 274 | y_axis_tick_density_custom: 5 275 | show_x_axis_label: true 276 | show_x_axis_ticks: true 277 | x_axis_scale: auto 278 | y_axis_scale_mode: linear 279 | ordering: none 280 | show_null_labels: false 281 | show_totals_labels: false 282 | show_silhouette: false 283 | totals_color: "#808080" 284 | series_types: {} 285 | single_value_title: Non Reserved EC2 Cost Latest Month 286 | comparison_label: Percent of Cost Prior Month 287 | row: 2 288 | col: 8 289 | width: 8 290 | height: 4 291 | - name: Total EC2 Cost This Month 292 | title: Total EC2 Cost This Month 293 | model: aws_athena_cost_and_usage 294 | explore: cost_and_usage 295 | type: single_value 296 | fields: 297 | - cost_and_usage.EC2_blended_cost 298 | - cost_and_usage.usage_start_month 299 | fill_fields: 300 | - cost_and_usage.usage_start_month 301 | sorts: 302 | - cost_and_usage.usage_start_month desc 303 | limit: 500 304 | column_limit: 50 305 | dynamic_fields: 306 | - table_calculation: cost_last_month 307 | label: Cost Last Month 308 | expression: offset(${cost_and_usage.EC2_blended_cost},1) 309 | value_format: 310 | value_format_name: usd_0 311 | query_timezone: America/Los_Angeles 312 | custom_color_enabled: false 313 | custom_color: forestgreen 314 | show_single_value_title: true 315 | show_comparison: true 316 | comparison_type: progress_percentage 317 | comparison_reverse_colors: false 318 | show_comparison_label: true 319 | stacking: '' 320 | show_value_labels: false 321 | label_density: 25 322 | legend_position: center 323 | x_axis_gridlines: false 324 | y_axis_gridlines: true 325 | show_view_names: true 326 | limit_displayed_rows: false 327 | y_axis_combined: true 328 | show_y_axis_labels: true 329 | show_y_axis_ticks: true 330 | y_axis_tick_density: default 331 | y_axis_tick_density_custom: 5 332 | show_x_axis_label: true 333 | show_x_axis_ticks: true 334 | x_axis_scale: auto 335 | y_axis_scale_mode: linear 336 | ordering: none 337 | show_null_labels: false 338 | show_totals_labels: false 339 | show_silhouette: false 340 | totals_color: "#808080" 341 | series_types: {} 342 | single_value_title: Total EC2 Cost Latest Month 343 | comparison_label: Percent of Cost Prior Month 344 | row: 2 345 | col: 16 346 | width: 8 347 | height: 4 348 | - name: Total Cost by Reservation Type 349 | title: Total Cost by Reservation Type 350 | model: aws_athena_cost_and_usage 351 | explore: cost_and_usage 352 | type: looker_column 353 | fields: 354 | - cost_and_usage.ri_line_item 355 | - cost_and_usage.total_blended_cost 356 | - cost_and_usage.usage_start_month 357 | pivots: 358 | - cost_and_usage.ri_line_item 359 | fill_fields: 360 | - cost_and_usage.usage_start_month 361 | sorts: 362 | - cost_and_usage.total_blended_cost desc 0 363 | - cost_and_usage.ri_line_item 364 | limit: 500 365 | column_limit: 50 366 | query_timezone: America/Los_Angeles 367 | stacking: normal 368 | show_value_labels: false 369 | label_density: 25 370 | legend_position: center 371 | x_axis_gridlines: false 372 | y_axis_gridlines: true 373 | show_view_names: true 374 | limit_displayed_rows: false 375 | y_axis_combined: true 376 | show_y_axis_labels: true 377 | show_y_axis_ticks: true 378 | y_axis_tick_density: default 379 | y_axis_tick_density_custom: 5 380 | show_x_axis_label: true 381 | show_x_axis_ticks: true 382 | x_axis_scale: auto 383 | y_axis_scale_mode: linear 384 | ordering: none 385 | show_null_labels: false 386 | show_totals_labels: false 387 | show_silhouette: false 388 | totals_color: "#808080" 389 | colors: 390 | - "#1D98D3" 391 | - "#3B4260" 392 | - "#39A736" 393 | - "#F3BF0E" 394 | - "#E57200" 395 | - "#5DCCCC" 396 | - "#7e64e0" 397 | - "#F663D6" 398 | - "#603535" 399 | - "#A5C740" 400 | - "#B54B4B" 401 | - "#B1B0B0" 402 | series_colors: 403 | Non RI Line Item - cost_and_usage.total_blended_cost: "#39A736" 404 | row: 16 405 | col: 0 406 | width: 12 407 | height: 8 408 | - name: Total Cost and RI Efficiency 409 | title: Total Cost and RI Efficiency 410 | model: aws_athena_cost_and_usage 411 | explore: cost_and_usage 412 | type: looker_column 413 | fields: 414 | - cost_and_usage.total_blended_cost 415 | - cost_and_usage.total_reserved_blended_cost 416 | - cost_and_usage.total_non_reserved_blended_cost 417 | - cost_and_usage.usage_start_month 418 | fill_fields: 419 | - cost_and_usage.usage_start_month 420 | sorts: 421 | - cost_and_usage.total_blended_cost desc 422 | limit: 500 423 | column_limit: 50 424 | dynamic_fields: 425 | - table_calculation: percent_of_spend_on_ris 426 | label: Percent of Spend on RI's 427 | expression: "${cost_and_usage.total_reserved_blended_cost}/${cost_and_usage.total_blended_cost}" 428 | value_format: 429 | value_format_name: percent_0 430 | - table_calculation: percent_of_spend_on_non_ris 431 | label: Percent of Spend on Non-RIs 432 | expression: "${cost_and_usage.total_non_reserved_blended_cost}/${total_blended_cost}" 433 | value_format: 434 | value_format_name: percent_0 435 | - table_calculation: total_blended_cost 436 | label: Total Blended Cost 437 | expression: "${cost_and_usage.total_blended_cost}" 438 | value_format: 439 | value_format_name: usd_0 440 | query_timezone: America/Los_Angeles 441 | stacking: '' 442 | show_value_labels: false 443 | label_density: 25 444 | legend_position: center 445 | x_axis_gridlines: false 446 | y_axis_gridlines: true 447 | show_view_names: true 448 | limit_displayed_rows: false 449 | y_axis_combined: true 450 | show_y_axis_labels: true 451 | show_y_axis_ticks: true 452 | y_axis_tick_density: default 453 | y_axis_tick_density_custom: 5 454 | show_x_axis_label: true 455 | show_x_axis_ticks: true 456 | x_axis_scale: auto 457 | y_axis_scale_mode: linear 458 | ordering: none 459 | show_null_labels: false 460 | show_totals_labels: false 461 | show_silhouette: false 462 | totals_color: "#808080" 463 | colors: 464 | - "#1D98D3" 465 | - "#3B4260" 466 | - "#39A736" 467 | - "#F3BF0E" 468 | - "#E57200" 469 | - "#5DCCCC" 470 | - "#7e64e0" 471 | - "#F663D6" 472 | - "#603535" 473 | - "#A5C740" 474 | - "#B54B4B" 475 | - "#B1B0B0" 476 | series_colors: 477 | Non RI Line Item - cost_and_usage.total_blended_cost: "#39A736" 478 | total_blended_cost: "#3B4260" 479 | percent_of_spend_on_ris: "#39A736" 480 | percent_of_spend_on_non_ris: "#B54B4B" 481 | column_spacing_ratio: 482 | hidden_fields: 483 | - cost_and_usage.total_blended_cost 484 | - cost_and_usage.total_reserved_blended_cost 485 | - cost_and_usage.total_non_reserved_blended_cost 486 | series_types: 487 | percent_of_spend_on_ris: line 488 | percent_of_spend_on_non_ris: line 489 | y_axes: 490 | - label: '' 491 | maxValue: 492 | minValue: 493 | orientation: left 494 | showLabels: true 495 | showValues: true 496 | tickDensity: default 497 | tickDensityCustom: 5 498 | type: linear 499 | unpinAxis: false 500 | valueFormat: 501 | series: 502 | - id: total_blended_cost 503 | name: Total Blended Cost 504 | - label: 505 | maxValue: 506 | minValue: 507 | orientation: right 508 | showLabels: true 509 | showValues: true 510 | tickDensity: default 511 | tickDensityCustom: 5 512 | type: linear 513 | unpinAxis: false 514 | valueFormat: 515 | series: 516 | - id: percent_of_spend_on_non_ris 517 | name: Percent of Spend on Non-RIs 518 | - id: percent_of_spend_on_ris 519 | name: Percent of Spend on RI's 520 | row: 16 521 | col: 12 522 | width: 12 523 | height: 8 524 | - name: Total EC2 Cost by Reservation Type 525 | title: Total EC2 Cost by Reservation Type 526 | model: aws_athena_cost_and_usage 527 | explore: cost_and_usage 528 | type: looker_column 529 | fields: 530 | - cost_and_usage.usage_start_month 531 | - cost_and_usage.EC2_blended_cost 532 | - cost_and_usage.ri_line_item 533 | pivots: 534 | - cost_and_usage.ri_line_item 535 | fill_fields: 536 | - cost_and_usage.usage_start_month 537 | sorts: 538 | - cost_and_usage.ri_line_item 539 | - cost_and_usage.usage_start_month desc 540 | limit: 500 541 | column_limit: 50 542 | query_timezone: America/Los_Angeles 543 | stacking: normal 544 | show_value_labels: false 545 | label_density: 25 546 | legend_position: center 547 | x_axis_gridlines: false 548 | y_axis_gridlines: true 549 | show_view_names: true 550 | limit_displayed_rows: false 551 | y_axis_combined: true 552 | show_y_axis_labels: true 553 | show_y_axis_ticks: true 554 | y_axis_tick_density: default 555 | y_axis_tick_density_custom: 5 556 | show_x_axis_label: true 557 | show_x_axis_ticks: true 558 | x_axis_scale: auto 559 | y_axis_scale_mode: linear 560 | ordering: none 561 | show_null_labels: false 562 | show_totals_labels: false 563 | show_silhouette: false 564 | totals_color: "#808080" 565 | colors: 566 | - "#1D98D3" 567 | - "#3B4260" 568 | - "#39A736" 569 | - "#F3BF0E" 570 | - "#E57200" 571 | - "#5DCCCC" 572 | - "#7e64e0" 573 | - "#F663D6" 574 | - "#603535" 575 | - "#A5C740" 576 | - "#B54B4B" 577 | - "#B1B0B0" 578 | series_colors: 579 | Non RI Line Item - cost_and_usage.total_blended_cost: "#39A736" 580 | Non RI Line Item - cost_and_usage.EC2_blended_cost: "#39A736" 581 | row: 24 582 | col: 0 583 | width: 12 584 | height: 8 585 | - name: EC2 Cost and RI Efficiency 586 | title: EC2 Cost and RI Efficiency 587 | model: aws_athena_cost_and_usage 588 | explore: cost_and_usage 589 | type: looker_column 590 | fields: 591 | - cost_and_usage.usage_start_month 592 | - cost_and_usage.EC2_blended_cost 593 | - cost_and_usage.EC2_reserved_blended_cost 594 | - cost_and_usage.EC2_non_reserved_blended_cost 595 | fill_fields: 596 | - cost_and_usage.usage_start_month 597 | sorts: 598 | - cost_and_usage.usage_start_month 599 | limit: 500 600 | column_limit: 50 601 | dynamic_fields: 602 | - table_calculation: percent_of_ec2_cost_reserved 603 | label: Percent of EC2 Cost - Reserved 604 | expression: "${cost_and_usage.EC2_reserved_blended_cost}/${cost_and_usage.EC2_blended_cost}" 605 | value_format: 606 | value_format_name: percent_0 607 | - table_calculation: percent_of_ec2_cost_non_reserved 608 | label: Percent of EC2 Cost - Non Reserved 609 | expression: "${cost_and_usage.EC2_non_reserved_blended_cost}/${cost_and_usage.EC2_blended_cost}" 610 | value_format: 611 | value_format_name: percent_0 612 | - table_calculation: total_ec2_blended_cost 613 | label: Total EC2 Blended Cost 614 | expression: "${cost_and_usage.EC2_blended_cost}" 615 | value_format: 616 | value_format_name: usd_0 617 | query_timezone: America/Los_Angeles 618 | stacking: '' 619 | show_value_labels: false 620 | label_density: 25 621 | legend_position: center 622 | x_axis_gridlines: false 623 | y_axis_gridlines: true 624 | show_view_names: true 625 | limit_displayed_rows: false 626 | y_axis_combined: true 627 | show_y_axis_labels: true 628 | show_y_axis_ticks: true 629 | y_axis_tick_density: default 630 | y_axis_tick_density_custom: 5 631 | show_x_axis_label: true 632 | show_x_axis_ticks: true 633 | x_axis_scale: auto 634 | y_axis_scale_mode: linear 635 | ordering: none 636 | show_null_labels: false 637 | show_totals_labels: false 638 | show_silhouette: false 639 | totals_color: "#808080" 640 | colors: 641 | - "#1D98D3" 642 | - "#3B4260" 643 | - "#39A736" 644 | - "#F3BF0E" 645 | - "#E57200" 646 | - "#5DCCCC" 647 | - "#7e64e0" 648 | - "#F663D6" 649 | - "#603535" 650 | - "#A5C740" 651 | - "#B54B4B" 652 | - "#B1B0B0" 653 | series_colors: 654 | Non RI Line Item - cost_and_usage.total_blended_cost: "#39A736" 655 | total_blended_cost: "#3B4260" 656 | percent_of_spend_on_ris: "#39A736" 657 | percent_of_spend_on_non_ris: "#B54B4B" 658 | total_ec2_blended_cost: "#3B4260" 659 | percent_of_ec2_cost_non_reserved: "#B54B4B" 660 | hidden_fields: 661 | - cost_and_usage.EC2_blended_cost 662 | - cost_and_usage.EC2_reserved_blended_cost 663 | - cost_and_usage.EC2_non_reserved_blended_cost 664 | series_types: 665 | percent_of_spend_on_ris: line 666 | percent_of_spend_on_non_ris: line 667 | percent_of_ec2_cost_reserved: line 668 | percent_of_ec2_cost_non_reserved: line 669 | y_axes: 670 | - label: '' 671 | maxValue: 672 | minValue: 673 | orientation: left 674 | showLabels: true 675 | showValues: true 676 | tickDensity: default 677 | tickDensityCustom: 678 | type: linear 679 | unpinAxis: false 680 | valueFormat: 681 | series: 682 | - id: total_ec2_blended_cost 683 | name: Total EC2 Blended Cost 684 | - label: 685 | maxValue: 686 | minValue: 687 | orientation: right 688 | showLabels: true 689 | showValues: true 690 | tickDensity: default 691 | tickDensityCustom: 692 | type: linear 693 | unpinAxis: false 694 | valueFormat: 695 | series: 696 | - id: percent_of_ec2_cost_non_reserved 697 | name: Percent of EC2 Cost - Non Reserved 698 | - id: percent_of_ec2_cost_reserved 699 | name: Percent of EC2 Cost - Reserved 700 | row: 24 701 | col: 12 702 | width: 12 703 | height: 8 704 | - name: Most Costly Services 705 | title: Most Costly Services 706 | model: aws_athena_cost_and_usage 707 | explore: cost_and_usage 708 | type: looker_bar 709 | fields: 710 | - cost_and_usage.product_code 711 | - cost_and_usage.average_blended_cost_per_month 712 | - cost_and_usage.total_blended_cost 713 | - cost_and_usage.total_reserved_blended_cost 714 | sorts: 715 | - cost_and_usage.total_blended_cost desc 716 | limit: 10 717 | column_limit: 50 718 | dynamic_fields: 719 | - table_calculation: reservation_efficiency 720 | label: Reservation Efficiency (%) 721 | expression: "${cost_and_usage.total_reserved_blended_cost}/${cost_and_usage.total_blended_cost}" 722 | value_format: 723 | value_format_name: percent_2 724 | - table_calculation: total_blended_cost 725 | label: Total Blended Cost 726 | expression: "${cost_and_usage.total_blended_cost}" 727 | value_format: 728 | value_format_name: usd_0 729 | query_timezone: America/Los_Angeles 730 | stacking: '' 731 | show_value_labels: false 732 | label_density: 25 733 | legend_position: center 734 | x_axis_gridlines: false 735 | y_axis_gridlines: true 736 | show_view_names: true 737 | limit_displayed_rows: false 738 | y_axis_combined: true 739 | show_y_axis_labels: true 740 | show_y_axis_ticks: true 741 | y_axis_tick_density: default 742 | y_axis_tick_density_custom: 5 743 | show_x_axis_label: true 744 | show_x_axis_ticks: true 745 | x_axis_scale: auto 746 | y_axis_scale_mode: linear 747 | ordering: none 748 | show_null_labels: false 749 | show_totals_labels: false 750 | show_silhouette: false 751 | totals_color: "#808080" 752 | show_null_points: true 753 | point_style: circle 754 | interpolation: linear 755 | series_types: 756 | cost_and_usage.average_blended_cost_per_month: line 757 | reservation_efficiency: line 758 | average_blended_cost_per_month: line 759 | series_colors: 760 | cost_and_usage.total_blended_cost: "#3B4260" 761 | total_blended_cost: "#1f3e5a" 762 | reservation_efficiency: "#1D98D3" 763 | y_axes: 764 | - label: 765 | maxValue: 766 | minValue: 767 | orientation: top 768 | showLabels: false 769 | showValues: false 770 | tickDensity: default 771 | tickDensityCustom: 772 | type: linear 773 | unpinAxis: false 774 | valueFormat: 775 | series: 776 | - id: reservation_efficiency 777 | name: Reservation Efficiency 778 | - label: '' 779 | maxValue: 780 | minValue: 781 | orientation: bottom 782 | showLabels: true 783 | showValues: true 784 | tickDensity: custom 785 | tickDensityCustom: 5 786 | type: linear 787 | unpinAxis: false 788 | valueFormat: 789 | series: 790 | - id: average_blended_cost_per_month 791 | name: Average Blended Cost per Month 792 | - id: total_blended_cost 793 | name: Total Blended Cost 794 | hidden_fields: 795 | - cost_and_usage.average_blended_cost_per_month 796 | - cost_and_usage.total_blended_cost 797 | - cost_and_usage.total_reserved_blended_cost 798 | row: 32 799 | col: 0 800 | width: 12 801 | height: 13 802 | - name: Cost by Product (Full Detail) 803 | title: Cost by Product (Full Detail) 804 | model: aws_athena_cost_and_usage 805 | explore: cost_and_usage 806 | type: table 807 | fields: 808 | - cost_and_usage.product_code 809 | - cost_and_usage.total_blended_cost 810 | - cost_and_usage.average_blended_cost_per_month 811 | - cost_and_usage.ri_line_item 812 | pivots: 813 | - cost_and_usage.ri_line_item 814 | sorts: 815 | - cost_and_usage.total_blended_cost desc 0 816 | - cost_and_usage.ri_line_item 817 | column_limit: 50 818 | query_timezone: America/Los_Angeles 819 | show_view_names: true 820 | show_row_numbers: true 821 | truncate_column_names: false 822 | hide_totals: false 823 | hide_row_totals: false 824 | table_theme: gray 825 | limit_displayed_rows: false 826 | enable_conditional_formatting: false 827 | conditional_formatting_ignored_fields: [] 828 | conditional_formatting_include_totals: false 829 | conditional_formatting_include_nulls: false 830 | show_value_labels: false 831 | font_size: 12 832 | stacking: '' 833 | label_density: 25 834 | legend_position: center 835 | x_axis_gridlines: false 836 | y_axis_gridlines: true 837 | y_axis_combined: true 838 | show_y_axis_labels: true 839 | show_y_axis_ticks: true 840 | y_axis_tick_density: default 841 | y_axis_tick_density_custom: 5 842 | show_x_axis_label: true 843 | show_x_axis_ticks: true 844 | x_axis_scale: auto 845 | y_axis_scale_mode: linear 846 | ordering: none 847 | show_null_labels: false 848 | show_totals_labels: false 849 | show_silhouette: false 850 | totals_color: "#808080" 851 | show_null_points: true 852 | point_style: circle 853 | interpolation: linear 854 | series_types: {} 855 | series_colors: 856 | cost_and_usage.total_blended_cost: "#3B4260" 857 | y_axes: 858 | - label: 859 | maxValue: 860 | minValue: 861 | orientation: top 862 | showLabels: true 863 | showValues: false 864 | tickDensity: default 865 | tickDensityCustom: 5 866 | type: linear 867 | unpinAxis: false 868 | valueFormat: 869 | series: 870 | - id: cost_and_usage.average_blended_cost_per_month 871 | name: Line Items (Individual Charges) Average Blended Cost per Month 872 | - label: '' 873 | maxValue: 874 | minValue: 875 | orientation: bottom 876 | showLabels: true 877 | showValues: true 878 | tickDensity: default 879 | tickDensityCustom: 5 880 | type: linear 881 | unpinAxis: false 882 | valueFormat: 883 | series: 884 | - id: cost_and_usage.total_blended_cost 885 | name: Line Items (Individual Charges) Total Blended Cost 886 | row: 32 887 | col: 12 888 | width: 12 889 | height: 13 890 | - name: Cost by Usage Type (Top 10) 891 | title: Cost by Usage Type (Top 10) 892 | model: aws_athena_cost_and_usage 893 | explore: cost_and_usage 894 | type: looker_bar 895 | fields: 896 | - cost_and_usage.lineitem_usagetype 897 | - cost_and_usage.average_blended_cost_per_month 898 | - cost_and_usage.total_blended_cost 899 | - cost_and_usage.total_reserved_blended_cost 900 | sorts: 901 | - cost_and_usage.total_blended_cost desc 902 | limit: 10 903 | column_limit: 50 904 | dynamic_fields: 905 | - table_calculation: reservation_efficiency 906 | label: Reservation Efficiency (%) 907 | expression: "${cost_and_usage.total_reserved_blended_cost}/${cost_and_usage.total_blended_cost}" 908 | value_format: 909 | value_format_name: percent_2 910 | - table_calculation: total_blended_cost 911 | label: Total Blended Cost 912 | expression: "${cost_and_usage.total_blended_cost}" 913 | value_format: 914 | value_format_name: usd_0 915 | query_timezone: America/Los_Angeles 916 | stacking: '' 917 | show_value_labels: false 918 | label_density: 25 919 | legend_position: center 920 | x_axis_gridlines: false 921 | y_axis_gridlines: true 922 | show_view_names: true 923 | limit_displayed_rows: false 924 | y_axis_combined: true 925 | show_y_axis_labels: true 926 | show_y_axis_ticks: true 927 | y_axis_tick_density: default 928 | y_axis_tick_density_custom: 5 929 | show_x_axis_label: true 930 | show_x_axis_ticks: true 931 | x_axis_scale: auto 932 | y_axis_scale_mode: linear 933 | ordering: none 934 | show_null_labels: false 935 | show_totals_labels: false 936 | show_silhouette: false 937 | totals_color: "#808080" 938 | show_null_points: true 939 | point_style: circle 940 | interpolation: linear 941 | series_types: 942 | cost_and_usage.average_blended_cost_per_month: line 943 | reservation_efficiency: line 944 | series_colors: 945 | cost_and_usage.total_blended_cost: "#3B4260" 946 | cost_and_usage.average_blended_cost_per_month: "#1D98D3" 947 | total_blended_cost: "#3B4260" 948 | reservation_efficiency: "#1D98D3" 949 | y_axes: 950 | - label: 951 | maxValue: 952 | minValue: 953 | orientation: top 954 | showLabels: false 955 | showValues: false 956 | tickDensity: default 957 | tickDensityCustom: 958 | type: linear 959 | unpinAxis: false 960 | valueFormat: 961 | series: 962 | - id: reservation_efficiency 963 | name: Reservation Efficiency (%) 964 | - label: '' 965 | maxValue: 966 | minValue: 967 | orientation: bottom 968 | showLabels: true 969 | showValues: true 970 | tickDensity: custom 971 | tickDensityCustom: '9' 972 | type: linear 973 | unpinAxis: false 974 | valueFormat: 975 | series: 976 | - id: total_blended_cost 977 | name: Total Blended Cost 978 | hidden_fields: 979 | - cost_and_usage.average_blended_cost_per_month 980 | - cost_and_usage.total_blended_cost 981 | - cost_and_usage.total_reserved_blended_cost 982 | row: 45 983 | col: 12 984 | width: 12 985 | height: 13 986 | - name: Cost by Usage Type (Full Detail) 987 | title: Cost by Usage Type (Full Detail) 988 | model: aws_athena_cost_and_usage 989 | explore: cost_and_usage 990 | type: table 991 | fields: 992 | - cost_and_usage.lineitem_usagetype 993 | - cost_and_usage.average_blended_cost_per_month 994 | - cost_and_usage.total_blended_cost 995 | - cost_and_usage.ri_line_item 996 | pivots: 997 | - cost_and_usage.ri_line_item 998 | sorts: 999 | - cost_and_usage.total_blended_cost desc 1 1000 | - cost_and_usage.ri_line_item 0 1001 | limit: 500 1002 | column_limit: 50 1003 | query_timezone: America/Los_Angeles 1004 | show_view_names: true 1005 | show_row_numbers: true 1006 | truncate_column_names: false 1007 | hide_totals: false 1008 | hide_row_totals: false 1009 | table_theme: gray 1010 | limit_displayed_rows: false 1011 | enable_conditional_formatting: false 1012 | conditional_formatting_ignored_fields: [] 1013 | conditional_formatting_include_totals: false 1014 | conditional_formatting_include_nulls: false 1015 | stacking: '' 1016 | show_value_labels: false 1017 | label_density: 25 1018 | legend_position: center 1019 | x_axis_gridlines: false 1020 | y_axis_gridlines: true 1021 | y_axis_combined: true 1022 | show_y_axis_labels: true 1023 | show_y_axis_ticks: true 1024 | y_axis_tick_density: default 1025 | y_axis_tick_density_custom: 5 1026 | show_x_axis_label: true 1027 | show_x_axis_ticks: true 1028 | x_axis_scale: auto 1029 | y_axis_scale_mode: linear 1030 | ordering: none 1031 | show_null_labels: false 1032 | show_totals_labels: false 1033 | show_silhouette: false 1034 | totals_color: "#808080" 1035 | show_null_points: true 1036 | point_style: circle 1037 | interpolation: linear 1038 | series_types: {} 1039 | series_colors: 1040 | cost_and_usage.total_blended_cost: "#3B4260" 1041 | cost_and_usage.average_blended_cost_per_month: "#1D98D3" 1042 | y_axes: 1043 | - label: 1044 | maxValue: 1045 | minValue: 1046 | orientation: top 1047 | showLabels: true 1048 | showValues: false 1049 | tickDensity: default 1050 | tickDensityCustom: 5 1051 | type: linear 1052 | unpinAxis: false 1053 | valueFormat: 1054 | series: 1055 | - id: cost_and_usage.average_blended_cost_per_month 1056 | name: Line Items (Individual Charges) Average Blended Cost per Month 1057 | - label: '' 1058 | maxValue: 1059 | minValue: 1060 | orientation: bottom 1061 | showLabels: true 1062 | showValues: true 1063 | tickDensity: default 1064 | tickDensityCustom: 5 1065 | type: linear 1066 | unpinAxis: false 1067 | valueFormat: 1068 | series: 1069 | - id: cost_and_usage.total_blended_cost 1070 | name: Line Items (Individual Charges) Total Blended Cost 1071 | row: 45 1072 | col: 0 1073 | width: 12 1074 | height: 13 1075 | -------------------------------------------------------------------------------- /cost_and_usage.view.lkml: -------------------------------------------------------------------------------- 1 | view: cost_and_usage { 2 | sql_table_name: aws_optimizer.cost_and_usage_raw ;; 3 | suggestions: no 4 | 5 | dimension: bill_billing_entity { 6 | type: string 7 | hidden: yes 8 | sql: ${TABLE}.bill_billingentity ;; 9 | } 10 | 11 | dimension_group: billing_period_end { 12 | view_label: "Billing Info" 13 | type: time 14 | timeframes: [time,date,week,month,year] 15 | sql: from_iso8601_timestamp(${TABLE}.bill_billingperiodenddate);; 16 | } 17 | 18 | dimension_group: billing_period_start { 19 | view_label: "Billing Info" 20 | type: time 21 | timeframes: [time,date,week,month,year] 22 | sql: from_iso8601_timestamp(${TABLE}.bill_billingperiodstartdate) ;; 23 | } 24 | 25 | 26 | dimension: billtype { 27 | label: "Type" 28 | view_label: "Billing Info" 29 | type: string 30 | sql: ${TABLE}.bill_billtype ;; 31 | } 32 | 33 | dimension: bill_invoiceid { 34 | type: string 35 | hidden: yes 36 | sql: ${TABLE}.bill_invoiceid ;; 37 | } 38 | 39 | dimension: bill_payeraccountid { 40 | type: string 41 | hidden: yes 42 | sql: ${TABLE}.bill_payeraccountid ;; 43 | } 44 | 45 | dimension: identity_lineitemid { 46 | type: string 47 | hidden: yes 48 | sql: ${TABLE}.identity_lineitemid ;; 49 | } 50 | 51 | dimension: identity_timeinterval { 52 | type: string 53 | hidden: yes 54 | sql: ${TABLE}.identity_timeinterval ;; 55 | } 56 | 57 | dimension: lineitem_availabilityzone { 58 | type: string 59 | hidden: yes 60 | sql: ${TABLE}.lineitem_availabilityzone ;; 61 | } 62 | 63 | dimension: lineitem_blendedcost { 64 | hidden: yes 65 | type: number 66 | sql: ${TABLE}.lineitem_blendedcost ;; 67 | } 68 | 69 | dimension: blended_rate { 70 | view_label: "Line Items (Individual Charges)" 71 | description: "The rate applied to this line item for a consolidated billing account in an organization." 72 | type: number 73 | sql: ${TABLE}.lineitem_blendedrate ;; 74 | } 75 | 76 | dimension: lineitem_currencycode { 77 | label: "Currency Code" 78 | view_label: "Line Items (Individual Charges)" 79 | type: string 80 | sql: ${TABLE}.lineitem_currencycode ;; 81 | } 82 | 83 | dimension: description { 84 | view_label: "Line Items (Individual Charges)" 85 | description: "A description of the pricing tier covered by this line item" 86 | type: string 87 | sql: ${TABLE}.lineitem_lineitemdescription ;; 88 | } 89 | 90 | 91 | #### TYPES OF CHARGES #### 92 | 93 | dimension: type { 94 | view_label: "Line Items (Individual Charges)" 95 | description: "Fee is one-time RI expense for all-upfront or partial-upfront. RI Fee is recurring RI expense for partial-upfront and no-upfront RI expenses." 96 | type: string 97 | sql: ${TABLE}.lineitem_lineitemtype ;; 98 | } 99 | 100 | dimension: type_ri_fee_upfront { 101 | view_label: "Reserved Units" 102 | description: "Fee is one-time RI expense for all-upfront or partial-upfront." 103 | type: string 104 | sql: CASE WHEN ${TABLE}.lineitem_lineitemtype = 'Fee' THEN 'Fee' ELSE 'Other' END ;; 105 | } 106 | 107 | dimension: type_ri_fee_on_demand { 108 | view_label: "Reserved Units" 109 | description: "RI Fee is recurring RI expense for partial-upfront and no-upfront RI expenses." 110 | type: string 111 | sql: CASE WHEN ${TABLE}.lineitem_lineitemtype = 'RIFee' THEN 'RI Fee' ELSE 'Other' END ;; 112 | } 113 | 114 | dimension: type_discounted_usage { 115 | view_label: "Reserved Units" 116 | description: "Describes the instance usage that recieved a matching RI discount benefit. It is added to the bill once a reserved instance experiences usage. Cost will always be zero because it's been accounted for with Fee and RI Fee." 117 | type: string 118 | sql: CASE WHEN ${TABLE}.lineitem_lineitemtype = 'DiscountedUsage' THEN 'Discounted Usage' ELSE 'Other' END ;; 119 | } 120 | 121 | dimension: ri_line_item { 122 | label: "RI Line Item (Yes/No)" 123 | view_label: "Reserved Units" 124 | description: "Inlcudes all cost and usage information for Reserved Instances." 125 | type: string 126 | sql: CASE 127 | WHEN ${type} = 'DiscountedUsage' THEN 'RI Line Item' 128 | WHEN ${type} = 'RIFee' THEN 'RI Line Item' 129 | WHEN ${type} = 'Fee' THEN 'RI Line Item' 130 | ELSE 'Non RI Line Item' 131 | END ;; 132 | } 133 | 134 | 135 | 136 | #### 137 | 138 | dimension: normalization_factor { 139 | view_label: "Line Items (Individual Charges)" 140 | description: "Degree of instance size flexibility provided by RIs" 141 | type: number 142 | sql: ${TABLE}.lineitem_normalizationfactor ;; 143 | } 144 | 145 | dimension: lineitem_normalizedusageamount { 146 | hidden: yes 147 | type: number 148 | sql: ${TABLE}.lineitem_normalizedusageamount ;; 149 | } 150 | 151 | dimension: line_item_operation { 152 | label: "Operation" 153 | view_label: "Line Items (Individual Charges)" 154 | type: string 155 | sql: ${TABLE}.lineitem_operation ;; 156 | } 157 | 158 | dimension: product_code { 159 | description: "The AWS product/service being used" 160 | view_label: "Product Info" 161 | type: string 162 | sql: ${TABLE}.lineitem_productcode ;; 163 | } 164 | 165 | dimension: lineitem_resourceid { 166 | type: string 167 | hidden: no 168 | sql: ${TABLE}.lineitem_resourceid ;; 169 | tags: ["aws_resource_id"] 170 | } 171 | 172 | dimension: lineitem_taxtype { 173 | label: "Tax Type" 174 | view_label: "Line Items (Individual Charges)" 175 | type: string 176 | sql: ${TABLE}.lineitem_taxtype ;; 177 | } 178 | 179 | dimension: lineitem_unblendedcost { 180 | type: number 181 | hidden: yes 182 | sql: ${TABLE}.lineitem_unblendedcost ;; 183 | } 184 | 185 | dimension: unblended_rate { 186 | view_label: "Line Items (Individual Charges)" 187 | description: "The rate that this line item would have been charged for an unconsolidated account." 188 | type: number 189 | sql: ${TABLE}.lineitem_unblendedrate ;; 190 | } 191 | 192 | dimension: lineitem_usageaccountid { 193 | view_label: "Line Items (Individual Charges)" 194 | label: "Account ID" 195 | description: "RIs can span multiple accounts - this dimensions related to usage" 196 | type: string 197 | # hidden: yes 198 | sql: ${TABLE}.lineitem_usageaccountid ;; 199 | } 200 | 201 | dimension: lineitem_usageamount { 202 | type: number 203 | hidden: yes 204 | sql: ${TABLE}.lineitem_usageamount ;; 205 | } 206 | 207 | dimension_group: usage_end { 208 | view_label: "Line Items (Individual Charges)" 209 | type: time 210 | timeframes: [raw, time,time_of_day,hour,date,week,day_of_week,month,month_name,year] 211 | sql: from_iso8601_timestamp(${TABLE}.lineitem_usageenddate) ;; 212 | } 213 | 214 | dimension_group: usage_start { 215 | view_label: "Line Items (Individual Charges)" 216 | type: time 217 | timeframes: [raw, time,time_of_day,hour,date,week,day_of_week,month,month_name,year] 218 | sql: from_iso8601_timestamp(${TABLE}.lineitem_usagestartdate);; 219 | } 220 | 221 | dimension: usage_hours { 222 | view_label: "Line Items (Individual Charges)" 223 | sql: date_diff('hour', ${usage_start_raw}, ${usage_end_raw}) ;; 224 | } 225 | 226 | measure: total_usage_hours { 227 | view_label: "Billing Info" 228 | type: sum 229 | sql: ${usage_hours} ;; 230 | } 231 | 232 | 233 | dimension: lineitem_usagetype { 234 | label: "Usage Type" 235 | view_label: "Line Items (Individual Charges)" 236 | description: "The type of usage covered by this line item. If you paid for a Reserved Instance, the report has one line that shows the monthly committed cost, and multiple lines that show a charge of 0." 237 | type: string 238 | sql: ${TABLE}.lineitem_usagetype ;; 239 | } 240 | 241 | dimension: product_accountassistance { 242 | label: "Account Assistance" 243 | view_label: "Product Info" 244 | type: string 245 | sql: ${TABLE}.product_accountassistance ;; 246 | } 247 | 248 | dimension: product_architecturalreview { 249 | label: "Architecture Review" 250 | view_label: "Product Info" 251 | type: string 252 | sql: ${TABLE}.product_architecturalreview ;; 253 | } 254 | 255 | dimension: product_architecturesupport { 256 | label: "Architecture Support" 257 | view_label: "Product Info" 258 | type: string 259 | sql: ${TABLE}.product_architecturesupport ;; 260 | } 261 | 262 | dimension: product_availability { 263 | label: "Availability" 264 | view_label: "Product Info" 265 | type: string 266 | sql: ${TABLE}.product_availability ;; 267 | } 268 | 269 | dimension: product_bestpractices { 270 | hidden: yes 271 | type: string 272 | sql: ${TABLE}.product_bestpractices ;; 273 | } 274 | 275 | dimension: product_cacheengine { 276 | hidden: yes 277 | type: string 278 | sql: ${TABLE}.product_cacheengine ;; 279 | } 280 | 281 | dimension: product_caseseverityresponsetimes { 282 | hidden: yes 283 | type: string 284 | sql: ${TABLE}.product_caseseverityresponsetimes ;; 285 | } 286 | 287 | dimension: product_clockspeed { 288 | hidden: yes 289 | type: string 290 | sql: ${TABLE}.product_clockspeed ;; 291 | } 292 | 293 | dimension: product_currentgeneration { 294 | hidden: yes 295 | type: string 296 | sql: ${TABLE}.product_currentgeneration ;; 297 | } 298 | 299 | dimension: product_customerserviceandcommunities { 300 | hidden: yes 301 | type: string 302 | sql: ${TABLE}.product_customerserviceandcommunities ;; 303 | } 304 | 305 | dimension: product_databaseedition { 306 | label: "Database Edition" 307 | view_label: "Product Info" 308 | type: string 309 | sql: ${TABLE}.product_databaseedition ;; 310 | } 311 | 312 | dimension: product_databaseengine { 313 | label: "Database Engine" 314 | view_label: "Product Info" 315 | type: string 316 | sql: ${TABLE}.product_databaseengine ;; 317 | } 318 | 319 | dimension: product_dedicatedebsthroughput { 320 | label: "Dedicated EBS Throughput" 321 | view_label: "Product Info" 322 | type: string 323 | sql: ${TABLE}.product_dedicatedebsthroughput ;; 324 | } 325 | 326 | dimension: product_deploymentoption { 327 | view_label: "Product Info" 328 | hidden: yes 329 | type: string 330 | sql: ${TABLE}.product_deploymentoption ;; 331 | } 332 | 333 | dimension: product_description { 334 | label: "Description" 335 | view_label: "Product Info" 336 | type: string 337 | sql: ${TABLE}.product_description ;; 338 | } 339 | 340 | dimension: product_durability { 341 | label: "Durability" 342 | view_label: "Product Info" 343 | type: string 344 | sql: ${TABLE}.product_durability ;; 345 | } 346 | 347 | dimension: product_ebsoptimized { 348 | hidden: yes 349 | type: string 350 | sql: ${TABLE}.product_ebsoptimized ;; 351 | } 352 | 353 | dimension: product_ecu { 354 | hidden: yes 355 | type: string 356 | sql: ${TABLE}.product_ecu ;; 357 | } 358 | 359 | dimension: endpoint_type { 360 | view_label: "Product Info" 361 | type: string 362 | sql: ${TABLE}.product_endpointtype ;; 363 | } 364 | 365 | dimension: engine_code { 366 | view_label: "Product Info" 367 | type: string 368 | sql: ${TABLE}.product_enginecode ;; 369 | } 370 | 371 | dimension: product_enhancednetworkingsupported { 372 | view_label: "Product Info" 373 | hidden: yes 374 | type: string 375 | sql: ${TABLE}.product_enhancednetworkingsupported ;; 376 | } 377 | 378 | dimension: execution_frequency { 379 | view_label: "Product Info" 380 | type: string 381 | sql: ${TABLE}.product_executionfrequency ;; 382 | } 383 | 384 | dimension: execution_location { 385 | view_label: "Product Info" 386 | type: string 387 | sql: ${TABLE}.product_executionlocation ;; 388 | } 389 | 390 | dimension: product_feecode { 391 | type: string 392 | hidden: yes 393 | sql: ${TABLE}.product_feecode ;; 394 | } 395 | 396 | dimension: product_feedescription { 397 | type: string 398 | hidden: yes 399 | sql: ${TABLE}.product_feedescription ;; 400 | } 401 | 402 | dimension: product_freequerytypes { 403 | view_label: "Product Info" 404 | type: string 405 | sql: ${TABLE}.product_freequerytypes ;; 406 | } 407 | 408 | dimension: free_trial { 409 | view_label: "Product Info" 410 | type: string 411 | sql: ${TABLE}.product_freetrial ;; 412 | } 413 | 414 | dimension: product_frequencymode { 415 | hidden: yes 416 | type: string 417 | sql: ${TABLE}.product_frequencymode ;; 418 | } 419 | 420 | dimension: from_location { 421 | view_label: "Product Info" 422 | type: string 423 | # map_layer_name: countries 424 | sql: ${TABLE}.product_fromlocation ;; 425 | } 426 | 427 | dimension: from_location_viz { 428 | view_label: "Product Info" 429 | description: "Should ONLY be used for visualization purposes" 430 | type: location 431 | sql_latitude: ${from_location_lat} ;; 432 | sql_longitude: ${from_location_long} ;; 433 | } 434 | 435 | dimension: to_location_viz { 436 | view_label: "Product Info" 437 | description: "Should ONLY be used for visualization purposes" 438 | type: location 439 | sql_latitude: ${to_location_lat} ;; 440 | sql_longitude: ${to_location_long} ;; 441 | } 442 | 443 | 444 | dimension: from_location_lat { 445 | hidden: yes 446 | type: string 447 | sql: CASE 448 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Mumbai)' THEN '19.075984' 449 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Seoul)' THEN '37.566535' 450 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Singapore)' THEN '1.352083' 451 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Sydney)' THEN '-33.868820' 452 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Tokyo)' THEN '35.689487' 453 | WHEN ${TABLE}.product_fromlocation = 'Australia' THEN '-25.274398' 454 | WHEN ${TABLE}.product_fromlocation = 'Canada' THEN '56.130366' 455 | WHEN ${TABLE}.product_fromlocation = 'Canada (Central)' THEN '56.130366' 456 | WHEN ${TABLE}.product_fromlocation = 'EU (Frankfurt)' THEN '50.110922' 457 | WHEN ${TABLE}.product_fromlocation = 'EU (Ireland)' THEN '53.142367' 458 | WHEN ${TABLE}.product_fromlocation = 'India' THEN '20.593684' 459 | WHEN ${TABLE}.product_fromlocation = 'Japan' THEN '36.204824' 460 | WHEN ${TABLE}.product_fromlocation = 'South America (Sao Paulo)' THEN '-23.550520' 461 | WHEN ${TABLE}.product_fromlocation = 'South America' THEN '-23.550520' 462 | WHEN ${TABLE}.product_fromlocation = 'US East (N. Virginia)' THEN '37.431573' 463 | WHEN ${TABLE}.product_fromlocation = 'US East (Ohio)' THEN '40.417287' 464 | WHEN ${TABLE}.product_fromlocation = 'US West (N. California)' THEN '38.837522' 465 | WHEN ${TABLE}.product_fromlocation = 'US WEST (Oregon)' THEN '43.804133' 466 | ELSE 'Not labeled' 467 | END 468 | ;; 469 | } 470 | 471 | dimension: from_location_long { 472 | hidden: yes 473 | type: string 474 | sql: CASE 475 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Mumbai)' THEN '72.877656' 476 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Seoul)' THEN '126.977969' 477 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Singapore)' THEN '103.819836' 478 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Sydney)' THEN '151.209296' 479 | WHEN ${TABLE}.product_fromlocation = 'Asia Pacific (Tokyo)' THEN '139.691706' 480 | WHEN ${TABLE}.product_fromlocation = 'Australia' THEN '133.775136' 481 | WHEN ${TABLE}.product_fromlocation = 'Canada' THEN '-106.346771' 482 | WHEN ${TABLE}.product_fromlocation = 'Canada (Central)' THEN '-106.346771' 483 | WHEN ${TABLE}.product_fromlocation = 'EU (Frankfurt)' THEN '8.682127' 484 | WHEN ${TABLE}.product_fromlocation = 'EU (Ireland)' THEN '-7.692054' 485 | WHEN ${TABLE}.product_fromlocation = 'India' THEN '78.962880' 486 | WHEN ${TABLE}.product_fromlocation = 'Japan' THEN '138.252924' 487 | WHEN ${TABLE}.product_fromlocation = 'South America (Sao Paulo)' THEN '-46.633309' 488 | WHEN ${TABLE}.product_fromlocation = 'South America' THEN '-46.633309' 489 | WHEN ${TABLE}.product_fromlocation = 'US East (N. Virginia)' THEN '-78.656894' 490 | WHEN ${TABLE}.product_fromlocation = 'US East (Ohio)' THEN '-82.907123' 491 | WHEN ${TABLE}.product_fromlocation = 'US West (N. California)' THEN '-120.895824' 492 | WHEN ${TABLE}.product_fromlocation = 'US West (Oregon)' THEN '-120.554201' 493 | ELSE 'Not labeled' 494 | END 495 | ;; 496 | } 497 | 498 | 499 | dimension: to_location_lat { 500 | hidden: yes 501 | type: string 502 | sql: CASE 503 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Mumbai)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Mumbai)' THEN '19.075984' 504 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Seoul)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Seoul)' THEN '37.566535' 505 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Singapore)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Singapore)' THEN '1.352083' 506 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Sydney)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Sydney)' THEN '-33.868820' 507 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Tokyo)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Tokyo)' THEN '35.689487' 508 | WHEN ${TABLE}.product_tolocation = 'Australia' OR ${TABLE}.product_tolocationtype = 'Australia' THEN '-25.274398' 509 | WHEN ${TABLE}.product_tolocation = 'Canada' OR ${TABLE}.product_tolocationtype = 'Canada' THEN '56.130366' 510 | WHEN ${TABLE}.product_tolocation = 'Canada (Central)' OR ${TABLE}.product_tolocationtype = 'Canada (Central)' THEN '56.130366' 511 | WHEN ${TABLE}.product_tolocation = 'EU (Frankfurt)' OR ${TABLE}.product_tolocationtype = 'EU (Frankfurt)' THEN '50.110922' 512 | WHEN ${TABLE}.product_tolocation = 'EU (Ireland)' OR ${TABLE}.product_tolocationtype = 'EU (Ireland)' THEN '53.142367' 513 | WHEN ${TABLE}.product_tolocation = 'India' OR ${TABLE}.product_tolocationtype = 'India' THEN '20.593684' 514 | WHEN ${TABLE}.product_tolocation = 'Japan' OR ${TABLE}.product_tolocationtype = 'Japan' THEN '36.204824' 515 | WHEN ${TABLE}.product_tolocation = 'South America (Sao Paulo)' OR ${TABLE}.product_tolocationtype = 'South America (Sao Paulo)' THEN '-23.550520' 516 | WHEN ${TABLE}.product_tolocation = 'South America' OR ${TABLE}.product_tolocationtype = 'South America' THEN '-23.550520' 517 | WHEN ${TABLE}.product_tolocation = 'US East (N. Virginia)' OR ${TABLE}.product_tolocationtype = 'US East (N. Virginia)' THEN '37.431573' 518 | WHEN ${TABLE}.product_tolocation = 'US East (Ohio)' OR ${TABLE}.product_tolocationtype = 'US East (Ohio)' THEN '40.417287' 519 | WHEN ${TABLE}.product_tolocation = 'US West (N. California)' OR ${TABLE}.product_tolocationtype = 'US West (N. California)' THEN '38.837522' 520 | WHEN ${TABLE}.product_tolocation = 'US WEST (Oregon)' OR ${TABLE}.product_tolocationtype = 'US WEST (Oregon)' THEN '43.804133' 521 | ELSE 'Not labeled' 522 | END 523 | ;; 524 | } 525 | 526 | dimension: to_location_long { 527 | description: "Should ONLY be used for visualization purposes" 528 | hidden: yes 529 | type: string 530 | sql: CASE 531 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Mumbai)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Mumbai)' THEN '72.877656' 532 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Seoul)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Seoul)' THEN '126.977969' 533 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Singapore)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Singapore)' THEN '103.819836' 534 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Sydney)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Sydney)' THEN '151.209296' 535 | WHEN ${TABLE}.product_tolocation = 'Asia Pacific (Tokyo)' OR ${TABLE}.product_tolocationtype = 'Asia Pacific (Tokyo)' THEN '139.691706' 536 | WHEN ${TABLE}.product_tolocation = 'Australia' OR ${TABLE}.product_tolocationtype = 'Australia' THEN '133.775136' 537 | WHEN ${TABLE}.product_tolocation = 'Canada' OR ${TABLE}.product_tolocationtype = 'Canada' THEN '-106.346771' 538 | WHEN ${TABLE}.product_tolocation = 'Canada (Central)' OR ${TABLE}.product_tolocationtype = 'Canada (Central)' THEN '-106.346771' 539 | WHEN ${TABLE}.product_tolocation = 'EU (Frankfurt)' OR ${TABLE}.product_tolocationtype = 'EU (Frankfurt)' THEN '8.682127' 540 | WHEN ${TABLE}.product_tolocation = 'EU (Ireland)' OR ${TABLE}.product_tolocationtype = 'EU (Ireland)' THEN '-7.692054' 541 | WHEN ${TABLE}.product_tolocation = 'India' OR ${TABLE}.product_tolocationtype = 'India' THEN '78.962880' 542 | WHEN ${TABLE}.product_tolocation = 'Japan' OR ${TABLE}.product_tolocationtype = 'Japan' THEN '138.252924' 543 | WHEN ${TABLE}.product_tolocation = 'South America (Sao Paulo)' OR ${TABLE}.product_tolocationtype = 'South America (Sao Paulo)' THEN '-46.633309' 544 | WHEN ${TABLE}.product_tolocation = 'South America' OR ${TABLE}.product_tolocationtype = 'South America' THEN '-46.633309' 545 | WHEN ${TABLE}.product_tolocation = 'US East (N. Virginia)' OR ${TABLE}.product_tolocationtype = 'US East (N. Virginia)' THEN '-78.656894' 546 | WHEN ${TABLE}.product_tolocation = 'US East (Ohio)' OR ${TABLE}.product_tolocationtype = 'US East (Ohio)' THEN '-82.907123' 547 | WHEN ${TABLE}.product_tolocation = 'US West (N. California)' OR ${TABLE}.product_tolocationtype = 'US West (N. California)' THEN '-120.895824' 548 | WHEN ${TABLE}.product_tolocation = 'US West (Oregon)' OR ${TABLE}.product_tolocationtype = 'US West (Oregon)' THEN '-120.554201' 549 | ELSE 'Not labeled' 550 | END 551 | ;; 552 | } 553 | 554 | dimension: from_location_type { 555 | view_label: "Product Info" 556 | type: string 557 | sql: ${TABLE}.product_fromlocationtype ;; 558 | } 559 | 560 | dimension: product_group { 561 | view_label: "Product Info" 562 | type: string 563 | sql: ${TABLE}.product_group ;; 564 | } 565 | 566 | dimension: group_description { 567 | view_label: "Product Info" 568 | type: string 569 | sql: ${TABLE}.product_groupdescription ;; 570 | } 571 | 572 | dimension: product_includedservices { 573 | hidden: yes 574 | type: string 575 | sql: ${TABLE}.product_includedservices ;; 576 | } 577 | 578 | dimension: product_instancefamily { 579 | type: string 580 | hidden: yes 581 | sql: ${TABLE}.product_instancefamily ;; 582 | } 583 | 584 | dimension: instance_type { 585 | view_label: "Product Info" 586 | type: string 587 | sql: ${TABLE}.product_instancetype ;; 588 | } 589 | 590 | dimension: product_io { 591 | view_label: "Product Info" 592 | type: string 593 | sql: ${TABLE}.product_io ;; 594 | } 595 | 596 | dimension: product_launchsupport { 597 | hidden: yes 598 | type: string 599 | sql: ${TABLE}.product_launchsupport ;; 600 | } 601 | 602 | dimension: product_licensemodel { 603 | hidden: yes 604 | type: string 605 | sql: ${TABLE}.product_licensemodel ;; 606 | } 607 | 608 | dimension: location { 609 | view_label: "Product Info" 610 | type: string 611 | sql: ${TABLE}.product_location ;; 612 | } 613 | 614 | dimension: location_type { 615 | view_label: "Product Info" 616 | type: string 617 | sql: ${TABLE}.product_locationtype ;; 618 | } 619 | 620 | dimension: product_maximumstoragevolume { 621 | hidden: yes 622 | type: string 623 | sql: ${TABLE}.product_maximumstoragevolume ;; 624 | } 625 | 626 | dimension: product_maxiopsburstperformance { 627 | hidden: yes 628 | type: string 629 | sql: ${TABLE}.product_maxiopsburstperformance ;; 630 | } 631 | 632 | dimension: product_maxiopsvolume { 633 | hidden: yes 634 | type: string 635 | sql: ${TABLE}.product_maxiopsvolume ;; 636 | } 637 | 638 | dimension: max_throughput_volume { 639 | view_label: "Product Info" 640 | type: string 641 | sql: ${TABLE}.product_maxthroughputvolume ;; 642 | } 643 | 644 | dimension: product_maxvolumesize { 645 | type: string 646 | hidden: yes 647 | sql: ${TABLE}.product_maxvolumesize ;; 648 | } 649 | 650 | dimension: product_memory { 651 | type: string 652 | view_label: "Product Info" 653 | sql: ${TABLE}.product_memory ;; 654 | } 655 | 656 | dimension: product_messagedeliveryfrequency { 657 | type: string 658 | hidden: yes 659 | sql: ${TABLE}.product_messagedeliveryfrequency ;; 660 | } 661 | 662 | dimension: product_messagedeliveryorder { 663 | type: string 664 | hidden: yes 665 | sql: ${TABLE}.product_messagedeliveryorder ;; 666 | } 667 | 668 | dimension: product_minimumstoragevolume { 669 | type: string 670 | hidden: yes 671 | sql: ${TABLE}.product_minimumstoragevolume ;; 672 | } 673 | 674 | dimension: product_minvolumesize { 675 | hidden: yes 676 | type: string 677 | sql: ${TABLE}.product_minvolumesize ;; 678 | } 679 | 680 | dimension: network_performance { 681 | view_label: "Product Info" 682 | type: string 683 | sql: ${TABLE}.product_networkperformance ;; 684 | } 685 | 686 | dimension: operating_system { 687 | view_label: "Product Info" 688 | type: string 689 | sql: ${TABLE}.product_operatingsystem ;; 690 | } 691 | 692 | dimension: product_operation { 693 | label: "Operation" 694 | view_label: "Product Info" 695 | type: string 696 | sql: ${TABLE}.product_operation ;; 697 | } 698 | 699 | dimension: product_operationssupport { 700 | type: string 701 | hidden: yes 702 | sql: ${TABLE}.product_operationssupport ;; 703 | } 704 | 705 | dimension: product_physicalprocessor { 706 | type: string 707 | hidden: yes 708 | sql: ${TABLE}.product_physicalprocessor ;; 709 | } 710 | 711 | dimension: product_preinstalledsw { 712 | type: string 713 | hidden: yes 714 | sql: ${TABLE}.product_preinstalledsw ;; 715 | } 716 | 717 | dimension: product_proactiveguidance { 718 | type: string 719 | hidden: yes 720 | sql: ${TABLE}.product_proactiveguidance ;; 721 | } 722 | 723 | dimension: product_processorarchitecture { 724 | type: string 725 | hidden: yes 726 | sql: ${TABLE}.product_processorarchitecture ;; 727 | } 728 | 729 | dimension: product_processorfeatures { 730 | type: string 731 | hidden: yes 732 | sql: ${TABLE}.product_processorfeatures ;; 733 | } 734 | 735 | dimension: productfamily { 736 | label: "Family" 737 | view_label: "Product Info" 738 | type: string 739 | sql: ${TABLE}.product_productfamily ;; 740 | } 741 | 742 | 743 | ##### Innaccurate labeling on part of AWS - use product code instead #### 744 | 745 | dimension: product_name { 746 | type: string 747 | description: "Innaccurate labeling on part of AWS - use product code instead" 748 | hidden: yes 749 | view_label: "Product Info" 750 | sql: ${TABLE}.product_productname ;; 751 | } 752 | 753 | ##### 754 | dimension: product_programmaticcasemanagement { 755 | hidden: yes 756 | type: string 757 | sql: ${TABLE}.product_programmaticcasemanagement ;; 758 | } 759 | 760 | dimension: product_provisioned { 761 | hidden: yes 762 | type: string 763 | sql: ${TABLE}.product_provisioned ;; 764 | } 765 | 766 | dimension: product_queuetype { 767 | hidden: yes 768 | type: string 769 | sql: ${TABLE}.product_queuetype ;; 770 | } 771 | 772 | dimension: product_requestdescription { 773 | hidden: yes 774 | type: string 775 | sql: ${TABLE}.product_requestdescription ;; 776 | } 777 | 778 | dimension: product_requesttype { 779 | hidden: yes 780 | type: string 781 | sql: ${TABLE}.product_requesttype ;; 782 | } 783 | 784 | dimension: product_routingtarget { 785 | hidden: yes 786 | type: string 787 | sql: ${TABLE}.product_routingtarget ;; 788 | } 789 | 790 | dimension: product_routingtype { 791 | hidden: yes 792 | type: string 793 | sql: ${TABLE}.product_routingtype ;; 794 | } 795 | 796 | dimension: product_servicecode { 797 | hidden: yes 798 | type: string 799 | sql: ${TABLE}.product_servicecode ;; 800 | } 801 | 802 | dimension: product_sku { 803 | hidden: yes 804 | type: string 805 | sql: ${TABLE}.product_sku ;; 806 | } 807 | 808 | dimension: product_softwaretype { 809 | hidden: yes 810 | type: string 811 | sql: ${TABLE}.product_softwaretype ;; 812 | } 813 | 814 | dimension: product_storage { 815 | hidden: yes 816 | type: string 817 | sql: ${TABLE}.product_storage ;; 818 | } 819 | 820 | dimension: product_storageclass { 821 | hidden: yes 822 | type: string 823 | sql: ${TABLE}.product_storageclass ;; 824 | } 825 | 826 | dimension: product_storagemedia { 827 | hidden: yes 828 | type: string 829 | sql: ${TABLE}.product_storagemedia ;; 830 | } 831 | 832 | dimension: product_technicalsupport { 833 | hidden: yes 834 | type: string 835 | sql: ${TABLE}.product_technicalsupport ;; 836 | } 837 | 838 | dimension: tenancy { 839 | view_label: "Product Info" 840 | type: string 841 | sql: ${TABLE}.product_tenancy ;; 842 | } 843 | 844 | dimension: product_thirdpartysoftwaresupport { 845 | hidden: yes 846 | type: string 847 | sql: ${TABLE}.product_thirdpartysoftwaresupport ;; 848 | } 849 | 850 | dimension: to_location { 851 | view_label: "Product Info" 852 | # map_layer_name: countries 853 | type: string 854 | sql: ${TABLE}.product_tolocation ;; 855 | } 856 | 857 | dimension: to_location_type { 858 | view_label: "Product Info" 859 | type: string 860 | sql: ${TABLE}.product_tolocationtype ;; 861 | } 862 | 863 | dimension: training { 864 | view_label: "Product Info" 865 | type: string 866 | sql: ${TABLE}.product_training ;; 867 | } 868 | 869 | dimension: transfer_type { 870 | view_label: "Product Info" 871 | type: string 872 | sql: ${TABLE}.product_transfertype ;; 873 | } 874 | 875 | dimension: usage_family { 876 | view_label: "Product Info" 877 | type: string 878 | sql: ${TABLE}.product_usagefamily ;; 879 | } 880 | 881 | dimension: data_transfer { 882 | view_label: "Line Items (Individual Charges)" 883 | type: yesno 884 | sql: REGEXP_LIKE(${usage_type}, 'DataTransfer') ;; 885 | } 886 | 887 | dimension: data_transfer_outbound { 888 | view_label: "Line Items (Individual Charges)" 889 | type: yesno 890 | sql: REGEXP_LIKE(${usage_type}, 'DataTransfer-Out') ;; 891 | } 892 | 893 | dimension: data_transfer_inbound { 894 | view_label: "Line Items (Individual Charges)" 895 | type: yesno 896 | sql: REGEXP_LIKE(${usage_type}, 'DataTransfer-In') ;; 897 | } 898 | 899 | dimension: usage_type { 900 | view_label: "Product Info" 901 | type: string 902 | sql: ${TABLE}.product_usagetype ;; 903 | } 904 | 905 | dimension: product_vcpu { 906 | hidden: yes 907 | type: string 908 | sql: ${TABLE}.product_vcpu ;; 909 | } 910 | 911 | dimension: product_version { 912 | hidden: yes 913 | type: string 914 | sql: ${TABLE}.product_version ;; 915 | } 916 | 917 | dimension: product_volumetype { 918 | type: string 919 | hidden: yes 920 | sql: ${TABLE}.product_volumetype ;; 921 | } 922 | 923 | dimension: product_whocanopencases { 924 | hidden: yes 925 | type: string 926 | sql: ${TABLE}.product_whocanopencases ;; 927 | } 928 | 929 | dimension: pricing_leasecontractlength { 930 | hidden: yes 931 | type: string 932 | sql: ${TABLE}.pricing_leasecontractlength ;; 933 | } 934 | 935 | dimension: pricing_offeringclass { 936 | hidden: yes 937 | type: string 938 | sql: ${TABLE}.product_storageclass ;; 939 | } 940 | 941 | dimension: pricing_purchaseoption { 942 | hidden: yes 943 | type: string 944 | sql: ${TABLE}.pricing_purchaseoption ;; 945 | } 946 | 947 | dimension: pricing_publicondemandcost { 948 | hidden: yes 949 | type: string 950 | sql: ${TABLE}.pricing_publicondemandcost ;; 951 | } 952 | 953 | dimension: pricing_publicondemandrate { 954 | hidden: yes 955 | type: string 956 | sql: ${TABLE}.pricing_publicondemandrate ;; 957 | } 958 | 959 | dimension: pricing_term { 960 | hidden: yes 961 | type: string 962 | sql: ${TABLE}.pricing_term ;; 963 | } 964 | 965 | dimension: pricing_unit { 966 | hidden: yes 967 | type: string 968 | sql: ${TABLE}.pricing_unit ;; 969 | } 970 | 971 | dimension: reservation_availabilityzone { 972 | hidden: yes 973 | type: string 974 | sql: ${TABLE}.reservation_availabilityzone ;; 975 | } 976 | 977 | dimension: reservation_unitsperreservation { 978 | type: string 979 | hidden: yes 980 | sql: ${TABLE}.reservation_normalizedunitsperreservation ;; 981 | } 982 | 983 | dimension: reservation_numberofreservations { 984 | type: number 985 | hidden: yes 986 | sql: ${TABLE}.reservation_numberofreservations ;; 987 | } 988 | 989 | dimension: reservation_arn { 990 | view_label: "Reserved Units" 991 | description: "When an RI benefit discount is applied to a matching line item of usage, the ARN value in the reservation/ReservationARN column for the initial upfront fees and recurring monthly charges matches the ARN value in the discounted usage line items." 992 | type: string 993 | sql: ${TABLE}.reservation_reservationarn ;; 994 | } 995 | 996 | dimension: reservation_totalreservednormalizedunits { 997 | hidden: yes 998 | type: string 999 | sql: ${TABLE}.reservation_totalreservednormalizedunits ;; 1000 | } 1001 | 1002 | dimension: reservation_totalreservedunits { 1003 | view_label: "Reserved Units" 1004 | description: "The total number of total number of hours across all reserved instances in the subscription." 1005 | type: number 1006 | hidden: yes 1007 | sql: ${TABLE}.reservation_totalreservedunits ;; 1008 | } 1009 | 1010 | 1011 | 1012 | ### ENABLE FOR CUSTOM TAGS ### 1013 | 1014 | dimension: user_name { 1015 | view_label: "Custom Resource Tagging" 1016 | type: string 1017 | sql: ${TABLE}.resourcetags_username ;; 1018 | } 1019 | 1020 | dimension: user_cost_category { 1021 | view_label: "Custom Resource Tagging" 1022 | type: string 1023 | sql: ${TABLE}.resourcetags_usercostcategory ;; 1024 | } 1025 | 1026 | dimension: customer_segment { 1027 | view_label: "Custom Resource Tagging" 1028 | type: string 1029 | sql: CASE 1030 | WHEN ${user_cost_category} = '744.00000000' THEN 'SMB' 1031 | WHEN ${user_cost_category} = '' THEN 'Mid-Market' 1032 | WHEN ${user_cost_category} = 'internal' THEN 'Enterprise' 1033 | ELSE 'Enterprise' 1034 | END 1035 | ;; 1036 | } 1037 | 1038 | ### END EMNABLE FOR CUSTOM TAGS ### 1039 | 1040 | 1041 | measure: count_line_items { 1042 | view_label: "Line Items (Individual Charges)" 1043 | type: count 1044 | } 1045 | 1046 | 1047 | 1048 | ### LINE ITEM AGGREGATIONS ### 1049 | 1050 | measure: total_unblended_cost { 1051 | view_label: "Line Items (Individual Charges)" 1052 | description: "The cost of all aggregated line items after tiered pricing and discounted usage have been processed." 1053 | type: sum 1054 | sql: ${lineitem_unblendedcost} ;; 1055 | value_format_name: usd_0 1056 | } 1057 | 1058 | measure: average_unblended_rate { 1059 | label: "Unblended Rate" 1060 | view_label: "Line Items (Individual Charges)" 1061 | description: "The average cost of all aggregated line items after tiered pricing and discounted usage have been processed." 1062 | type: average 1063 | sql: ${unblended_rate} ;; 1064 | value_format_name: usd_0 1065 | } 1066 | 1067 | measure: total_blended_cost { 1068 | view_label: "Line Items (Individual Charges)" 1069 | description: "How much all aggregated line items are charged to a consolidated billing account in an organization" 1070 | type: sum 1071 | sql: ${lineitem_blendedcost} ;; 1072 | value_format_name: usd_0 1073 | drill_fields: [common*, total_blended_cost, total_measures*] 1074 | } 1075 | 1076 | measure: total_data_transfer_cost { 1077 | view_label: "Line Items (Individual Charges)" 1078 | description: "Total charges for data transfers" 1079 | type: sum 1080 | sql: ${lineitem_blendedcost} ;; 1081 | value_format_name: usd_0 1082 | filters: { 1083 | field: data_transfer 1084 | value: "Yes" 1085 | } 1086 | drill_fields: [common*, total_data_transfer_cost, total_measures*] 1087 | } 1088 | 1089 | measure: total_data_transfer_cost_unblended { 1090 | view_label: "Line Items (Individual Charges)" 1091 | description: "Total charges for data transfers" 1092 | type: sum 1093 | sql: ${lineitem_unblendedcost} ;; 1094 | value_format_name: usd_0 1095 | filters: { 1096 | field: data_transfer 1097 | value: "Yes" 1098 | } 1099 | drill_fields: [common*, total_data_transfer_cost_unblended, total_measures*] 1100 | } 1101 | 1102 | measure: total_outbound_data_transfer_cost { 1103 | view_label: "Line Items (Individual Charges)" 1104 | description: "Total charges for data transfers" 1105 | type: sum 1106 | sql: ${lineitem_blendedcost} ;; 1107 | value_format_name: usd_0 1108 | filters: { 1109 | field: data_transfer_outbound 1110 | value: "Yes" 1111 | } 1112 | drill_fields: [common*, total_outbound_data_transfer_cost, inbound_outbound*] 1113 | } 1114 | 1115 | 1116 | measure: total_inbound_data_transfer_cost { 1117 | view_label: "Line Items (Individual Charges)" 1118 | description: "Total charges for data transfers" 1119 | type: sum 1120 | sql: ${lineitem_blendedcost} ;; 1121 | value_format_name: usd_0 1122 | filters: { 1123 | field: data_transfer_inbound 1124 | value: "Yes" 1125 | } 1126 | drill_fields: [common*, total_inbound_data_transfer_cost, inbound_outbound*] 1127 | } 1128 | 1129 | measure: total_reserved_blended_cost { 1130 | view_label: "Reserved Units" 1131 | description: "How much all aggregated line items are charged to a consolidated billing account in an organization" 1132 | type: sum 1133 | sql: ${lineitem_blendedcost};; 1134 | value_format_name: usd_0 1135 | filters: { 1136 | field: ri_line_item 1137 | value: "RI Line Item" 1138 | } 1139 | drill_fields: [common*, total_reserved_blended_cost] 1140 | } 1141 | 1142 | measure: total_non_reserved_blended_cost { 1143 | view_label: "Reserved Units" 1144 | description: "How much all aggregated line items are charged to a consolidated billing account in an organization" 1145 | type: sum 1146 | sql: ${lineitem_blendedcost} ;; 1147 | value_format_name: usd_0 1148 | filters: { 1149 | field: ri_line_item 1150 | value: "Non RI Line Item" 1151 | } 1152 | drill_fields: [common*, total_non_reserved_blended_cost] 1153 | } 1154 | 1155 | measure: total_non_reserved_unblended_cost { 1156 | view_label: "Reserved Units" 1157 | description: "How much all aggregated line items are charged to a consolidated billing account in an organization" 1158 | type: sum 1159 | sql: ${lineitem_unblendedcost} ;; 1160 | value_format_name: usd_0 1161 | filters: { 1162 | field: ri_line_item 1163 | value: "Non RI Line Item" 1164 | } 1165 | drill_fields: [common*, total_non_reserved_unblended_cost] 1166 | } 1167 | 1168 | measure: percent_spend_on_non_ris{ 1169 | view_label: "Reserved Units" 1170 | type: number 1171 | sql: 1.0 * ${total_non_reserved_blended_cost} / NULLIF(${total_blended_cost},0) ;; 1172 | link: { 1173 | label: "Explore Non Reserved Blended Cost" 1174 | url: "{{total_non_reserved_blended_cost._link}}" 1175 | } 1176 | link: { 1177 | label: "Explore Total Blended Cost" 1178 | url: "{{total_blended_cost._link}}" 1179 | } 1180 | value_format_name: percent_2 1181 | } 1182 | 1183 | measure: percent_spend_on_ris{ 1184 | view_label: "Reserved Units" 1185 | label: "Blended RI Coverage" 1186 | type: number 1187 | sql: 1.0 * ${total_reserved_blended_cost} / NULLIF(${total_blended_cost},0) ;; 1188 | value_format_name: percent_2 1189 | link: { 1190 | label: "Explore Reserved Blended Cost" 1191 | url: "{{total_reserved_blended_cost._link}}" 1192 | } 1193 | link: { 1194 | label: "Explore Total Blended Cost" 1195 | url: "{{total_blended_cost._link}}" 1196 | } 1197 | } 1198 | 1199 | measure: unblended_percent_spend_on_ris{ 1200 | view_label: "Reserved Units" 1201 | label: "Unblended RI Coverage" 1202 | type: number 1203 | sql: 1.0 * ${total_non_reserved_unblended_cost} / NULLIF(${total_unblended_cost},0) ;; 1204 | value_format_name: percent_2 1205 | link: { 1206 | label: "Explore Non Reserved Unblended Cost" 1207 | url: "{{total_non_reserved_unblended_cost._link}}" 1208 | } 1209 | link: { 1210 | label: "Explore Total Blended Cost" 1211 | url: "{{total_blended_cost._link}}" 1212 | } 1213 | } 1214 | 1215 | measure: percent_spend_data_transfers_unblended { 1216 | view_label: "Reserved Units" 1217 | label: "Unblended Data Transfer Cost Percent" 1218 | type: number 1219 | sql: 1.0 * ${total_data_transfer_cost_unblended} / NULLIF(${total_unblended_cost},0) ;; 1220 | value_format_name: percent_2 1221 | link: { 1222 | label: "Explore Data Transfer Unblended Cost" 1223 | url: "{{total_data_transfer_cost_unblended._link}}" 1224 | } 1225 | link: { 1226 | label: "Explore Total Blended Cost" 1227 | url: "{{total_blended_cost._link}}" 1228 | } 1229 | } 1230 | 1231 | measure: count_usage_months { 1232 | # hidden: yes 1233 | type: count_distinct 1234 | sql: ${usage_start_month} ;; 1235 | drill_fields: [billing_period_start_month, total_measures*] 1236 | } 1237 | 1238 | measure: average_blended_cost_all_time { 1239 | view_label: "Line Items (Individual Charges)" 1240 | description: "How much all aggregated line items are charged to a consolidated billing account in an organization" 1241 | type: average 1242 | sql: ${lineitem_blendedcost} ;; 1243 | value_format_name: usd 1244 | drill_fields: [common*, basic_blended_measures*] 1245 | } 1246 | 1247 | measure: average_blended_cost_per_month { 1248 | view_label: "Line Items (Individual Charges)" 1249 | description: "How much all aggregated line items are charged to a consolidated billing account in an organization" 1250 | type: number 1251 | sql: ${total_blended_cost}/NULLIF(${count_usage_months},0) ;; 1252 | value_format_name: usd_0 1253 | link: { 1254 | label: "Explore Total Blended Cost" 1255 | url: "{{total_blended_cost._link}}" 1256 | } 1257 | link: { 1258 | label: "Explore Months" 1259 | url: "{{count_usage_months._link}}" 1260 | } 1261 | } 1262 | 1263 | measure: average_blended_rate { 1264 | label: "Blended Rate" 1265 | view_label: "Line Items (Individual Charges)" 1266 | description: "The average rate applied to all aggregated line items for a consolidated billing account in an organization." 1267 | type: average 1268 | sql: ${blended_rate} ;; 1269 | value_format_name: usd 1270 | drill_fields: [common*, basic_blended_measures*] 1271 | } 1272 | 1273 | measure: total_usage_amount { 1274 | view_label: "Line Items (Individual Charges)" 1275 | description: "The amount of usage incurred by the customer. For all reserved units, use the Total Reserved Units column instead." 1276 | type: sum 1277 | sql: ${lineitem_usageamount} ;; 1278 | value_format_name: decimal_0 1279 | drill_fields: [common*, basic_blended_measures*] 1280 | } 1281 | 1282 | ### PRODUCT SPECIFIC COST MEASURES ### 1283 | 1284 | measure: EC2_usage_amount { 1285 | label: "EC2 Usage Amount" 1286 | view_label: "Product Info" 1287 | type: sum 1288 | sql: ${lineitem_usageamount} ;; 1289 | filters: { 1290 | field: product_code 1291 | value: "AmazonEC2" 1292 | } 1293 | drill_fields: [common*, EC2_usage_amount, ec2_measures*] 1294 | } 1295 | 1296 | measure: cloudfront_usage_amount { 1297 | view_label: "Product Info" 1298 | type: sum 1299 | sql: ${lineitem_usageamount} ;; 1300 | filters: { 1301 | field: product_code 1302 | value: "AmazonCloudFront" 1303 | } 1304 | drill_fields: [common*, cloudfront_usage_amount] 1305 | } 1306 | 1307 | measure: cloudtrail_usage_amount { 1308 | view_label: "Product Info" 1309 | type: sum 1310 | sql: ${lineitem_usageamount} ;; 1311 | filters: { 1312 | field: product_code 1313 | value: "AWSCloudTrail" 1314 | } 1315 | drill_fields: [common*, cloudtrail_usage_amount] 1316 | } 1317 | measure: S3_usage_amount { 1318 | view_label: "Product Info" 1319 | type: sum 1320 | sql: ${lineitem_usageamount} ;; 1321 | filters: { 1322 | field: product_code 1323 | value: "AmazonS3" 1324 | } 1325 | drill_fields: [common*, S3_usage_amount] 1326 | } 1327 | 1328 | measure: redshift_usage_amount { 1329 | view_label: "Product Info" 1330 | type: sum 1331 | sql: ${lineitem_usageamount} ;; 1332 | filters: { 1333 | field: product_code 1334 | value: "AmazonRedshift" 1335 | } 1336 | drill_fields: [common*, redshift_usage_amount] 1337 | } 1338 | 1339 | measure: rds_usage_amount { 1340 | label: "RDS Usage Amount" 1341 | view_label: "Product Info" 1342 | type: sum 1343 | sql: ${lineitem_usageamount} ;; 1344 | filters: { 1345 | field: product_code 1346 | value: "AmazonRDS" 1347 | } 1348 | drill_fields: [common*, rds_usage_amount] 1349 | } 1350 | 1351 | measure: EC2_blended_cost { 1352 | label: "EC2 Blended Cost" 1353 | view_label: "Product Info" 1354 | type: sum 1355 | sql: ${lineitem_blendedcost} ;; 1356 | value_format_name: usd_0 1357 | filters: { 1358 | field: product_code 1359 | value: "AmazonEC2" 1360 | } 1361 | drill_fields: [common*, EC2_blended_cost, ec2_measures*] 1362 | } 1363 | 1364 | measure: EC2_reserved_blended_cost { 1365 | label: "EC2 Reserved Blended Cost" 1366 | view_label: "Product Info" 1367 | type: sum 1368 | sql: ${lineitem_blendedcost} ;; 1369 | value_format_name: usd_0 1370 | filters: { 1371 | field: product_code 1372 | value: "AmazonEC2" 1373 | } 1374 | filters: { 1375 | field: ri_line_item 1376 | value: "RI Line Item" 1377 | } 1378 | drill_fields: [common*, EC2_reserved_blended_cost, ec2_measures*] 1379 | } 1380 | 1381 | measure: EC2_non_reserved_blended_cost { 1382 | label: "EC2 Non Reserved Blended Cost" 1383 | view_label: "Product Info" 1384 | type: sum 1385 | sql: ${lineitem_blendedcost} ;; 1386 | value_format_name: usd_0 1387 | filters: { 1388 | field: product_code 1389 | value: "AmazonEC2" 1390 | } 1391 | filters: { 1392 | field: ri_line_item 1393 | value: "Non RI Line Item" 1394 | } 1395 | drill_fields: [common*, EC2_non_reserved_blended_cost, ec2_measures*] 1396 | } 1397 | 1398 | measure: cloudfront_blended_cost { 1399 | view_label: "Product Info" 1400 | type: sum 1401 | sql: ${lineitem_blendedcost} ;; 1402 | value_format_name: usd_0 1403 | filters: { 1404 | field: product_code 1405 | value: "AmazonCloudFront" 1406 | } 1407 | drill_fields: [common*, cloudtrail_blended_cost] 1408 | } 1409 | 1410 | measure: cloudtrail_blended_cost { 1411 | view_label: "Product Info" 1412 | type: sum 1413 | sql: ${lineitem_blendedcost} ;; 1414 | value_format_name: usd_0 1415 | filters: { 1416 | field: product_code 1417 | value: "AWSCloudTrail" 1418 | } 1419 | drill_fields: [common*, cloudtrail_blended_cost] 1420 | } 1421 | measure: S3_blended_cost { 1422 | view_label: "Product Info" 1423 | type: sum 1424 | sql: ${lineitem_blendedcost} ;; 1425 | value_format_name: usd_0 1426 | filters: { 1427 | field: product_code 1428 | value: "AmazonS3" 1429 | } 1430 | drill_fields: [common*, S3_blended_cost] 1431 | } 1432 | 1433 | measure: redshift_blended_cost { 1434 | view_label: "Product Info" 1435 | type: sum 1436 | sql: ${lineitem_blendedcost} ;; 1437 | value_format_name: usd_0 1438 | filters: { 1439 | field: product_code 1440 | value: "AmazonRedshift" 1441 | } 1442 | drill_fields: [common*, redshift_blended_cost] 1443 | } 1444 | 1445 | measure: rds_blended_cost { 1446 | label: "RDS Blended Cost" 1447 | view_label: "Product Info" 1448 | type: sum 1449 | sql: ${lineitem_blendedcost} ;; 1450 | value_format_name: usd_0 1451 | filters: { 1452 | field: product_code 1453 | value: "AmazonRDS" 1454 | } 1455 | drill_fields: [common*, rds_blended_cost] 1456 | } 1457 | 1458 | 1459 | 1460 | ### RESERVED UNIT AGGREGATIONS ### 1461 | 1462 | measure: number_of_reservations { 1463 | view_label: "Reserved Units" 1464 | description: "The number of reservations covered by this subscription. For example, one Reserved Instance (RI) subscription may have four associated RI reservations." 1465 | type: sum 1466 | sql: ${reservation_numberofreservations} ;; 1467 | drill_fields: [common*, number_of_reservations, total_measures*] 1468 | } 1469 | 1470 | ### UNTIL DISCREPENCY IS RESOLVED, USING A MANUAL CALCULATION 1471 | measure: total_reserved_units_usage { 1472 | label: "Total Reserved Unit Usage (Hours Used)" 1473 | view_label: "Reserved Units" 1474 | description: "The total number of hours across all reserved instances in the subscription." 1475 | type: number 1476 | sql: (COALESCE(SUM(cost_and_usage_raw.reservation_numberofreservations),0) * COALESCE(SUM(cost_and_usage_raw.reservation_normalizedunitsperreservation),0 ) );; 1477 | drill_fields: [common*, total_reserved_units_usage, total_measures*] 1478 | } 1479 | 1480 | measure: total_normalized_reserved_units { 1481 | view_label: "Reserved Units" 1482 | description: "The value for Usage Amount multiplied by the value for Normalization Factor" 1483 | type: sum 1484 | sql: ${reservation_totalreservednormalizedunits} ;; 1485 | drill_fields: [common*, total_normalized_reserved_units, total_measures*] 1486 | } 1487 | 1488 | measure: units_per_reservation { 1489 | label: "Units per Reservation (Hours Reserved)" 1490 | view_label: "Reserved Units" 1491 | description: "The number of usage units reserved by a single reservation in a given subscription, such as how many hours a single Amazon EC2 RI has reserved." 1492 | type: sum 1493 | sql: ${reservation_unitsperreservation} ;; 1494 | drill_fields: [common*, units_per_reservation, total_measures*] 1495 | } 1496 | 1497 | set: common {fields: [lineitem_resourceid, line_item_operation, type, bill_payeraccountid, description]} 1498 | set: total_measures {fields: [total_data_transfer_cost_unblended, total_data_transfer_cost, total_blended_cost, total_unblended_cost] } 1499 | set: inbound_outbound {fields: [total_data_transfer_cost_unblended, total_data_transfer_cost, total_outbound_data_transfer_cost, total_inbound_data_transfer_cost]} 1500 | set: basic_blended_measures {fields: [average_blended_cost_per_month, average_blended_rate, total_usage_amount]} 1501 | set: ec2_measures {fields: [EC2_blended_cost,EC2_reserved_blended_cost,EC2_non_reserved_blended_cost,EC2_usage_amount]} 1502 | 1503 | } 1504 | --------------------------------------------------------------------------------