Skip to content

Commit

Permalink
Update tb tags (Snowflake-Labs#127)
Browse files Browse the repository at this point in the history
* update tags

* modify tags
  • Loading branch information
sfc-gh-chammond authored Oct 7, 2024
1 parent a6817fe commit 9f6e407
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ USE DATABASE tb_101;


-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "collaboration"}}';

ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"sql", "vignette": "collaboration"}}';

-- let's first look for the days our Analysts flagged in Hamburg, Germany
WITH _feb_date_dim AS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ USE DATABASE tb_101;


-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "cost_management"}}';
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"sql", "vignette": "cost_management"}}';


-- let's create our own Test Warehouse and reference the section below to understand each parameter is handling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ USE DATABASE tb_101;


-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "geospatial"}}';
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"sql", "vignette": "geospatial"}}';


-- to explore our newly acquired third party data, let's find all Museums in Paris, France
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ USE WAREHOUSE tb_dev_wh;


-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "governance_with_horizon"}}';
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"sql", "vignette": "governance_with_horizon"}}';


-- to follow best practices we will begin to investigate and deploy RBAC (Role-Based Access Control)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ USE DATABASE tb_101;


-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "semi_structured"}}';
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"sql", "vignette": "semi_structured"}}';


-- let's take a look at a few columns in our Raw Menu table we are receiving from our
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ USE DATABASE tb_101;


-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "transformation"}}';
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":1},"attributes":{"is_quickstart":1, "source":"sql", "vignette": "transformation"}}';


-- to ensure our new Column development does not impact production,
Expand Down
2 changes: 2 additions & 0 deletions samples/tasty_bytes/tb_zts_collaboration.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Quickstart Section 3 - Investigating Zero Sales Days in our First Party Data
-- Section 3: Step 1 - Querying Point of Sales Data for Trends
USE ROLE tasty_data_engineer;
USE WAREHOUSE tasty_de_wh;
-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":0},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "collaboration"}}';

SELECT
o.date,
Expand Down
3 changes: 3 additions & 0 deletions samples/tasty_bytes/tb_zts_data_governance.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Quickstart Section 3 - Exploring Available Roles
-- Section 3: Step 1 - Setting our Context
USE ROLE accountadmin;
USE WAREHOUSE tasty_dev_wh;
-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":0},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "data_governance"}}';



-- Section 3: Step 2 - Exploring All Roles in our Account
Expand Down
2 changes: 2 additions & 0 deletions samples/tasty_bytes/tb_zts_financial_governance.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Quickstart Section 3 - Creating a Warehouse
-- Section 3: Step 1 - Role and Warehouse Context
USE ROLE tasty_admin;
USE WAREHOUSE tasty_de_wh;
-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":0},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "cost_management"}}';


-- Section 3: Step 2 - Creating and Configuring a Warehouse
Expand Down
3 changes: 3 additions & 0 deletions samples/tasty_bytes/tb_zts_geospatial.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ Quickstart Section 3 - Acquiring Safegraph POI Data from the Snowflake Marketpla
-- Section 3: Step 1 - Using First Party Data to Find Top Selling Locations
USE ROLE tasty_data_engineer;
USE WAREHOUSE tasty_de_wh;
-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":0},"attributes":{"is_quickstart":1, "source":"tastybytes", "vignette": "geospatial"}}';


SELECT TOP 10
o.location_id,
Expand Down
2 changes: 2 additions & 0 deletions samples/tasty_bytes/tb_zts_semi_structured_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Quickstart Section 3 - Profiling our Menu Data
-- Section 3: Step 1 - Setting our Context and Querying our Table
USE ROLE tasty_data_engineer;
USE WAREHOUSE tasty_de_wh;
-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":0},"attributes":{"is_quickstart":1, "source":"sql", "vignette": "semi_structured"}}';

SELECT TOP 10
m.truck_brand_name,
Expand Down
2 changes: 2 additions & 0 deletions samples/tasty_bytes/tb_zts_transformation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Quickstart Section 4: Testing Snowflakes Query Result Set Cache

-- Section 4: Step 1 - Querying our Cloned Table
USE WAREHOUSE tasty_dev_wh;
-- assign Query Tag to Session
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is","name":"tb_zts","version":{"major":1, "minor":0},"attributes":{"is_quickstart":1, "source":"sql", "vignette": "transformation"}}';

SELECT
t.truck_id,
Expand Down

0 comments on commit 9f6e407

Please sign in to comment.