0

I have done the following steps:

  • Creating a warehouse (settings)
  • Creating a database
  • Creating a stage
  • Creating a file_format
  • Loading data into database through stage in worksheet
  • Doing different commands with the data in the database

Since I did not find any information about the warehouse functionality, I wanted to ask you guys the following: What exactly is the use the warehouse in these steps at all? Or are there any other steps after loading data into the database for example loading data into the warehouse?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Siver R
  • 13
  • 7

2 Answers2

1

The documentation provides detailed description of Virtual Warehouses:

A virtual warehouse, often referred to simply as a “warehouse”, is a cluster of compute resources in Snowflake. A warehouse provides the required resources, such as CPU, memory, and temporary storage, to perform the following operations in a Snowflake session:

  • Executing SQL SELECT statements that require compute resources (e.g. retrieving rows from tables and views).

  • Performing DML operations, such as:

  • Updating rows in tables (DELETE , INSERT , UPDATE).

  • Loading data into tables (COPY INTO ).

  • Unloading data from tables (COPY INTO ).

Note

To perform these operations, a warehouse must be running and in use for the session. While a warehouse is running, it consumes Snowflake credits.

Lukasz Szozda
  • 162,964
  • 23
  • 234
  • 275
0

This is a common confusion due to the slightly bizarre way Snowflake have used the term "warehouse". The key thing to remember is that in Snowflake a "warehouse" represents a compute resource. It has nothing to do with data storage, which is entirely separate from the compute resource.

The separation of compute and data storage is one of the keys strengths of the Snowflake platform as it enables you to have multiple, differently scaled compute resources ("warehouses") for different tasks (e.g. data transformation, reports) that all share the same data storage.

Nathan Griffiths
  • 12,277
  • 2
  • 34
  • 51
  • Thank you very much! But now i am having another question then. Snowflake says that it is managing Datawarehouses and Data Lakes. But if the Warehouse inside Snowflake is just the Compute ressource, where does snowflake manage the DWH or DL? Or does the Databases to create in Snowflake have the DWH Structure? – Siver R Jul 24 '22 at 22:38
  • "Data warehouse" and "Data lake" are just data modelling or architecture concepts so it depends on what you mean when you say that. Snowflake is a data platform and you can use it to implement either of those concepts, or some other structure of your choosing. If you're asking where Snowflake keeps the *data*, that is in the storage layer and that is organised by concepts such as "database" and "schema". I strongly recommend you read the "key concepts" section of the online documentation: https://docs.snowflake.com/en/user-guide/intro-key-concepts.html – Nathan Griffiths Jul 25 '22 at 00:29