Top Banner
re:dash is awesome
42

re:dash is awesome

Apr 16, 2017

Download

Technology

Hiroshi Toyama
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: re:dash is awesome

re:dash is awesome

Page 2: re:dash is awesome

 

Page 3: re:dash is awesome

Agenda1. Main Feature

2. Build

3. Programmable

4. Security

5. Our use case

6. Summary

Page 4: re:dash is awesome

Main Feature

Page 5: re:dash is awesome

Main Featuresharing query

scheduling query

Pluggable Backend

Low cost

Caching

Page 6: re:dash is awesome

sharing querycan share sql between members

We use . But ansi sql syntax is extremely hard socan review sql.

Reuse query another member.

fork can do sql

Presto

Page 7: re:dash is awesome

schedule queryrefresh interval

per minute, per hour

Specify the time

every daynot cron syntax

Page 8: re:dash is awesome

 

Page 9: re:dash is awesome

Pluggable backendssupports a great variety of data sources.

If you are making query runner, variety connect data source.

write by Python.

See.https://github.com/EverythingMe/redash/tree/master/redash/query_runner

Page 10: re:dash is awesome

Data Source

Page 11: re:dash is awesome

Low CostBusiness intelligence tool is very high cost.

If you use AWS, for small deployments t2.micro should beenough.

We regist 250 queries, using instance type is m3.medium.

memory size is 3.75GB.1 CPU.

Page 12: re:dash is awesome

Minimum effort visualizationwrite query

create graph

csv and image export

you will release from the Excel pain!

Page 13: re:dash is awesome

easy updatedownload.

With deploy runs DB migration.

one command update.

https://gist.githubusercontent.com/arikfr/440d1403b4aeb76ebaf8/raw/0d814544e37e97f08c6453ffbe9b13345d2ef39f/fabfile.py

fab -Hredash01 -uubuntu deploy_latest_release

recommended clear cache after upgrade...

Page 14: re:dash is awesome

CachingQuery Results Cache in PostgreSQL.

Do not run unnecessary SQL

See the results and come to the company in morning, notneed wait!

So Google Bigquery is Query pricing, one query results canshare.

Page 15: re:dash is awesome

Build

Page 16: re:dash is awesome

BuildSetup Script

AWS EC2 AMI

Google Compute Engine image

※ recommended to use ubuntu.

Page 17: re:dash is awesome

DependenciesPython

Nginx

Celery

Distributed Task Queue

PostgreSQL

Redis

Page 18: re:dash is awesome

WE love OSS♥can read a code.

We can trust a code.

if Well do not know behaviors, read the code.

many contributions on github.

330 closed pull requests.

Page 19: re:dash is awesome

Programmable

Page 20: re:dash is awesome

ProgrammableParameters

http API

visualization your API and your python code.

Page 21: re:dash is awesome

GET parametercan write sql by mustache template.

select * from user where = {{id}}

http://demo.redash.io/queries/146?p_id=1

start with http string become to link.

Page 22: re:dash is awesome

HTTP APIre:dash have rest API.

API KEY can be per user and per query.

curl 'https://redash/api/queries/194/results.json? \api_key=XXXXX'

API KEY can modify by user.(ver 0.8)

Page 23: re:dash is awesome

visualization your APIvisualization your json API.

See format.

Also visualization your python code, print same format.

http://docs.redash.io/en/latest/dev/results_format.html

Page 24: re:dash is awesome

security

Page 25: re:dash is awesome

Management GUIvery simply.

add user and group.

modify permission.

view event log.

execute queryviewcreateetc..

Page 26: re:dash is awesome

 

Page 27: re:dash is awesome

Audit loggingviewlogincreateapi_getupdatesubscribeunsubscribeeditexecuteautorefreshetc..

Page 28: re:dash is awesome

permission managementCan set permissions for each Member.

Grant permissions to groups.

Members belong to group.

Also, can belong to multiple groups.

Page 29: re:dash is awesome

permission managementcreate_dashboard

create_query

edit_dashboard

edit_query

view_query

view_source

execute_query

admin

Page 30: re:dash is awesome

Google Apps authenticationyou can Data linkage your google account.

defaults admin/admin account delete is better.

Can disable password login As below.

export REDASH_PASSWORD_LOGIN_ENABLED=false

Page 31: re:dash is awesome

SSL(https) ConnectionYou can connect with SSL.

Need modify nginx configuration.

see. http://docs.redash.io/en/latest/misc/ssl.html

Page 32: re:dash is awesome

Our SSL Setting

Page 33: re:dash is awesome

Other FeatureSAML Authentication

Threshold Alert

Page 34: re:dash is awesome

our use case

Page 35: re:dash is awesome

our use caseaction history and log data stores in Redshift, User andmaster data in mysql.

data analytics complete only sql as possible.

I do not want to write code as possible for analytics.

We often write complicatedly sql.

Page 36: re:dash is awesome

Using DatasourceMysql

PostgreSQL

Presto(prestogres)

redshift

Page 37: re:dash is awesome

 

Page 38: re:dash is awesome

Prestoopen source distributed SQL query engine.

Presto can join multiple data sources.

We join mysql and redshift by Presto.

Ansi SQL Syntax.

Page 39: re:dash is awesome

PrestogresPostgreSQL protocol gateway for Presto.

rewrite queries before sending Presto to PostgreSQL.

re:dash connecte with PostgreSQL protocol to presto.

But can directly connect to presto with current version.

Page 40: re:dash is awesome

Current Statusregistered 300 queries

1.8GB disk used

old chache is automatically deleteset environment.

Page 41: re:dash is awesome

Our request..date and time range filter.

scheduling query with cron syntax.

define csv encoding with environment.

Page 42: re:dash is awesome

Thanks!