Snowflake result renames column

Viewed 39

The resultscan on last query renames the common column

select 'a' as col,'b' as col; 

gives resultset columns as col,col

select * from table(result_scan(last_query_id(-1)))

gives resultset column as col,col_1

1 Answers

Query:

select 'a' as col,'b' as col; 

gives:

enter image description here

Checking metadata:

DESC RESULT LAST_QUERY_ID();

gives:

enter image description here

So yes, the numbering is different (COL_2 vs COL_1) depending on which method is used to access metadata and it should be reported to Snowflake support.

Related