follow the steps below to connect to and query the database. The username you use will depend on which database views and tables you want to use.
- In Tableau Desktop select Data > Connect to Data, then select PostgreSQL as the database to connect to. You may need to install the PostgreSQL database drivers. You can download drivers from www.tableau.com/drivers.
- In the PostgreSQL connection dialog box, enter the name or URL for Tableau Server in the Server box. If you have a distributed server installation and a worker is hosting the repository, enter the name of the worker instead. If you are using an Apache load balancer, enter the actual name or ip address of the database server rather than the Tableau Server name.You should connect using the port you have set up for the pgsql.port, which is 8060 by default. For more information about ports, see Tableau Server Ports.Note: The dbpass command does not open any ports in the firewall. You may need to manually open the port in any firewall between your external client and the Tableau Server database.
- Enter
workgroup
as the Database to connect to. - Connect using one of the following users and the password you specified:
- Username: tableau or readonly
- Password: The password you specified when you enabled access to the Tableau Server database for the specified user
- Click Connect.
- Select one or more tables to connect to.The "tableau" user has access to all of the tables that start with an underscore or with hist_. For example, you can connect to_background_tasks and _datasources. The tables that begin with historical_ point to hist_ tables. The hist_ tables include information about server users that isn't currently presented in the Actions by Specific User view. The "readonly" user has access to additional tables that can be used to query other information about server usage.
- Click Go to Worksheet.
No comments:
Post a Comment