-
Install python3 or all-in-one toolkit (e.g. anaconda)
-
(optional) create a virtual environment
> python3 -m venv ./venv
> source ./venv/bin/activate
-
install tabpy (and other) requirements
(venv)> pip install -r requirements
-
Start local tabpy server
- Could also run on dedicated/remote server
(venv)> tabpy
- Could also run on dedicated/remote server
-
Connect Tableau to tabpy server
- local host or remote server
-
Deploy function for normalize (tabpy must be running in another terminal)
(venv)> python normalize.py
-
Provided mysql (
comments.sql
) file should be used to create acomments
table
- Operate as table calculations
- Can only pass aggregates (or ATTR) of fields
- Must return JSON-serializable object
- Select
SCRIPT_{BOOL,INT,REAL,STR}
based on return type