Snowflake Features & Architecture - Tables and Views Flashcards

1
Q

Table Type - Permanent

A
  • Default table type
  • Exists until explicitly dropped
  • Time Travel - 90 days
  • Fail-safe - yes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Table Type - Temporary

A
  • Used for transitory data
  • Persist for duration of a session
  • Time Travel - 1 day
  • Fail-safe - No
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Table Type - Transient

A
  • Exists until explicitly dropped
  • No fail-safe period
  • Time Travel - 1 day
  • Fail-safe - No
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Table Type - External

A
  • Query data outside Snowflake
  • Read-only table
  • Time Travel- 0 days
  • Fail-safe - No
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

View Type - Standard

A

CREATE VIEW MY_VIEW AS
SELECT COL1, COL2 FROM MY_TABLE;

  • Does not contribute to storage cost.
  • If source table is dropped, querying view returns error.
  • Used to restrict contents of a table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

View Type - Materialized

A

CREATE MATERIALIZED VIEW MY_VIEW AS
SELECT COL1, COL2, FROM MY_TABLE;

  • Stores results of a query definition and periodically refreshes it.
  • Incurs cost as a serverless feature.
  • Used to boost performance of external tables.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

View Type - Secure

A

CREATE SECURE VIEW MY_VIEW AS
SELECT COL1, COL2 FROM MY_TABLE;

  • Both standard and materialized can be secure.
  • Underlying query definition only visible to authorized users.
  • Some query optimizations bypassed to improve security.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly