Let me explain my situation:
Server A: This is my SSRS (SQL Server Reporting Services) server, which hosts all users and source connections.
SQL Server B: This server is used for query connections created in the SSRS Server. Server B has two linked server connections with Impala: one for unmasked data and one for masked data, each using a different user account created on the Hadoop side. These masking implementations are managed in Apache Atlas/Ranger.
I want to configure SSRS on Server A such that user data determines which linked server connection (masked or unmasked) is used when running queries on Server B.
Could you provide any configuration guidance for this setup?
UNMASKthe data in Server A; then you don't even need a server B. This sounds like an XY Problem to me,create View x AS select userid, * from maskedusers u cross join openquery(maskedserver, '...') oq union all select userid, * from unmaskedusers u cross join openquery(unmaskedserver, '...') oqand then select from the view based on userID