Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hidden gems in Redash

Hidden gems in Redash

Redash Meetup 3.0.0 の発表資料です #redashmeetup

Takuya Arita

July 10, 2018
Tweet

More Decks by Takuya Arita

Other Decks in Technology

Transcript

  1. Hidden gems in Redash
    @ariarijp

    View Slide

  2. Me
    • ariarijp (Takuya Arita / ༗ా ୓࠸)
    • Organizer of Redash Meetup
    • Contributor of getredash/redash
    • Working at Unitone inc.
    • Twitter: @ariarijp
    • Facebook: ariarijp
    • GitHub: ariarijp

    View Slide

  3. I'm going to talk about five of
    advanced features and usage in
    Redash

    View Slide

  4. Agenda
    • Query Results Data Source
    • Python Results Data Source
    • Url Results Data Source
    • Script Results Data Source
    • Extending Redash
    • Demo
    • Consulusion

    View Slide

  5. Query Results Data Source

    View Slide

  6. Query Results Data Source
    • You can use exiting Query as a Data Source
    • I guess it's popular for you guys :)
    • You can use SQLite's SQL Syntax
    • Almost Standard SQL
    • For now, you cannot use query parameters in Query Results Data Source
    • It is still discussing at forum
    • https://discuss.redash.io/t/thoughts-on-adding-support-for-queries-with-parameters-in-query-
    results-data-source/1709?source_topic_id=1736
    • https://discuss.redash.io/t/reql-query-language/1736/8

    View Slide

  7. Python Data Source

    View Slide

  8. Python Data Source
    • You can use Python scripts as a Data Source
    • You can write Python codes in the Query Editor on Redash
    • If you want to use Python Data Source, you should know some Redash's
    functions
    • Eric Feng's article and Arik's example are good reference for developers

    View Slide

  9. Url Data Source

    View Slide

  10. Url Data Source
    • You can use HTTP endpoints as a Data Source
    • HTTP Endpoints should return Redash-styled JSON
    • HTTP GET only supported
    • You cannot send HTTP request body

    View Slide

  11. Script Data Source

    View Slide

  12. Script Data Source
    • You can use any Scripts as a Data Source
    • Scripts should output Redash-styled JSON
    • This feature is insecure
    • If you want to use it, you must care about your inventories

    View Slide

  13. Extending Redash

    View Slide

  14. Extending Redash
    • You can create your own Query Runner
    • Arik (The founder of Redash) introduces how to create a query runner for
    Redash on forum
    • If you want to create Query Runner, you should know about how Redash works

    View Slide

  15. Demo
    • 1: Use Python script as Data Source
    • 2: Use hand-crafted Query Runner

    View Slide

  16. Conclusion
    • Redash has many varieties of Query Runners
    • Redash can be extended by yourself in several ways
    • Url, Script, or your own Query Runner
    • However, I guess you can solve almost all of your issues without these
    advanced features
    • If you want to use advanced features, you have to remember below
    • With great power comes great responsibility

    View Slide

  17. Happy Redash-ing!

    View Slide