added tests

This commit is contained in:
Joaquin Ossa 2024-10-03 12:19:27 +02:00
parent 0a880a138b
commit e9f16342e7
2 changed files with 6 additions and 2 deletions

View file

@ -12,11 +12,12 @@ and ensures that the output is properly formatted for further analysis.
{% macro timestamp_to_utc(column_name) %}
to_timestamp(
{{ adapter.quote(column_name) }}::double precision / 1000
) at time zone 'UTC' as {{ column_name | replace("At", "") }}_at_utc,
) at time zone 'UTC'
as {{ column_name | replace("At", "") | replace("Date", "") }}_at_utc,
cast(
to_timestamp(
{{ adapter.quote(column_name) }}::double precision / 1000
) at time zone 'UTC' as date
) as {{ column_name | replace("At", "") }}_date_utc
) as {{ column_name | replace("At", "") | replace("Date", "") }}_date_utc
{% endmacro %}