[CT-2180] [Feature] Add bytes_billed to adapter response #560
Labels
feature:cost-reduction
Issues related to cost tracking in BigQuery
good_first_issue
Good for newcomers
type:enhancement
New feature or request
Is this your first time submitting a feature request?
Describe the feature
I am working to monitor the BigQuery costs in our projects more efficiently.
Today what dbt returns is
bytes_processed
from job'stotal_bytes_processed
, which is almost the same astotal_bytes_billed
. The differences, as I know them, are thattotal_bytes_billed
is rounded to the nearest MB, and if the query is less than 10MB,total_bytes_billed
will be 10MB.So
total_bytes_processed
is not 100% exactly what is charged.I think
total_bytes_processed
is good for monitoring query performance, andtotal_bytes_billed
is good for knowing the real cost.You can calculate
total_bytes_billed
fromtotal_bytes_processed
easily, just apply a couple of rules there. But if BigQuery already returns the calculatedtotal_bytes_billed
, there's no point in making this transformation again.Besides, this way there's no risk of making a wrong transformation, or the BQ changing some billing rule.
So I would like to add
total_bytes_billed
to theadapter_response
so we can easily calculate the billing costs.Describe alternatives you've considered
It seems very straightforward, just do the same as this PR
#271
But instead of slot time, we want the bytes billed. I think it is a good first issue.
Who will this benefit?
This would help people calculate the costs of BigQuery queries, by letting BigQuery say the bytes billed, instead of calculating themselves.
Are you interested in contributing this feature?
Yes, I think I could add bytes_billed to the adapter response.
Anything else?
No response
The text was updated successfully, but these errors were encountered: