mradamlacey / elasticsearch-tableau-connector

Tableau Web Data Connector for Elasticsearch
MIT License
149 stars 64 forks source link

Bad request (error 400) #3

Closed guitmz closed 8 years ago

guitmz commented 8 years ago

Hi there!

Great to see a connector for ElasticSearch (this should be something native from Tableau, of course but well..).

Sorry to bother but...

I'm having issues with the connector. I enter a valid cluster node URL, a valid index name and a valid type but I always get a Bad request response. Even using a custom query. The query works fine in the same URL via cURL. The error is the following, without custom query (big, so it's on pastebin): http://pastebin.com/fMDvCBx0 Is there anything I can do here to get more information on how to proceed?

My ES version: 1.6.0 Tableau Desktop is on latest.

Thanks

mradamlacey commented 8 years ago

Looks like here's the root cause of the issue (from the error you logs you provided):

 ScriptException[scripts of type [inline], operation [search] and lang [groovy] are disabled

The connector uses a server side script to format the date in the format that Tableau expects. This could be done client side I'm thinking with moment without too much difficulty.

Need to add a note about that in the README...

Can you try enabling scripts and see what the results are?

guitmz commented 8 years ago

Awesome, it worked! I added the following to elasticsearch.yml (v1.6, on each cluster node):

script.inline: on
script.indexed: on
script.file: on
script.search: on

After a cluster restart I was able to connect in Tableau Desktop. You should add this to the README :)

Very impressive work sir, keep it up!

Thanks