In this video, I am going to talk about snowflake parameter query tag.
what is a query_tag?
how to use query tags in snowflake
use role accountadmin;
use database demo_db;
-- Query_Tag
show parameters like 'query_tag';
show parameters like 'query_tag' in user;
show parameters like 'query_tag' in account;
select 'Query1' ;
ALTER ACCOUNT asa26717 SET query_tag = 'My first account level query tag';
show parameters like 'query_tag' in account;
select 'Query from account' ;
AlTER USER user12 SET query_tag ='My first user level query tag';
show parameters like 'query_tag' in user;
select 'Query from user' ;
ALTER SESSION SET query_tag ='My first sesion level query tag';
show parameters like 'query_tag';
select 'Query from session';
ALTER ACCOUNT asa2674567 UNSET query_tag;
ALTER USER user12 UNSET query_tag;
ALTER SESSION UNSET query_tag;
select *from table(information_schema.query_history()) order by start_time;
select *from table(information_schema.query_history_by_user()) order by start_time;
select * from table(information_schema.query_history_by_session()) order by start_time;
select QUERY_TAG,* from table(information_schema.query_history_by_session())
where QUERY_TAG ='My first user level query tag' order by start_time;
#snowflake#snowflakeparameters#datacloud#vcklytech
0 Comments