[CT-1134] Partitioning on datatime column with hourly granularity #298
Labels
bug
Something isn't working
bytes_processed
Issues related to cost tracking in BigQuery
incremental
partitioning
Related to creating, replacing, or pruning partitions to avoid full table scans
Describe the bug
I've tried to setup partitioning on a table of my BigQuery following the instruction on https://docs.getdbt.com/reference/resource-configs/bigquery-configs#partition-clause
I found the "Bytes billed" cost of the merge script is over than I expect.
Expected behavior
I would expect just pay for the partitions I specify to read and write.
Steps To Reproduce
The is my model:
dbt generates the sql is like below:
Screenshots and log output
The size of the destination mart table is 30 MB, and the size of the partitions I specifiy shoule be less than 1 MB.
Additional context
I found that datetime_trunc is the reason to cost 30 MB to query all the data of destination.
My current workaround is:
The script generated by dbt is like below:
BTW, is there a way to specifiy a time range of partitions rather than a list of partitions? It should be more felixable if I want to replace a continuous partition.
The text was updated successfully, but these errors were encountered: