为什么我获得' 000606(57P03):在当前会话中未选择活跃的仓库。选择一个使用'使用仓库的活动仓库'命令。'

发布于 2025-01-22 13:25:50 字数 611 浏览 2 评论 0原文

在进行“ DBT运行” 000606(57P03)时,我会遇到以下错误

:在当前会话中未选择活动仓库。使用“使用仓库”命令选择一个活动仓库。

我的个人资料具有以下条目: 角色:transform_role 模式:DBT 线程:1 类型:雪花 用户:transform_user 仓库:transform_wh

我还在雪花上运行以下内容,以将用户的默认仓库设置为transform_wh: Alter用户transform_user设置default_warehouse ='transform_wh';

但是,在执行“ DBT运行”时,我仍会遇到以下错误:

05:24:41模型my_first_dbt_model中的数据库错误(Models \ example \ my_first_dbt_model.sql)
05:24:41 000606(57P03):当前会话中未选择活跃的仓库。使用“使用仓库”命令选择一个活动仓库。 05:24:41 05:24:41在Target \ Run \ Learn_dbt \ Models \ example \ my_first_dbt_model.sql上编译了SQL 05:24:41

我看过类似的问题,但它们似乎并没有解决我的问题。感谢任何见识和/或帮助。谢谢。

I'm getting the following error when doing a 'dbt run'

000606 (57P03): No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.

My profile has the following entry:
role: transform_role
schema: dbt
threads: 1
type: snowflake
user: transform_user
warehouse: transform_wh

I have also run the following in snowflake to set the user's default warehouse to transform_wh:
alter user transform_user set DEFAULT_WAREHOUSE = 'TRANSFORM_WH';

But I'm still getting the following error when doing 'dbt run':

05:24:41 Database Error in model my_first_dbt_model (models\example\my_first_dbt_model.sql)
05:24:41 000606 (57P03): No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
05:24:41
05:24:41 compiled SQL at target\run\learn_dbt\models\example\my_first_dbt_model.sql
05:24:41

I have seen similar questions but they don't seem to resolve my issues. I would appreciate any insight and/or help. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

晨光如昨 2025-01-29 13:25:51

尝试减轻错误,您需要使用以下命令来创建一个虚拟仓库:

CREATE [ OR REPLACE ] WAREHOUSE [ IF NOT EXISTS ] <name>
   [ [ WITH ] objectProperties ]
   [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]
   [ objectParams ]

https://docs.snowflake.com/en/sql-reference/sql/create-warehouse

Try to mitigate the error, you need to create a virtual warehouse using the below command:

CREATE [ OR REPLACE ] WAREHOUSE [ IF NOT EXISTS ] <name>
   [ [ WITH ] objectProperties ]
   [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]
   [ objectParams ]

Reference: https://docs.snowflake.com/en/sql-reference/sql/create-warehouse

春庭雪 2025-01-29 13:25:50

没有更多信息,很难知道,但最有可能的原因是您的用户角色没有使用仓库的许可。

It's hard to know without more information, but the most likely cause is that your user's role doesn't have permissions to use the warehouse.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文