1 2 Previous Next 15 Replies Latest reply on Apr 8, 2014 5:02 AM by Suzi King

    Counting members of groups

    Xavier P

      Hey there, I have around 1,500 groups of users with groups ranging from 1 to 150 members.  I was wondering if there was a way to display all groups where the number of users is below 10 for example.  Any tip as ever are greatly appreciated!

        • 1. Re: Counting members of groups
          Joe Mako

          In the Server Admin Guide, there is a section titled "Custom Administrative Views", currently on page 27 ,that explains how to connect the database for Tableau Server.

           

          Although, when I attempted to see if I could see group membership for users, the two tables that we would need access to are restricted.

           

          Anyone know how to access the tables without an underscore?

          • 2. Re: Counting members of groups
            James Baker

            xptr, are you talking about your data, or about Tableau Server administration?

             

            Joe, the underscore tables are the only ones allowed to the external connection. Internal (localhost) connections aren't restricted.

            • 3. Re: Counting members of groups
              Xavier P

              Hi James, my data.

              • 4. Re: Counting members of groups
                Joe Mako

                nothing attached.

                • 5. Re: Counting members of groups
                  . Danihp

                  Hi Mr Mako.. ,

                   

                  here a sample data. I think xptr question is solved on second worksheet .

                   

                  But, they are a way to parametrize 'Max Users on Group' ? (see worksheet 3, 'Filter with parameter'). I can't drag-drop a calculated field based on this parameter (like 'Group Size' in worrsheet) to filter shell.

                   

                  danihp.

                  • 6. Re: Counting members of groups
                    . Mcnike

                    James, could you clarify between external and internal connections?  Am I correct in assuming that an internal connection is one that is made from the machine on which Tableau Server is installed?

                    • 7. Re: Counting members of groups
                      James Baker

                      That's correct, McNike: from the same machine, also connecting via the "localhost" name rather than the external server name or 127.0.0.1 loopback address.

                      • 8. Re: Counting members of groups
                        . Mcnike

                        So here's a loaded question - I know Tableau is cool with me installing two instances of the Desktop for each license (one on my main machine, one on my laptop).  Must I now use up another license on the server machine to get access the back-end PostgreSQL tables? 

                         

                        Enhancement request:  What if you were to just change the permissions of the "tableau" user that we use to access this database?  Allow this user full access to all tables.  I would really prefer to access all of the tables in the Tableau db, externally.

                         

                        Another question along the same lines - if I do log in to the server machine, install Desktop and create a few dashboards using tables that are not externally accessible - could I publish these dashboards up to the server and put them on a scheduled refresh?  Will the Server be able to access its own tables?

                        • 9. Re: Counting members of groups
                          James Baker

                          Server can access its own data via a localhost connection, so your publishing plan should work.

                           

                          Changing the permissions on the "tableau" database user yourself would be technically feasible, but I have no idea what tinkering like that and lowering your security would do to your business relationship with Tableau. Merely unsupported, void your maintenance, break the EULA, I have no idea I'm just an engineer.  I think Tableau would consider exposing more tables (specifically a named list of ones that would be useful to you and why), but never all of the raw tables.

                          • 10. Re: Counting members of groups
                            . Mcnike

                            James, so I took your advice, installed 6.0.4 on the virtual machine on which my server resides, and connected to localhost.  What I'm finding is that I can connect to any table, even the protected tables.  But I am able to connect only to one table at time! 

                             

                            I tried connecting the "users" table with the "group_users" and got the following error:

                             

                            Database error 0x80004005: ERROR: permission denied for relation users;

                            Error while executing the query

                             

                            This is the query that was executed:

                             

                            SELECT 1 AS "TEMP(one0)"

                            FROM "public"."users" "users"

                              LEFT JOIN "public"."group_users" "group_users" ON ("users"."id" = "group_users"."user_id")

                            LIMIT 1

                             

                            It doesn't seem to matter what table I connect to first, Tableau won't allow me to connect to a second one.  Oh, and it doesn't allow me to retrieve any data from the table (users) once I am connected to it.

                             

                            Any ideas?

                            Nick

                            • 11. Re: Counting members of groups
                              . Mcnike

                              Looks like i'm somewhat out of luck here, I sent this question over to Support, but was told that: "Connecting to the Tableau Server database outside of the Custom Administrative Views is outside the scope of support."

                               

                              Has anyone been able to connect to the protected tables?  Or is this an open bug?

                              • 12. Re: Counting members of groups
                                Joe Mako

                                McNike, what about setting up a cron job (or some other scheduled task or process) on your Tableau Server box to pull all the tables of interest out individually and into your own data base? (or like a data dump) This would not be connecting live to the Tableau Server database, and you would not longer have their built-in security, but I believe it would give you the ability to do what you want with the data.

                                • 13. Re: Counting members of groups
                                  Mark Holtz

                                  Anyone been able to make any traction with this now that 7.0 is out?

                                   

                                  We are trying to build a custom server data view around which users see which of our projects-workbooks-views. We want to be able to group our users using the same "User Groups" that are stored on Tableau Server--which we use for security settings and quick publication to appropriate target audiences...

                                   

                                  I am able to grab the projects we assign workbooks to, but unfortunately, Tableau chose not to allow that to be exposed--the "groups" and "group-users" tables (neither with the leading underscore) we would need to join to gives me the error:

                                   

                                  "Database error 0x80004005: ERROR: permission denied for relation group_users;

                                  Error while executing the query"

                                  • 14. Re: Counting members of groups
                                    Mahomedalid Pacheco

                                    Hi all, I was able to connect to the internal database from 127.0.0.1

                                     

                                    Just use the user tblwgadmin and connect from the same machine (server) without password, that way you can access to group_users, users, etc.

                                     

                                    I connect by windows cmd with this cmd:

                                     

                                    psql --port=8060 --username=tblwgadmin workgroup

                                    1 2 Previous Next