Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

assign a value from snowflake table to a variable

Hi, there. After declaring a variable, I would like to assign a value from a snowflake query to this variable. Is there a way to do this in matillion? Thanks.

2 Community Answers

Matillion Agent  

Laura Malins —

Hi Fuming

You can do this in a python script. An example is within the python component but I have copied it below too:
cursor = context.cursor()
cursor.execute(‘select count(*) from mytable’)
rowcount = cursor.fetchone()0
context.updateVariable(‘myvar’, rowcount)


Fuming Wang —

Thanks a lot, Laura. I used it and it worked.

Post Your Community Answer

To add an answer please login