I need to query a SQL Server Database and have the output written to a scalar variable, how do I achieve this in Matillion? I use a Query to Scalar component for Snowflake queries but I don’t know how we can achieve this for SQL Server
Hey @AR253900,
There may be a better way, but off the top of my head I think you could just use a Database Query component to put your query result into a Snowflake table, then use the Query Result to Scalar component to query your variable into a Matillion variable. This obviously isn't a particularly nice or clean approach, but it at least allows you to tackle the challenge.
Alternatively, depending on your Python skills you could query the SQL table and update the Matillion variable directly using Python. Again, not the cleanest approach but another possibility at least.
Cheers,
Chris