Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Time Zone support on timestamp_column #1471

Open
asyarif93 opened this issue Mar 19, 2024 · 1 comment
Open

Add Time Zone support on timestamp_column #1471

asyarif93 opened this issue Mar 19, 2024 · 1 comment

Comments

@asyarif93
Copy link

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

@haritamar
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants