You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We keep audit fields (such as created_at) in some of our tables which is the data upsert time and needs to be timezone aware. I was looking to use dbt-date package instead of our internal custom macros for simplicity of our code base. The macro {{ dbt_date.now() }} returns timezone naive timestamp where as I am looking for a timezone aware field.
Describe the solution you'd like
I am not sure if there should be a new macro something like now_tz or have the ability for timezone aware response in {{ dbt_date.now() }} itself.
Describe alternatives you've considered
A simple macro that we currently use looks something like this (applicable only for snowflake db):
'{{ tz }}', CURRENT_TIMESTAMP
){% endmacro %}
The text was updated successfully, but these errors were encountered:
msardana94
changed the title
[Feature Request]
Timezone aware macro similar to now()
Jul 17, 2023
Is your feature request related to a problem? Please describe.
We keep audit fields (such as
created_at
) in some of our tables which is the data upsert time and needs to be timezone aware. I was looking to usedbt-date
package instead of our internal custom macros for simplicity of our code base. The macro{{ dbt_date.now() }}
returns timezone naive timestamp where as I am looking for a timezone aware field.Describe the solution you'd like
I am not sure if there should be a new macro something like
now_tz
or have the ability for timezone aware response in{{ dbt_date.now() }}
itself.Describe alternatives you've considered
A simple macro that we currently use looks something like this (applicable only for snowflake db):
The text was updated successfully, but these errors were encountered: