from a lambda function in AWS I am calling a stored procedure in Snowflake. I run python code and use sqlalchemy and snowflake.sqlalchemy modules to call the snowflake stored proc. the stored procedure queries a table with one row and one column, does a simple calculation and returns a single value. The code looks like this:
result=connection.execute('CALL TEST_GET_PARAMS(8,8);')
sql='select * from CALCRESULT;'
rows = result.fetchone()
print(rows)
print (type(rows))
the return looks like this:
(160.0,)
<class 'sqlalchemy.engine.result.RowProxy'>
However, I want to value to be an int value without the ( ) and ,
I am assuming my problem is in the use of fetchone and then how take the first column out of the result, but I don't know how to do it.
Any suggestions?