# I want to understand Matillion jobs have the highest Snowflake credit usage across a given period?

**URL:** <https://matillioncommunity.discourse.group/t/i-want-to-understand-matillion-jobs-have-the-highest-snowflake-credit-usage-across-a-given-period/2302>\
**Category:** Matillion ETL\
**Created:** [October 2, 2023, 9:37am UTC](https://matillioncommunity.discourse.group/t/i-want-to-understand-matillion-jobs-have-the-highest-snowflake-credit-usage-across-a-given-period/2302 "2023-10-02T09:37:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeelamMacwan](https://avatars.discourse-cdn.com/v4/letter/n/8baadc/32.png) [@NeelamMacwan](https://matillioncommunity.discourse.group/u/NeelamMacwan)\
**Post date:** [October 2, 2023, 9:37am UTC](https://matillioncommunity.discourse.group/t/i-want-to-understand-matillion-jobs-have-the-highest-snowflake-credit-usage-across-a-given-period/2302/1 "2023-10-02T09:37:18Z")

</div>

I just want to know if anyone has already done something like this, or can give any advise on how to start this task.

&nbsp;

Thank you.

---

<div class="post-metadata">

**Author:** ![ganesh\_pitchai](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@ganesh\_pitchai](https://matillioncommunity.discourse.group/u/ganesh_pitchai)\
**Post date:** [October 3, 2023, 4:58pm UTC](https://matillioncommunity.discourse.group/t/i-want-to-understand-matillion-jobs-have-the-highest-snowflake-credit-usage-across-a-given-period/2302/2 "2023-10-03T16:58:20Z")

</div>

[@NeelamMacwan](https://matillioncommunity.discourse.group/u/NeelamMacwan)​ My suggestion Create a dedicated warehouse for Matillion and Use that for Matillion default warehouse.

---

<div class="post-metadata">

**Author:** ![NeelamMacwan](https://avatars.discourse-cdn.com/v4/letter/n/8baadc/32.png) [@NeelamMacwan](https://matillioncommunity.discourse.group/u/NeelamMacwan)\
**Post date:** [October 4, 2023, 7:22am UTC](https://matillioncommunity.discourse.group/t/i-want-to-understand-matillion-jobs-have-the-highest-snowflake-credit-usage-across-a-given-period/2302/3 "2023-10-04T07:22:11Z")

</div>

Thanks Ganesh,

&nbsp;

we do have a specific warehouse for Matillion use, what I really need is credit consumption per job/pipeline to understand which one is costing the highest.

&nbsp;

Neelam

---

<div class="post-metadata">

**Author:** ![gshenanigan](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gshenanigan](https://matillioncommunity.discourse.group/u/gshenanigan)\
**Post date:** [October 4, 2023, 10:31am UTC](https://matillioncommunity.discourse.group/t/i-want-to-understand-matillion-jobs-have-the-highest-snowflake-credit-usage-across-a-given-period/2302/4 "2023-10-04T10:31:13Z")

</div>

We've handled this by creating dedicated warehouses for our bigger METL jobs (assessed by looking at runtime + rows affected) which allow us to track those individually. Smaller jobs use a shared generic METL warehouse at the expense of granular tracking.

---

<div class="post-metadata">

**Author:** ![NeelamMacwan](https://avatars.discourse-cdn.com/v4/letter/n/8baadc/32.png) [@NeelamMacwan](https://matillioncommunity.discourse.group/u/NeelamMacwan)\
**Post date:** [October 5, 2023, 8:23am UTC](https://matillioncommunity.discourse.group/t/i-want-to-understand-matillion-jobs-have-the-highest-snowflake-credit-usage-across-a-given-period/2302/5 "2023-10-05T08:23:42Z")

</div>

Thanks, [gshenanigan](https://metlcommunity.matillion.com/s/profile/0054G00000C3NtOQAV)

---

<div class="post-metadata">

**Author:** ![ramalingam](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/ramalingam/32/909_2.png) [@ramalingam](https://matillioncommunity.discourse.group/u/ramalingam)\
**Post date:** [October 6, 2023, 11:44am UTC](https://matillioncommunity.discourse.group/t/i-want-to-understand-matillion-jobs-have-the-highest-snowflake-credit-usage-across-a-given-period/2302/6 "2023-10-06T11:44:17Z")

</div>

[@NeelamMacwan](https://matillioncommunity.discourse.group/u/NeelamMacwan)​ Snowflake has connection level tagging for this very purpose.

You can alter the QUERY\_TAG session variable and set it to the Matillion job name or some other unique identifier for the job.

ALTER SESSION SET QUERY\_TAG = 'metl:customer\_incr\_load';

[https://docs.snowflake.com/en/sql-reference/sql/alter-session](https://docs.snowflake.com/en/sql-reference/sql/alter-session)

Then this will be available in [query\_history](https://docs.snowflake.com/en/sql-reference/account-usage/query_history) view.

SELECT \* FROM snowflake.account\_usage.query\_history

WHERE query\_tag = 'metl:customer\_incr\_load'

LIMIT 100

You can build a dashboard in Snowflake to identify top time consuming jobs using this view.

Note: Make sure to unset the query\_tag once the job is completed.
