4 Replies Latest reply on May 12, 2017 8:50 AM by Stephane Cloutier

    Tabcmd and SQL Server (User Accounts)

    Stephane Cloutier

      Hello,

       

      I have posted this question in the Forums directly, but I believe I might have a better chance of getting an answer here...

       

      I am wondering if anyone has an idea on how I should be proceeding for this...

       

      We have a SQL Database that will include the users, groups and dashboards they have access to.

       

      We want to find a way to automatically refresh the list each day in Tableau Server (so Users, Groups and their access to designated dashboards) from the data in the SQL Database.

       

      Would my best bet be to schedule a task in SQL Server to dump the data into CSV files and use Tabcmd to upload those files ?

       

      What do you recommend to do this ?

        • 1. Re: Tabcmd and SQL Server (User Accounts)
          Russell Christopher

          Hey Stephane --

           

          Can you explain a little bit more about what your ultimate goal is? From your description, I can't quite tell if:

           

          • All you want to do is keep a data set (which happens to be in SQL Server and consist of user names, groups, dashboard names) up to date in Tableau
          • You want to DO something with this data - feed it to TabCmd to somehow update the ACTUAL users in your Tableau Server, switch the groups that they are in INSDIE Tableau Server, and change dashboard permissions

           

          I think you want to do the latter. If this is the case, just build your viz directly against SQL Server, and you're done. No need to jump through the dump / load hoops.

          • 2. Re: Tabcmd and SQL Server (User Accounts)
            Stephane Cloutier

            Sorry for the confusion...

             

            Our current Active Directory has about 1800 people in it.. But only about 50-70 (for now) are going to access our existing dashboards.

             

            Basically, my SQL Server would have 3 tables :

             

            TableauUsers - which lists the AD account name

            TableauGroups - which lists the Groups Names (which might need to be created) and what dashboards they can access

            TableauUserGroups - which lists which user is in which group

             

            From those SQL Tables, we want to use the TabCmd to :

                 - Wipe all Users Accounts and Groups from the Tableau Server

                 - Recreate all Groups and Users based on the data extracted from SQL (or directly if possible)

                 - All users (except Administrators) would only have Viewer permission.

             

            I hope this is clear... If not, let me know...

            • 3. Re: Tabcmd and SQL Server (User Accounts)
              Russell Christopher

              At the highest level, you could do this with TabCmd, but it would be sort of (very) painful.

               

              Using the REST API would be much cleaner.

               

              Since you want this process to fire every day, it should be as stable/dependable as possible so you don't have to waste time figuring out why something 'broke' and your Server contains the wrong users. Doing something that doesn't require you "shelling to DOS" to fire Tabcmd is therefore better =)

               

              Your biggest challenge is the "delete all users" thing. You can't delete a user who owns content on the server...which means you'll have to have ANOTHER process which switches ownership of all your workbooks to a user you 're NOT going to delete...and then possibly track WHO the original user was and switch ownership BACK to that person at the very end if they're still around. You could probably do something like de-license (rather than delete) each user and then only re-license users till in your table, etc. 

               

              See how complex this is getting?

               

              Sooo...at the highest level, what is the basic requirement that is making you think about the "steps" you've detailed above Why are you conisdering this in the first place? There may be an easier way to accomplish the same goal, or you may be able to negotiate something that is "good enough" without having to get so complex to get there...

              • 4. Re: Tabcmd and SQL Server (User Accounts)
                Stephane Cloutier

                We have but a small development team that create and publish dashboards to the server. After they are publish, we transfer ownership to a generic Administrator account that is used only on TableauServer - so ownership is not a problem.

                 

                As to why we are thinking of going like I had described, basically is because as we start publishing more dashboard through server, we will be getting request from managers stating "please X and Y to this dashboard..." where the persons might be here only for a couple of months (BTW I forgot to inform you that I am working in the Federal Goverment)...

                 

                Any ino you can provide me regarding the REST API you are talking about (I will check on my side, but anything is always welcome).