
Answer-first summary for fast verification
Answer: Create a **view** on the marketing table that selects only approved fields and uses aliases to match the sales team's naming conventions.
### Explanation Creating a **view** is the most efficient and simplest solution for this scenario due to the following factors: 1. **No Data Duplication**: A view is a virtual object that does not copy or move data. This avoids extra storage costs and the complex synchronization challenges inherent in maintaining physical copies. 2. **Schema Mapping and Filtering**: Views allow you to restrict column access and rename fields in a single step using SQL aliases (e.g., `SELECT marketing_col AS sales_col`). This fulfills the requirements without touching the source data. 3. **Access Control**: You can grant the sales team `SELECT` privileges on the view while keeping the underlying marketing table restricted, ensuring sensitive fields remain inaccessible. ### Comparison with Other Options: * **CTAS (Option A) & Parallel Writes (Option B)**: These methods create physical duplicates of the data. This increases the storage footprint and creates a maintenance burden, as any changes to the source logic must be propagated to these secondary tables. * **DEEP CLONE (Option D)**: While Delta Lake's `DEEP CLONE` is useful for data migration or testing, it creates a full copy of the data. Managing a clone for simple field renaming and filtering is unnecessarily complex compared to a view.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
The marketing department needs to share data from an aggregate table with the sales department. The sales team requires different field names to align with their existing conventions, and certain marketing-specific columns must be excluded for security and compliance reasons.
Which approach offers the simplest, most efficient way to provide this data to the sales team while meeting these requirements?
A
Use a CTAS (Create Table As Select) statement to generate a new table from the marketing data and schedule a production job to keep it updated.
B
Modify the existing production pipeline to perform a parallel write to a new sales-specific table with the required schema.
C
Create a view on the marketing table that selects only approved fields and uses aliases to match the sales team's naming conventions.
D
Utilize Delta Lake's DEEP CLONE functionality to create a synchronized copy of the table with the required schema adjustments.