Skip to content

Instantly share code, notes, and snippets.

@dcolucci
Last active May 5, 2016 19:27
Show Gist options
  • Select an option

  • Save dcolucci/d244f25616753c7802066da947d6d1a5 to your computer and use it in GitHub Desktop.

Select an option

Save dcolucci/d244f25616753c7802066da947d6d1a5 to your computer and use it in GitHub Desktop.

Sparrow Intro

In this session we went over an intro to Sparrow, other tools the data tech team are working on, and how they can be useful to Autopilot and Aviator.

materials

Sparrow documentation

Sample code

Presto

Druid

  • Druid docs

  • Druid query production endpoint: http://data.conde.io/analytics

  • Druid query CI endpoint: http://ci-druid-broker.conde.io:8082/druid/v2/?pretty

  • Required header: Content-Type: application/json

  • Sample query request body JSON:

    {
      "queryType": "topN",
      "dataSource": "sparrow-firehose-web",
      "dimension": "_t",
      "threshold": 10,
      "metric": "count",
      "granularity": "all",
      "filter": {
          "type": "and",
          "fields": [
              {"type": "selector", "dimension": "_t", "value": "app-mounted" },
              {"type": "selector", "dimension": "_o", "value": "architectural-digest"}
           ]
      },
      "aggregations": [
        {
          "type": "longSum",
          "name": "count",
          "fieldName": "count"
        }
      ],
      "intervals": [
        "2016-05-05T00:00:00.000/2016-05-06T00:00:00.000"
      ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment