A financial services firm is architecting a multi-tenant data platform on Snowflake. They will host data for several independent hedge funds. A critical requirement is that no hedge fund can ever see another's data, and network traffic for each must be isolated to a specific set of IP addresses. Additionally, the firm wants to manage all accounts centrally under a single master agreement. Which combination of Snowflake features is required to meet these stringent isolation and management requirements?
Answer and explanation
Correct answer: C
This is the most secure and correct architecture. Using a Snowflake Organization allows for central management and billing. Creating separate accounts for each hedge fund provides the strongest data isolation, as objects and compute are completely segregated. Applying unique Network Policies within each account ensures that network traffic is restricted to the specific IP addresses designated for that fund, fulfilling the network isolation requirement. Row Access Policies in a single account are complex to manage for true multi-tenancy and don't provide compute or network traffic isolation. Applying network policies at the master account level would enforce the same policy for all funds, which contradicts the requirement for fund-specific IP whitelists.
Question 2
A data architect is designing a data vault model in Snowflake. To improve query performance for the business vault, they are considering applying constraints to the link and satellite tables. They want the query optimizer to use this metadata, but they do not want Snowflake to expend resources validating the constraints during data loading. What is the correct syntax to achieve this?
Answer and explanation
Correct answer: B
The RELY property tells the Snowflake optimizer that the data in the table conforms to the constraint, allowing it to use this information for query rewrites and optimizations (like join elimination) without actually validating the data. This meets the requirement of improving performance without incurring validation overhead. NOT ENFORCED is the default and simply declares the constraint without validation or reliance by the optimizer. VALIDATE would force validation, which is what the architect wants to avoid. ENABLE is not a standalone constraint property; it's used with VALIDATE.
Question 3
A data engineering team is building an ELT pipeline. A stream object has been created on a raw data table to capture changes (inserts, updates, deletes). A downstream task merges these changes into a dimension table. After a successful merge operation, the team notices that the stream is not empty and contains the same change records. The subsequent task run processes the same records again, causing data duplication issues. What is the most likely cause of this behavior?
Answer and explanation
Correct answer: B
A stream's offset advances only when the DML statement that consumes it is part of a successful transaction. If the MERGE statement runs as a standalone, auto-committed transaction, the stream consumption is not guaranteed to be part of that same transaction. To ensure the stream is consumed atomically with the MERGE operation, both the SELECT from the stream and the MERGE into the target table must be enclosed within an explicit BEGIN...COMMIT transaction block. This guarantees that if the MERGE is successful, the stream's offset is advanced, and the records are consumed.
Question 4
During a performance review of a large data warehouse, an architect analyzes a query profile for a frequently executed report. The profile reveals that a significant portion of the execution time is spent on a 'TableScan' operation, and the 'Partitions scanned' is nearly equal to the 'Partitions total', despite the query having a highly selective WHERE clause on a TIMESTAMP_NTZ column. The table's data is naturally ordered by the timestamp of insertion. What is the most effective and cost-efficient first step to optimize this query?
Answer and explanation
Correct answer: C
The query profile indicates poor micro-partition pruning, as almost all partitions are being scanned. Since the data is naturally ordered by the timestamp column used in the WHERE clause, defining a clustering key on this column will formalize this organization. Snowflake can then use the micro-partition metadata to prune (skip) the vast majority of partitions that do not contain data relevant to the query's time range. This directly addresses the root cause of the excessive table scan. Increasing warehouse size would only brute-force the scan faster at a higher cost. Search Optimization is best for highly selective point lookups on high-cardinality columns, not range scans on a naturally ordered key. Creating a materialized view is a heavier solution and might not be as effective as fixing the base table's physical layout.
Question 5
Multiple answers
A healthcare organization must implement a security model where data analysts can query patient data for statistical research but must NEVER see patient names or social security numbers. However, a separate group of 'Auditors' must be able to view the original, unmasked data for compliance checks. The solution must be centrally managed and automatically applied to any user with the ANALYST role. Which Snowflake security features should be combined to meet these requirements? (Select TWO)
Answer and explanation
Correct answers: B, D
Dynamic Data Masking allows defining a policy that conditionally alters the data returned from a query based on the user's role. A masking policy can be created to show the real value for the AUDITOR role but a masked value (e.g., 'XXX-XX-XXXX') for the ANALYST role.
RBAC is the foundation for this solution. The masking policy's logic will explicitly check the user's current role (IS_ROLE_IN_SESSION('AUDITOR')) to decide whether to show masked or unmasked data. The distinct roles (ANALYST, AUDITOR) are essential for the policy to function as required.
Question 6
True or False: When sharing a table with a consumer account via a standard Secure Share, the data is physically copied to the consumer's account, and the consumer is responsible for the storage costs of the shared data.
Answer and explanation
Correct answer: B
The statement is false. Snowflake's Secure Data Sharing is built on its unique architecture that separates storage and compute. Data is never physically copied to the consumer's account. Instead, the consumer gets secure, live, read-only access to the provider's data. Because the data remains in the provider's account, the provider is responsible for all storage costs. The consumer is only responsible for the compute costs incurred from querying the shared data using their own virtual warehouses.
Question 7
A media company is building a data pipeline to process video metadata files (JSON format) arriving in an S3 bucket. The JSON files have a deeply nested structure. The goal is to load this raw JSON into a staging table with a single VARIANT column and then transform and flatten the nested arrays into a structured analytical table. What is the most appropriate Snowflake function to use for un-nesting the JSON arrays during the transformation step?
Answer and explanation
Correct answer: C
The FLATTEN function is a table function specifically designed to explode semi-structured data, like JSON arrays, into a relational representation. It produces a lateral view of a VARIANT, OBJECT, or ARRAY column, effectively converting each element of the array into a separate row in the result set. PARSE_JSON is used to convert a string into a VARIANT, which is done at ingestion. JSON_EXTRACT_PATH_TEXT is used to extract scalar values from a specific path within the JSON, not to un-nest an entire array. CHECK_JSON is for validation.
Question 8
An e-commerce company has a multi-cluster warehouse configured with a scaling policy set to ECONOMY. During the peak holiday season, they observe that user queries are frequently getting queued, leading to slow dashboard performance. The monitoring dashboard shows that while the warehouse has scaled out to its maximum cluster count, the average CPU utilization across all clusters remains low, around 30-40%. What is the most likely reason for this behavior?
Answer and explanation
Correct answer: B
The ECONOMY scaling policy is designed to conserve credits by starting new clusters only when the system estimates there's enough query load to keep the new cluster busy for at least 6 minutes. This can lead to queuing even if the current clusters are not fully utilized, as the policy waits to ensure the new cluster will be used efficiently. The low CPU utilization suggests the existing clusters are handling their current load, but the queuing indicates that the policy is too conservative for the bursty, high-concurrency workload of the holiday season. Changing the policy to STANDARD would start new clusters more aggressively, reducing queue time.
Question 9
Case Study: Global Retailer's Data Mesh Architecture
A large retail corporation with headquarters in North America is implementing a decentralized Data Mesh architecture using Snowflake. They have business units in EMEA and APAC, each responsible for their own data products (e.g., Sales, Marketing, Supply Chain). Each business unit will have its own Snowflake account in their respective cloud region (AWS us-east-1, Azure West Europe, GCP asia-southeast1) to maintain data sovereignty and autonomy.
Current Situation & Technical Requirements:
The central BI team in North America needs to build consolidated global sales dashboards. This requires joining sales data from all three regional accounts.
The solution must be real-time; as soon as a regional sales table is updated, the change should be reflected in the central account.
The central BI team must not incur storage costs for the regional data. They should only pay for the compute they use to query it.
The architecture must be resilient. If the primary cloud region for the central BI team (AWS us-east-1) becomes unavailable, they must be able to fail over to a secondary account in AWS us-west-2 with minimal data loss (RPO < 5 minutes) and be operational within an hour (RTO < 1 hour).
Which architectural design best satisfies all the requirements of the global retailer?
Answer and explanation
Correct answer: D
This is the optimal solution. Using Secure Data Sharing meets requirements 1, 2, and 3: it provides live, real-time access to data across regions and clouds without copying it, so the central BI team only pays for compute. For requirement 4, the regional accounts must share their data with both the primary (us-east-1) and secondary (us-west-2) NA accounts. The databases created from these shares are not replicated via Account Replication. Instead, a Failover Group should be used to replicate the central account's own objects like users, roles, and warehouses. In a failover event, the secondary account is promoted, and it already has access to the live regional data via the pre-configured shares, allowing it to resume operations quickly.
Question 10
A DevOps team is automating the deployment of a Snowflake environment using CI/CD. As part of the process, they need to programmatically check if a specific Row Access Policy is attached to a given table before proceeding with other changes. Which information source should they query to get this information reliably?
Answer and explanation
Correct answer: C
The POLICY_REFERENCES function (or the SNOWFLAKE.ACCOUNT_USAGE.POLICY_REFERENCES view for historical lookups) is the correct tool for this task. It is specifically designed to show which security policies (like masking or row access) are set on which objects. Querying this function with the policy name will return the objects it is attached to, or querying with the object name will return the policies attached to it. The TABLES view does not contain policy attachment details. GET_DDL shows the table's DDL but not the policy attachments, which are managed separately via ALTER TABLE ... ADD ROW ACCESS POLICY. The APPLICABLE_ROLES view shows role information, not policy attachments.