Commit 44d37c8a authored by Endre Jenei's avatar Endre Jenei

initial commit

parents
# Tableau External Service PoC
## Description
PoC for using External Web Services with Tableau (Desktop and Server).
## Installation
Install requirements and start the tabpy server:
```bash
cd <repo_directory>
virtualenv .
source bin/activate
pip install -r requirements.txt
cd lib/python2.7/site-packages/tabpy_server
nohup ./startup.sh &
```
Press Ctrl-C to quit
## Configuration
### Desktop
1. Go to `Help`/`Setting and Performance`/`Manage External Service Connection...`
2. Use `tableau-external-service.brilliant-data.net` as Server and `9004` as Port
3. Test Connection and push OK
### Server
Refer to http://onlinehelp.tableau.com/current/pro/desktop/en-us/help.html#r_connection_manage.html
```bash
tabadmin stop
tabadmin set vizqlserver.allow_insecure_scripts true
tadadmin set vizqlserver.script.disabled true
tabadmin set vizqlserver.extsvc.host tableau-external-service.brilliant-data.net
tabadmin set vizqlserver.extsvc.port 9004
tabadmin configure
tabadmin start
```
import tabpy_client
from forex_python.converter import CurrencyRates
c = CurrencyRates()
client = tabpy_client.Client('http://localhost:9004/')
def convert_to(target,value):
#print value
lst= []
rate= c.get_rate('USD',target[0])
for i in range(0,len(value)) :
lst.append(value[i]*rate)
return lst
#return convert_to(target,value)
client.deploy('convert_to',convert_to,'convert from USD', override = True)
backports-abc==0.5
backports.ssl-match-hostname==3.5.0.1
certifi==2017.11.5
chardet==3.0.4
cloudpickle==0.5.2
decorator==4.1.2
forex-python==0.3.2
functools32==3.2.3.post2
future==0.16.0
futures==3.2.0
genson==0.2.3
idna==2.6
jsonschema==2.6.0
numpy==1.13.3
python-dateutil==2.6.1
requests==2.18.4
simplejson==3.13.2
singledispatch==3.4.0.3
six==1.11.0
tabpy-client==0.2
tabpy-server==0.2
tornado==4.5.2
Tornado-JSON==1.3.2
urllib3==1.22
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment