nerdexam
Snowflake

SOL-C01 · Question #134

A Snowflake account has two virtual warehouses, 'WH ETC and 'WH REPORTING'. You need to ensure that the cost of running queries against a specific table, 'SALES DATA' , is accurately attributed to the

The correct answer is B. Set the 'QUERY _ TAG' session parameter to 'REPORTING' before executing queries against. Setting QUERY_TAG as a session parameter stamps each query with identifying metadata that is captured in Snowflake's QUERY_HISTORY view, allowing you to filter and aggregate credit consumption by tag value (e.g., 'REPORTING') regardless of which warehouse executed the query - mak

Virtual Warehouses

Question

A Snowflake account has two virtual warehouses, 'WH ETC and 'WH REPORTING'. You need to ensure that the cost of running queries against a specific table, 'SALES DATA' , is accurately attributed to the reporting team, even when they accidentally use the 'WH ETL' warehouse. How can you achieve this cost allocation effectively?

Options

  • AUse resource monitors to limit the total credit consumption of 'WH ETC.
  • BSet the 'QUERY _ TAG' session parameter to 'REPORTING' before executing queries against
  • Ccontrols access but not cost allocation. A IJDF (option D) is complex and may not be practical.
  • DCreate a user-defined function (UDF) that checks the current warehouse and raises an error if
  • EConfigure data masking on 'SALES DATA' when queried from 'WH ETC.

How the community answered

(40 responses)
  • A
    30% (12)
  • B
    45% (18)
  • C
    5% (2)
  • D
    8% (3)
  • E
    13% (5)

Explanation

Setting QUERY_TAG as a session parameter stamps each query with identifying metadata that is captured in Snowflake's QUERY_HISTORY view, allowing you to filter and aggregate credit consumption by tag value (e.g., 'REPORTING') regardless of which warehouse executed the query - making it the precise tool for cross-warehouse cost attribution.

Why the distractors fail:

  • A - Resource monitors cap total credit spend on a warehouse; they track limits, not team-level attribution across warehouses.
  • C - As the option itself hints, access controls (RBAC) govern who can query, not whose budget a query charges to.
  • D - Raising an error on the wrong warehouse prevents execution entirely rather than attributing the cost; it's a guardrail, not an accounting mechanism.
  • E - Data masking is a security/privacy feature that controls what data a user sees, with no connection to cost tracking.

Memory tip: Think of QUERY_TAG as a department code you write on an expense receipt. No matter which company card (warehouse) was swiped, the receipt is labeled for the right team - and finance (Snowflake account usage reporting) sorts all receipts by that code.

Topics

#QUERY_TAG#Cost allocation#Virtual Warehouses#Session parameters

Community Discussion

No community discussion yet for this question.

Full SOL-C01 Practice