Code Monkey home page Code Monkey logo

druid-satori-demo's Introduction

๐ŸŒŠ Integrate Druid and Satori in about 50 lines of Python ๐ŸŒŠ

=======

Overview

This example streams and indexes data from Satori's cryptocurrency-market-data channel. From there you can analyze the data with SQL or put a Superset visualization layer on top.

If you're lazy just watch the video.

Pre-requisites

A Satori account is required. You need an app key to pull data. Visit https://www.satori.com/ to get one.

Python, Druid and Kafka are required. Hive is optional but worth the visit. Hortonworks HDP 2.6+ gives you everything you need.

  • Ingestion scripts assume Kafka is running on the standard default port (9092) rather than the one Ambari installs it on (whatever that may be). You may need to override the port number using the -k option.
  • Hive 2 is assumed to be running on port 10000. Ambari will launch it on port 10500. Override it with an extra argument to 05hive_external_table.sh

Procedure

  • Run 00setup.sh to install Python dependencies (or you can resolve them manually).
  • Edit 01satori_cryptocurrency_kafka.py to put in your personal app key. You can get that from the Satori website.
  • Run 01satori_cryptocurrency_kafka.py to ingest data. If needed, run 01satori_cryptocurrency_kafka.py -k kafka:port. Leave that running on a dedicated terminal.
  • Run 03start_supervisor.sh to start indexing.
  • Run 04query_rest.sh to query the data. It will take a moment or two before any results come back.

Help Building Your Own

02suggest_supervisor_spec.py will peek into Kafka and suggest a supervisor spec for you. The spec requires a bit of editing but helps you get started. You should be able to bring in any data source you like from Satori if you favor something else.

Fun Fact

Github projects that use emojis in their descriptions get more stars for no good reason.

druid-satori-demo's People

Contributors

cartershanklin avatar zaratsian avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.