[Wranglers] Getting the current Snowflake Warehouse size that a serverless task is using

Ali, Saqib docbook.xml at gmail.com
Mon Feb 10 21:58:35 UTC 2025


I was able to use the following query to get the Warehouse size used by the
Serverless Task:

select
  name
  , query_history.warehouse_size
 -- , query_history.query_text
 -- , query_history.warehouse_name
  , query_history.start_time
  , query_history.rows_inserted
  , query_history.credits_used_cloud_services
  , query_history.*
  --, query_history.warehouse_type
  , query_history.total_elapsed_time / 60000 -- in minutes
from snowflake.account_usage.task_history
inner join snowflake.account_usage.query_history using (query_id)
where task_history.name = 'SERVERLESS_TASK_NAME' -- replace with the task
name
  and start_time > current_date - 1
--order by start_time desc
limit 1;

On Fri, Feb 7, 2025 at 11:14 AM Ali, Saqib <docbook.xml at gmail.com> wrote:

> How do I check what WH size a serverless task is currently using? We saw a
> drastic increase in the credits used for a serverless task that was
> initially deployed with:
>
> USER_TASK_MANAGED_INITIAL_WAREHOUSE_SIZE = 'XSMALL'
>
> The query executed by this task, only takes 3-4 seconds on XSMALL WH
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://analyticsengineering.net/pipermail/wranglers/attachments/20250210/65ac0bee/attachment.htm>


More information about the Wranglers mailing list