Cast column datatype in sources at “loaded_at_field” to check freshness of a table
i want to check freshness of the table
I tried with macro and with cast to change column “created_date” data type from string to timestamp but it is throwing error saying “Syntax Error”
sources:
- name: demo
database: demo
schema: public
freshness:
error_after: {count: 1, period: day}
tables:
- name: sale
columns:
- name: id
tests:
- unique
- not_null
loaded_at_field: created_date
freshness:
error_after: {count: 6, period: hour}
How to change column data type in loaded_at_field?