Accesss stage name from variable

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.

 

Here is the query

 

select count(*) cnt from ${stage_name};

 

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.

 

 

@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?