By Rohit Ray · Independent educational lesson · Explore this visual lab

Module 13 · Lesson 2 of 11Detailed study · about 22 min

Raw, curated and serving layers

Layers separate original evidence, validated business data and consumer-ready outputs. Medallion names are useful labels, not a substitute for data contracts.

Understand the idea

A city arriving as the text Pune is raw evidence. A validated customer version with an effective date is curated data. Revenue by the customer’s city at purchase time is a serving result. Each layer answers a different question.

Key ideas in simple English
ConceptWhat it means
Raw / bronzePreserve received input and lineage.
Curated / silverValidate, type and reconcile identities.
Serving / goldPublish models for specific consumers.
ContractDefine keys, allowed values, timestamps and ownership.

A concrete example

A city arriving as the text Pune is raw evidence. A validated customer version with an effective date is curated data. Revenue by the customer’s city at purchase time is a serving result. Each layer answers a different question.

Remember: Quality comes from enforced processing rules and reconciliation, not a layer name.

Explain it step by step · full theory

Understand the concept

A city arriving as the text Pune is raw evidence. A validated customer version with an effective date is curated data. Revenue by the customer’s city at purchase time is a serving result. Each layer answers a different question.

Retaining raw input helps explain a disputed number or rebuild history. It does not mean granting all analysts access to confidential payloads. Restrict raw access and apply retention policies appropriate to the information.

Apply it in practice

Our lab uses one isolated schema to stay small: INPUT_EVENTS is a delivery log, CUSTOMER_LEDGER is accepted evidence, DIM_CUSTOMER is a history model, and RUN_AUDIT records committed runs. Later lessons create them; the naming is intentional.

Schema drift belongs at an explicit boundary. A new optional raw field can be retained for review. A changed customer identifier type or missing effective timestamp must not silently redefine the curated contract.

Words used in this lesson
Raw / bronze
Preserve received input and lineage.
Curated / silver
Validate, type and reconcile identities.
Serving / gold
Publish models for specific consumers.
Contract
Define keys, allowed values, timestamps and ownership.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 2

Raw, curated and serving layers

Raw / bronze
Curated / silver
Contract

Understand the flow

Layers separate original evidence, validated business data and consumer-ready outputs. Medallion names are useful labels, not a substitute for data contracts.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Understand the flow

    Layers separate original evidence, validated business data and consumer-ready outputs. Medallion names are useful labels, not a substitute for data contracts.

  2. Apply the contract

    Quality comes from enforced processing rules and reconciliation, not a layer name.

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Before running this lesson

Manual learning exercise. Production deployment needs source-specific contracts, access controls, orchestration and operational monitoring.

Raw, curated and serving layers — SQL example

Definition: Layers separate original evidence, validated business data and consumer-ready outputs. Medallion names are useful labels, not a substitute for data contracts.

When to use: Follow the isolated customer-history lab in lesson order.

Example: Four planned lab objects. This query documents roles; it does not create them.

SQL · example
SELECT * FROM VALUES ('INPUT_EVENTS','Raw delivery evidence'),('CUSTOMER_LEDGER','Accepted source history'),('DIM_CUSTOMER','Curated Type 2 history'),('RUN_AUDIT','Operational evidence') AS layers(OBJECT_NAME,PURPOSE);

What to expect and why

Four planned lab objects. This query documents roles; it does not create them.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

Does renaming a table SILVER guarantee validated data?

Try it yourself

Explain with the example: Does renaming a table SILVER guarantee validated data?

Compare your reasoning

Quality comes from enforced processing rules and reconciliation, not a layer name.

Official sources and curriculum

Module 13 · See module scope