Hi there,
I need to set session context before the SQL code to be able to retrieve results from the DB.
sp_set_session_context N'AccountID', 1234;
SELECT TOP (500)
account_v2.AccountId AS [account_v2.account_id]
FROM
dbo.account AS account_v2
How can I achieve this in Looker?
So the session context must be set before the SQL code is run.
Can anyone help please?
Thanks
Ashwita
Also tried passing in the DB connection:
sp_set_session_context @key = N'AccountID', @value = {{ _user_attributes['accountid'] }}
But I don’t get any results in the dashboard.
Looker support team has confirmed that there is no way to pass the session context variables from Looker. They have advised me to log a product request. Please give a thumbs up if you need this feature.