-
Notifications
You must be signed in to change notification settings - Fork 2
Tableau Postgres set up
To get started with Tableau, you'll need to install Tableau Desktop. Follow these steps to install it:
- Visit the [Tableau Desktop download page](https://www.tableau.com/products/desktop)
- Download the Tableau Desktop installer suitable for your operating system.
- Run the installer and follow the on-screen instructions. You can generally use the default settings for a standard installation.
- After completing the installation, you should now have Tableau Desktop installed on your computer.
If you want to integrate Tableau with PostgreSQL, you'll need to install PostgreSQL. Here's how to do it on macOS:
-
Download the Interactive installer for PostgreSQL for macOS from [the official PostgreSQL download page](https://www.postgresql.org/download/macosx/).
-
Run the installer through the GUI and use the default settings. The installation path is typically
/Library/PostgreSQL/14
, and set the password to "postgres." -
Add PostgreSQL's
bin
directory to your system's PATH. You can do this by editing your shell profile. For example, if you're usingbash
, you can run:vi .bash_profile # or vi .zprofile
Then, add the following line to export the PATH:
export PATH="/Library/PostgreSQL/14/bin:$PATH"
-
Start the PostgreSQL server:
sudo -u postgres pg_ctl -D /Library/PostgreSQL/14/data start
to stop it, use:
sudo -u postgres pg_ctl -D /Library/PostgreSQL/14/data stop
To configure PostgreSQL authentication, open the following file and modify it as shown:
Open the file /var/lib/pgsql/14/data/pg_hba.conf
andmodify the file to include the following lines:
# "local" is for Unix domain socket connections only
# local user no authentication
local all all trust
# IPv4 local connections:
host all all 0.0.0.0/0 trust
# IPv6 local connections:
host all all ::1/128 trust
-
Create a new "tpch" database on your PostgreSQL server:
psql -d postgres -U postgres postgres=# CREATE DATABASE tpch;
-
Copy the data to the "tpch" database using the
pg_dump
command. Replacepg_dump_tpch_lineitem.sql
with your actual data file.psql --host localhost --port=5432 --username=postgres --password --dbname=tpch -f pg_dump_tpch_lineitem.sql
-
Your data should now be imported into the "tpch" database.
Create a configuration file named
smart-pgjdbc.config
in your main directory. The location for this file on macOS is typically/Users/{username}/smart-pgjdbc.config
. Add the following code to the file:smartjdbc.server.url=http://querybooster.ics.uci.edu:8000 #app.guid=Alice-Tableau-Twitter-Pg app.guid=Bob-Tableau-Tpch-Pg
You can manually choose to log in as Alice or Bob in QueryBooster.
To use PostgreSQL with Tableau, you need the JDBC driver. Install the JDBC driver and make sure it's located in the appropriate directory. The driver should be in /Users/{username}/Library/Tableau/Drivers
.
To run QueryBooster, follow the README.md to set up QueryBooster.