Skip to content

Commit d37ca73

Browse files
authored
[CHORE] adjust warehouses to reduce cost (#181)
* adjust warehouses --------- Co-authored-by: TJ Murphy <[email protected]>
1 parent c1e148e commit d37ca73

8 files changed

+24
-10
lines changed

examples/dbt-labs-how-we-configure-snowflake.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,21 @@ databases:
2525
warehouses:
2626
- name: loading
2727
warehouse_size: XSMALL
28-
auto_suspend: 60
28+
auto_suspend: 30
2929
auto_resume: true
30+
initially_suspended: true
3031
comment: "Tools like Fivetran and Stitch will use this warehouse to perform their regular loads of new data. We separate this workload from the other workloads because, at scale, loading can put significant strain on your warehouse and we don't want to cause slowness for your BI users."
3132
- name: transforming
3233
warehouse_size: XSMALL
33-
auto_suspend: 60
34+
auto_suspend: 30
3435
auto_resume: true
36+
initially_suspended: true
3537
comment: "This is the warehouse that dbt will use to perform all data transformations. It will only be in use (and charging you credits) when regular jobs are being run."
3638
- name: reporting
3739
warehouse_size: XSMALL
38-
auto_suspend: 60
40+
auto_suspend: 30
3941
auto_resume: true
42+
initially_suspended: true
4043
comment: "Mode and any other BI tools will connect to this warehouse to run analytical queries and report the results to end users. This warehouse will be spun up only when a user is actively running a query against it."
4144

4245
grants:

examples/dicom-image-classification-to-detect-pneumonia.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ schemas:
2222

2323
warehouses:
2424
- name: snowopt_wh
25-
warehouse_size: LARGE
26-
auto_suspend: 120
25+
warehouse_size: XSMALL
26+
auto_suspend: 30
2727
auto_resume: true
28+
initially_suspended: true
2829
comment: "Warehouse optimized for model training and heavy computations."
2930
- name: standard_wh
30-
warehouse_size: MEDIUM
31-
auto_suspend: 120
31+
warehouse_size: XSMALL
32+
auto_suspend: 30
3233
auto_resume: true
34+
initially_suspended: true
3335
comment: "General purpose warehouse for regular workloads."
3436

3537
stages:

examples/snowflake-tutorials-create-your-first-iceberg-table.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ warehouses:
3030
- name: iceberg_tutorial_wh
3131
owner: iceberg_tutorial_role
3232
warehouse_size: XSMALL
33-
auto_suspend: 60
33+
auto_suspend: 30
3434
auto_resume: true
35+
initially_suspended: true
3536

3637
grants:
3738
- GRANT CREATE DATABASE ON ACCOUNT TO ROLE iceberg_tutorial_role

tests/fixtures/json/warehouse.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"max_cluster_count": 1,
77
"min_cluster_count": 1,
88
"scaling_policy": "STANDARD",
9-
"auto_suspend": 60,
9+
"auto_suspend": 30,
1010
"auto_resume": false,
1111
"initially_suspended": true,
1212
"resource_monitor": null,

tests/fixtures/sql/warehouse.sql

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ CREATE WAREHOUSE lowercase_wh
1818
warehouse_size = x6large
1919
warehouse_type = snowpark-optimized
2020
scaling_policy = economy
21+
initially_suspended = true
2122
;
2223

2324

tests/integration/test_lifecycle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_task_lifecycle(cursor, suffix, marked_for_cleanup):
144144
owner=TEST_ROLE,
145145
comment="This is a test task modified",
146146
allow_overlapping_execution=False,
147-
user_task_managed_initial_warehouse_size="LARGE",
147+
user_task_managed_initial_warehouse_size="XSMALL",
148148
user_task_timeout_ms=2000,
149149
suspend_task_after_num_failures=2,
150150
config='{"output_dir": "/temp/test_directory/", "learning_rate": 0.2}',

tests/integration/test_resources.py

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def test_fetch_warehouse_snowpark_optimized(cursor, suffix, marked_for_cleanup):
120120
name=f"TEST_FETCH_WAREHOUSE_SNOWPARK_OPTIMIZED_{suffix}",
121121
warehouse_type="SNOWPARK-OPTIMIZED",
122122
warehouse_size="MEDIUM",
123+
initially_suspended=True,
123124
)
124125

125126
cursor.execute(warehouse.create_sql())

tools/test_account_configs/base.yml

+6
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,14 @@ views:
293293

294294
warehouses:
295295
- name: static_warehouse
296+
warehouse_size: XSMALL
297+
auto_suspend: 30
298+
auto_resume: true
299+
initially_suspended: true
296300
- name: CI
297301
warehouse_size: XSMALL
302+
auto_suspend: 30
303+
initially_suspended: true
298304

299305

300306

0 commit comments

Comments
 (0)