Forum Discussion
Why does Power BI not recognize Snowflake TIMESTAMP_TZ as DateTimeZone
To the best of my determination, the Snowflake datatype TIMESTAMP_TZ is not ISO_8061 compliant and that is the what Power BI is looking for to cast the data as DATETIMEZONE as opposed to DATETIME. Here's what I did to formulate that response.
- Create a trial account in SF
Generated the following SQL:
ALTER SESSION SET TIMESTAMP_TYPE_MAPPING = TIMESTAMP_TZ;
CREATE TABLE tstx_test (timestamp_tz TIMESTAMP_TZ);
INSERT INTO tstx_test (timestamp_tz) VALUES (CURRENT_TIMESTAMP());Assured that timestamp column casted correctly
Ran SQL against the newly formed table. Result below.
Brought the data into PBI Desktop and the transformation editor. By default, PBI recognizes it as DateTime
Of
If convert the column in PBI to DateTimeZone it applies my local time (MST-UTC(-7) zone to the timestamp. Which is not what is stored in Snowflake as shown on top.
Please inform me if I'm missing something.
- lbendlin1 year agoSuper User
The standard is called ISO 8601
Apart from that (and for a second ignoring the fact that your server is not running on UTC (!!!)) it looks like the datetimezone value is accurate. 11am Pacific is 12pm Mountain.
What is your expectation - to see the UTC time?