
Mixpanel: Introducing JQL, a query language to analyze and learn from data - samber
https://mixpanel.com/blog/2016/04/14/jql
======
halayli
It's not a language, but an API. They could have called it JQA and avoid a
potential Atlassian lawsuit

------
rco8786
This is a javascript library/api wrapper. However useful, it's not a
'L'anguage.

------
ranman
I wonder if the Atlassian lawyers care about this.

~~~
dudifordMann
I was just about to post that!

[https://confluence.atlassian.com/jira/advanced-
searching-179...](https://confluence.atlassian.com/jira/advanced-
searching-179442050.html)

------
pj_mukh
Just the other day I looked at a team member and said, "You know what would be
great? A Mixpanel API so I can just pull out the data I need on a regular
basis and put in on a dashboard so we are always looking at the same metrics"

BAM.

~~~
dwmintz
I don't really get it. Disclosure that I work at Looker which is an analytics
company, though not really in the same space as Mixpanel. But I'm just
confused about this latest trend of "you can get your data out!" from
analytics providers that excel at one type of analysis (as Mixpanel does with
funnels).

In my mind, the whole value of these providers is that they make that one kind
of analysis really easy and pretty. But if you feel like you're outgrowing
that and want to slice your data in new ways, I don't think you'd choose
Mixpanel for their data capture alone, right? So is it just that the cost of
Mixpanel is sunk and so might as well get the data they're already recording
out?

~~~
pj_mukh
It is simpler than that. I'm not slicing the data in different ways, I'm just
centralizing what my whole team is looking at. We've spent too much time
saying, "Hey look at the retention numbers, its so high!", "For when? I'm
seeing it go low!"

You are what you measure, this had made it easy for us to centralize our data.

------
ffumarola
Seems like this is in response to competitors offering raw access to the data.

e.g.

[https://amplitude.com/sql-queries](https://amplitude.com/sql-queries)

[https://segment.com/redshift](https://segment.com/redshift)

etc

~~~
rch
> Mixpanel lets you pull your data out at any time

[https://mixpanel.com/docs/api-documentation/data-export-
api](https://mixpanel.com/docs/api-documentation/data-export-api)

~~~
dataminded
Similar but very different. Segment and Amplitude manage the ETL and database
for you. No development or maintenace required on your end.

~~~
rch
Granted, but when we're talking about access to raw data then that's actually
what I want.

------
shubhamjain
> For instance, a multi-step funnel, segmented on a couple of columns, would
> extend to several screenfuls of complex SQL, which is cumbersome to write
> and difficult to reason about.

The only thing I loathe about SQL is its lack of re-usability. It is hard to
write reusable parts and pass them around in functions. Need ten filters which
you may / may not use? Write ten queries!

Thankfully, the problem is solved by ORMs ( SQLAlchemy, in my case ).
Certainly, in many cases, the mental mapping of map, filter and reduce makes
more sense but in the most, I have been more comfortable with using a powerful
ORM layer and SQL.

~~~
batbomb
Views and WITH statements help out quite a bit for this, though it does depend
on the database. In general, basic views are well-supported across all RDBMS.
If your database supports it, Materialized Views are amazing for the caching
of certain complex queries and reusability, and that's something SQLAlchemy
can't do by itself.

------
buremba
function main() {

while(true) {

// it's great feature but i'm not sure that javascript is the right language.
just because sql is not the best way to run analytic queries such as funnel
and retention, it doesn't mean that we need a replacement. you basically
expect all data analysts to learn javascript instead of sql.

}

}

------
developit
Seems a little outdated to stick with ES5, particularly in the examples.

~~~
tdumitrescu
A lot of es2015 syntax does work, such as arrow functions. Under the hood it's
a recent v8

