Fix: Automatic derivation of a partitioning transformation for a time column in BigQuery#1389
Conversation
… column in BigQuery
| if isinstance(this, exp.Column): | ||
| if partition_interval_unit == IntervalUnit.MINUTE: | ||
| raise SQLMeshError("BigQuery does not support partitioning by minute") | ||
| if isinstance(this, exp.Column) and partition_interval_unit != IntervalUnit.MINUTE: |
There was a problem hiding this comment.
For the case when partition_by is a column and we get an interval unit of a minute, is the thought to use the BQ error message instead of our own?
There was a problem hiding this comment.
Yes, but the error message will only happen if the column is not date and the custom expression was not provided.
There was a problem hiding this comment.
If the data type is timestamp or datetime, only providing the column will fail. Does it make sense to provide a better error message to the user of what to do? If they are relying on our "magic", it would be helpful to point them at documentation that informs them what to do.
There was a problem hiding this comment.
I'd rather not hide BQ responses for now. If we can derive the partition automatically - great, if not - we should just let user interpret the error and provide a correct partition_by based on the error message they got from BQ.
No description provided.