This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * This query will look at the past 30 days of job history to analyze it for costs under | |
| * BigQuery Editions while utilizing the new autoscaling feature that was introduced. | |
| * It does this for those using both PAYG (Pay As You Go) and commitment models. | |
| * It will also compare this versus running the query with the on-demand model. | |
| * | |
| * Note that this query utilizes some math modeling behaviors that the BigQuery | |
| * autoscaler uses. Namely these are the up to 10 seconds "slot scale up time," | |
| * the minimum of 60 seconds "slot scale down time," and the behavior that the | |
| * autoscaler scales up and down in factors of 100 slots for each job. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "os" | |
| "cloud.google.com/go/bigquery" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'open-uri' | |
| require 'zlib' | |
| require 'yajl' | |
| # References | |
| # - https://developers.google.com/bigquery/preparing-data-for-bigquery#dataformats | |
| # - https://developers.google.com/bigquery/docs/data#nested | |
| # | |
| def type(t) |