2 Replies Latest reply on Aug 9, 2018 11:12 PM by Arnab Chaudhury

    Switch between user filters security and database table joined security

    Arnab Chaudhury

      Hi Experts,

       

       

      I have a requirement implementing two security models on the same data source. One with user filter and another with database level security. However I need to switch between the security models based on scenarios.

       

      The User filter are applied and placed on the filter shelf as usual.

       

      Database level security is applied with join with a security table whose data is filter based on the logged in user.  This is achieved through Initial SQL to set SPID according to the user logged in and the Custom SQL  to fetch the records belonging only to the logged in user.

      I have used the reference of this blog to achieve this:https://tableauandbehold.com/2016/03/09/using-initial-sql-for/

       

       

      Now I will have to switch between these two security models based on

      1) if the user is present in a particular Tableau server country or Territory group then activate the user filters

      2) else if absent apply the database security model

       

      Any ideas will be helpful. Can this be achieved with two data sources i.e. apply user filters in one data source and database security in another and then union them?

       

      Thanks in advance.