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.
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...
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...
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).