elementary
elementary copied to clipboard
Add Time Zone support on timestamp_column
Is your feature request related to a problem? Please describe. In BigQuery A timestamp value represents an absolute point in time, independent of any time zone or convention such as daylight saving time (DST), with microsecond precision. Because of this, The Elementary complete "day" has partial data to what we actually have resulting to always giving anomaly.
Describe the solution you'd like Allowing to add sql expression in timestamp_column. e.g.
meta:
elementary:
timestamp_column: "convert_timezone('UTC', 'Australia/Sydney', load_date)"
Describe alternatives you've considered another options can be more user friendly by having
meta:
elementary:
timestamp_column: load_date
convert_timestamp: 'Australia/Sydney'
but this might adding dependency as date conversion is vendor specific
Additional context Also Related to https://elementary-community.slack.com/archives/C02CTC89LAX/p1683764020831119
Would you be willing to contribute this feature? I haven't explore the source code, as i not sure this need to be raised in here or https://github.com/elementary-data/dbt-data-reliability
Hi @asyarif93 !
Thanks for opening this issue and sorry for the delayed response. I believe that actually a custom SQL should work for the timestamp column today (in the past we had validation that enforced it to be a column name and we removed it). Does it not work for you?
Thanks, Itamar