# Accesss stage name from variable

**URL:** <https://matillioncommunity.discourse.group/t/accesss-stage-name-from-variable/1465>\
**Category:** Matillion ETL\
**Created:** [September 21, 2021, 5:54pm UTC](https://matillioncommunity.discourse.group/t/accesss-stage-name-from-variable/1465 "2021-09-21T17:54:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MC203075](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@MC203075](https://matillioncommunity.discourse.group/u/MC203075)\
**Post date:** [September 21, 2021, 5:54pm UTC](https://matillioncommunity.discourse.group/t/accesss-stage-name-from-variable/1465/1 "2021-09-21T17:54:55Z")

</div>

Hello guys,

I have stored stage name in table and now trying to access the stage name through query to scalar component in orchestration job.

&nbsp;

Here is the query

&nbsp;

select count(\*) cnt from ${stage\_name};

&nbsp;

while mapping cnt to a job variable it is not allowing. It says column does not exists cnt.

Can somebody advise how to access stage name through variables.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![DataGuy](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@DataGuy](https://matillioncommunity.discourse.group/u/DataGuy)\
**Post date:** [September 22, 2021, 12:21pm UTC](https://matillioncommunity.discourse.group/t/accesss-stage-name-from-variable/1465/2 "2021-09-22T12:21:12Z")

</div>

[@MC203075](https://matillioncommunity.discourse.group/u/MC203075)​ - I am confused. Are you using a Scalar component to get the value to populate stage\_name, or you are using the stage\_name variable for the table name in the Scalar component SQL?
