I\'m trying to create to following view:
CREATE OR REPLACE VIEW view_events AS
(
SELECT
\"rank\"() OVER (PARTITION BY \"tb1\".\"innerid\" ORDER BY \"tb1
Ran into something similar on something that I was working on recently. AWS Support pointed me to Davos solution but it didn't end up working for my case. The solution that ended up working from me was:
create or replace view db_name.vw_name AS
select
from_unixtime(cast(to_unixtime(current_timestamp) AS bigint)) as field_name
from db_name.tbl_name
This will convert the output of current_timestamp
which is timestamp with time zone
to timestamp
If you want to verify the data type of the field, you can use:
select typeof(field_name) from db_name.vw_name
Hope that helps!