# Can we alter warehouse size in snowflake from dbt?

**URL:** <https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020>\
**Category:** Help\
**Tags:** snowflake\
**Created:** [October 6, 2022, 1:57pm UTC](https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020 "2022-10-06T13:57:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashishk9](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@ashishk9](https://discourse.getdbt.com/u/ashishk9)\
**Post date:** [October 6, 2022, 1:57pm UTC](https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020/1 "2022-10-06T13:57:29Z")

</div>

Hi,

Can we actually alter warehouse size in snowflake from dbt based on the table count(‘XSMALL’, ‘LARGE’, etc…) ?. If yes then should I make changes in dbt\_project.yml or need to write a macro code.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![joellabes](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/joellabes/32/3980_2.png) [@joellabes](https://discourse.getdbt.com/u/joellabes)\
**Post date:** [October 6, 2022, 7:07pm UTC](https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020/2 "2022-10-06T19:07:48Z")

</div>

You can change which warehouse size you use, see this package for an example: [GitHub - Montreal-Analytics/dbt-snowflake-utils: Snowflake-specific utility macros for dbt projects.](https://github.com/Montreal-Analytics/dbt-snowflake-utils#snowflake_utilswarehouse_size-source)

> [@ashishk9](#):
>
> based on the table count

Note sure what you mean by this though?

---

<div class="post-metadata">

**Author:** ![ashishk9](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@ashishk9](https://discourse.getdbt.com/u/ashishk9)\
**Post date:** [October 12, 2022, 7:07am UTC](https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020/3 "2022-10-12T07:07:26Z")

</div>

Hi @joellabes, I don’t want to use snowflake\_utils library for altering warehouse size. Is there any alternative to it other than snowflake\_utils library!!!?

---

<div class="post-metadata">

**Author:** ![joellabes](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/joellabes/32/3980_2.png) [@joellabes](https://discourse.getdbt.com/u/joellabes)\
**Post date:** [October 12, 2022, 7:12am UTC](https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020/4 "2022-10-12T07:12:15Z")

</div>

> [@ashishk9](#):
>
> don’t want to issue to use snowflake\_utils library for altering warehouse size

Why not? dbt packages don’t have the same dependency issues as Python libraries etc - they are just a reference to a set of normal dbt macros. See [Packages | dbt Developer Hub](https://docs.getdbt.com/docs/building-a-dbt-project/package-management) for more info.

> [@ashishk9](#):
>
> Is there any alternative to it other than snowflake\_utils library

You could make a copy of the macro from the package and incorporate it into your own project, or use it as inspiration for your own macro.

---

<div class="post-metadata">

**Author:** ![ashishk9](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@ashishk9](https://discourse.getdbt.com/u/ashishk9)\
**Post date:** [October 12, 2022, 7:29am UTC](https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020/5 "2022-10-12T07:29:03Z")

</div>

I don’t want to use it because of data theft reasons. The client has denied using snowflake\_utils library. So I am searching for an alternate solution.

---

<div class="post-metadata">

**Author:** ![joellabes](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/joellabes/32/3980_2.png) [@joellabes](https://discourse.getdbt.com/u/joellabes)\
**Post date:** [October 12, 2022, 7:43am UTC](https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020/6 "2022-10-12T07:43:42Z")

</div>

OK then the code is open source so I would recommend making a copy of it - you can independently verify its behaviour and then you will control its provenance by keeping it in your client’s project.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/a7a7ca1fe379aaf90952b0e13118a817babcd14f.png) [@system](https://discourse.getdbt.com/u/system)\
**Post date:** [October 19, 2022, 7:44am UTC](https://discourse.getdbt.com/t/can-we-alter-warehouse-size-in-snowflake-from-dbt/5020/7 "2022-10-19T07:44:21Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
