modified macro
This commit is contained in:
parent
e9f16342e7
commit
751a95f9ae
2 changed files with 10 additions and 13 deletions
|
|
@ -9,15 +9,6 @@ It generates two output fields:
|
|||
This macro is intended to be used within a SELECT statement
|
||||
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", "") | 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", "") | replace("Date", "") }}_date_utc
|
||||
{% macro unix_ms_timestamp_to_utc(column_name) %}
|
||||
to_timestamp({{ adapter.quote(column_name) }} / 1000) at time zone 'UTC'
|
||||
{% endmacro %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue