implydata / pivot

An interactive data exploration UI for Druid

Home Page:https://docs.imply.io/latest/pivot-overview/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with generating links into pivot

eunice opened this issue · comments

Hi, I'm trying to generate links into pivot by posting to /mkurl according to here (https://github.com/implydata/pivot/blob/master/docs/generating-links-into-pivot.md)

Each time, it's responding with our configuration information instead of a url.

How can I troubleshoot this? Or can you let me know under which circumstances that this would happen?

omg what?! that is so bizarre. what configuration info?
Is it responding with the HTML page (that contains a __CONFIG__) variable?
What version of Pivot are you running?

yes, I meant it's responding with the HTML page.

I'm currently running on 0.9.10

when its responding with the HTML page, what does it mean? am i inputting an incorrect JSON for the POST request?

Ok there seems to be a bug that if you input invalid JSON it gives you pack the error HTML page instead of a json friendly page. I have also updated the example a little: https://github.com/implydata/pivot/blob/master/docs/generating-links-into-pivot.md

Can you post the specifics of what you are sending and what you are getting back?

Hi,

We tried to post to our host 'http://pivot.triplelift.net/mkurl' with the JSON object below.
{ "domain": "http://pivot.triplelift.net", "dataSource": "main_daily_prod_v2", "essence": { "visualization": "table", "timezone": "Etc/UTC", "filter": "$__time.in(\"2015-09-10Z\", \"2015-09-20Z\")", "splits": ["domain"], "singleMeasure": "clicks", "selectedMeasures": ["clicks", "total_imps", "sold_imps"], "pinnedDimensions": [], "multiMeasureMode": true } }

Instead of an error page, we still get back an html page with the CONFIG variable. See below.

`

<title>Pivot (0.9.10)</title>
<script>var __CONFIG__ = {"version":"0.9.10","user":null,"dataSources":[{"name":"main_daily_prod_v2","title":"Main Daily Prod V2","engine":"druid","source":"main_daily_prod_v2","subsetFilter":null,"introspection":"none", "dimensions":[{"name":"__time","title":"Time","expression":{"op":"ref","name":"__time"},"kind":"time"},{"name":"ad_format","title":"Ad Format","expression":{"op":"chain","expression":{"op":"ref","name":"creative_library_id"},"actions":[{"action":"lookup","lookup":"ad_format_lookup"},{"action":"fallback","expression":{"op":"literal","value":"Image"}}]},"kind":"string"},{"name":"advertiser","title":"Advertiser","expression":{"op":"chain","expression":{"op":"ref","name":"advertiser_id"},"actions":[{"action":"lookup","lookup":"advertiser_lookup"},{"action":"fallback","expression":{"op":"literal","value":"unknown"}}]},"kind":"string"},..............],"maxTime":{"time":"2016-06-30T11:00:00.000Z","updated":"2016-06-30T15:29:29.367Z"}}],"linkViewConfig":null,"customization":null};</script> <script charset="UTF-8" src="/pivot.js?v=0.9.10"></script> `

Are we missing anything in the body of the POST request? Do we need to make any modifications to our config.yaml file to get the result?

Thank you for the detailed info. It looks like Pivot is getting a 404 on the /mkurl route and redirecting you to / the HTML you see is the Pivot page itself. I just went to http://pivot.triplelift.net/ and it appears to be behind a ngix proxy with basic auth - I wonder if that has something to do with it.

Were you posting to http://pivot.triplelift.net/mkurl or to the internal IP of that machine? did you include a basic auth header on your post?

I was posting to http://pivot.triplelift.net/mkurl and I did include a basic auth header.

Is there a way I can find out why the 404 happen?