sql-jarvis 1.8.0 → 1.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -0
- data/.github/ISSUE_TEMPLATE.md +7 -0
- data/CHANGELOG.md +17 -1
- data/CONTRIBUTING.md +42 -0
- data/LICENSE.txt +1 -1
- data/README.md +121 -78
- data/app/assets/javascripts/blazer/application.js +1 -0
- data/app/assets/javascripts/blazer/select2.js +5833 -0
- data/app/assets/stylesheets/blazer/application.css +1 -0
- data/app/assets/stylesheets/blazer/select2.min.css +1 -0
- data/app/controllers/blazer/base_controller.rb +11 -2
- data/app/controllers/blazer/queries_controller.rb +29 -15
- data/app/models/blazer/query.rb +15 -0
- data/app/views/blazer/_variables.html.erb +1 -1
- data/app/views/blazer/queries/_form.html.erb +13 -3
- data/app/views/blazer/queries/run.html.erb +2 -0
- data/app/views/blazer/queries/schema.html.erb +2 -0
- data/app/views/blazer/queries/show.html.erb +1 -1
- data/blazer.gemspec +2 -1
- data/lib/blazer.rb +32 -7
- data/lib/blazer/adapters/bigquery_adapter.rb +5 -4
- data/lib/blazer/adapters/cassandra_adapter.rb +59 -0
- data/lib/blazer/adapters/druid_adapter.rb +67 -0
- data/lib/blazer/adapters/snowflake_adapter.rb +73 -0
- data/lib/blazer/data_source.rb +18 -16
- data/lib/blazer/engine.rb +10 -8
- data/lib/blazer/version.rb +1 -1
- data/lib/generators/blazer/templates/{config.yml → config.yml.tt} +5 -4
- data/lib/generators/blazer/templates/{install.rb → install.rb.tt} +1 -0
- data/lib/tasks/blazer.rake +1 -1
- data/sql-jarvis-1.9.4.gem +0 -0
- data/sql-jarvis-1.9.5.gem +0 -0
- metadata +30 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1955fca26a63e1f2ffdedb671c1fdf3f151a931
|
4
|
+
data.tar.gz: 5f46942561c29e99cc9406ebf013b3196ea94f6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11f3e01c54004114a906921897a007412be4381d282025103895d359a4dcc0d57f33f98496c2f3d62fe17165ab3648905a8cbefa06a3394ec775f63c07481057
|
7
|
+
data.tar.gz: 51c7cadfdd95d77870a00551cbe70ce6aaef4f0d7b62acceef64c5c0e2bb0728b6391f3e83af8ae0001e01705734acb92d6a4b1d94596f73fae4f50a55f29230
|
data/.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
app/assets/* linguist-vendored
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
|
-
## 1.
|
1
|
+
## 1.9.1 [unreleased]
|
2
|
+
|
3
|
+
- Fixed error with latest `google-cloud-bigquery`
|
4
|
+
|
5
|
+
## 1.9.0
|
6
|
+
|
7
|
+
- Prompt developers to check custom `before_action`
|
8
|
+
- Better ordering on home page
|
9
|
+
- Added support for Snowflake
|
10
|
+
|
11
|
+
## 1.8.2
|
12
|
+
|
13
|
+
- Added support for Cassandra
|
14
|
+
- Fixes for Druid
|
15
|
+
|
16
|
+
## 1.8.1
|
2
17
|
|
3
18
|
- Added support for Amazon Athena
|
19
|
+
- Added support for Druid
|
4
20
|
- Fixed query cancellation
|
5
21
|
|
6
22
|
## 1.8.0
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
First, thanks for wanting to contribute. You’re awesome! :heart:
|
4
|
+
|
5
|
+
## Help
|
6
|
+
|
7
|
+
We’re not able to provide support through GitHub Issues. If you’re looking for help with your code, try posting on [Stack Overflow](https://stackoverflow.com/).
|
8
|
+
|
9
|
+
All features should be documented. If you don’t see a feature in the docs, assume it doesn’t exist.
|
10
|
+
|
11
|
+
## Bugs
|
12
|
+
|
13
|
+
Think you’ve discovered a bug?
|
14
|
+
|
15
|
+
1. Search existing issues to see if it’s been reported.
|
16
|
+
2. Try the `master` branch to make sure it hasn’t been fixed.
|
17
|
+
|
18
|
+
```rb
|
19
|
+
gem "blazer", github: "ankane/blazer"
|
20
|
+
```
|
21
|
+
|
22
|
+
If the above steps don’t help, create an issue. Include:
|
23
|
+
|
24
|
+
- Detailed steps to reproduce
|
25
|
+
- Complete backtraces for exceptions
|
26
|
+
|
27
|
+
## New Features
|
28
|
+
|
29
|
+
If you’d like to discuss a new feature, create an issue and start the title with `[Idea]`.
|
30
|
+
|
31
|
+
## Pull Requests
|
32
|
+
|
33
|
+
Fork the project and create a pull request. A few tips:
|
34
|
+
|
35
|
+
- Keep changes to a minimum. If you have multiple features or fixes, submit multiple pull requests.
|
36
|
+
- Follow the existing style. The code should read like it’s written by a single person.
|
37
|
+
|
38
|
+
Feel free to open an issue to get feedback on your idea before spending too much time on it.
|
39
|
+
|
40
|
+
---
|
41
|
+
|
42
|
+
This contributing guide is released under [CCO](https://creativecommons.org/publicdomain/zero/1.0/) (public domain). Use it for your own project without attribution.
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -4,9 +4,9 @@ Explore your data with SQL. Easily create charts and dashboards, and share them
|
|
4
4
|
|
5
5
|
[Try it out](https://blazer.dokkuapp.com)
|
6
6
|
|
7
|
-
[![Screenshot](https://
|
7
|
+
[![Screenshot](https://blazer.dokkuapp.com/assets/screenshot-6ca3115a518b488026e48be83ba0d4c9.png)](https://blazer.dokkuapp.com)
|
8
8
|
|
9
|
-
:envelope: [Get notified of updates](
|
9
|
+
:envelope: [Get notified of updates](https://eepurl.com/cbUwsD)
|
10
10
|
|
11
11
|
:tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
|
12
12
|
|
@@ -37,8 +37,8 @@ gem 'blazer'
|
|
37
37
|
Run:
|
38
38
|
|
39
39
|
```sh
|
40
|
-
rails
|
41
|
-
|
40
|
+
rails generate blazer:install
|
41
|
+
rails db:migrate
|
42
42
|
```
|
43
43
|
|
44
44
|
And mount the dashboard in your `config/routes.rb`:
|
@@ -60,7 +60,7 @@ Blazer tries to protect against queries which modify data (by running each query
|
|
60
60
|
Be sure to set a host in `config/environments/production.rb` for emails to work.
|
61
61
|
|
62
62
|
```ruby
|
63
|
-
config.action_mailer.default_url_options = {host: "
|
63
|
+
config.action_mailer.default_url_options = {host: "blazer.dokkuapp.com"}
|
64
64
|
```
|
65
65
|
|
66
66
|
Schedule checks to run (with cron, [Heroku Scheduler](https://elements.heroku.com/addons/scheduler), etc). The default options are every 5 minutes, 1 hour, or 1 day, which you can customize. For each of these options, set up a task to run.
|
@@ -123,7 +123,7 @@ Also, make sure authorization is enabled when you start the server.
|
|
123
123
|
|
124
124
|
### Sensitive Data
|
125
125
|
|
126
|
-
|
126
|
+
Check out [Hypershield](https://github.com/ankane/hypershield) to shield sensitive data.
|
127
127
|
|
128
128
|
## Authentication
|
129
129
|
|
@@ -141,7 +141,7 @@ ENV["BLAZER_PASSWORD"] = "secret"
|
|
141
141
|
### Devise
|
142
142
|
|
143
143
|
```ruby
|
144
|
-
authenticate :user, ->
|
144
|
+
authenticate :user, ->(user) { user.admin? } do
|
145
145
|
mount Blazer::Engine, at: "blazer"
|
146
146
|
end
|
147
147
|
```
|
@@ -151,18 +151,20 @@ end
|
|
151
151
|
Specify a `before_action` method to run in `blazer.yml`.
|
152
152
|
|
153
153
|
```yml
|
154
|
-
|
154
|
+
before_action_method: require_admin
|
155
155
|
```
|
156
156
|
|
157
|
-
|
157
|
+
You can define this method in your `ApplicationController`.
|
158
158
|
|
159
159
|
```ruby
|
160
160
|
def require_admin
|
161
|
-
# depending on your auth,
|
162
|
-
current_user && current_user.admin?
|
161
|
+
# depending on your auth, something like...
|
162
|
+
redirect_to root_path unless current_user && current_user.admin?
|
163
163
|
end
|
164
164
|
```
|
165
165
|
|
166
|
+
Be sure to render or redirect for unauthorized users.
|
167
|
+
|
166
168
|
## Queries
|
167
169
|
|
168
170
|
### Variables
|
@@ -173,7 +175,7 @@ Create queries with variables.
|
|
173
175
|
SELECT * FROM users WHERE gender = {gender}
|
174
176
|
```
|
175
177
|
|
176
|
-
Use `{start_time}` and `{end_time}` for time ranges. [Example](https://
|
178
|
+
Use `{start_time}` and `{end_time}` for time ranges. [Example](https://blazer.dokkuapp.com/queries/9-time-range-selector?start_time=1997-10-03T05%3A00%3A00%2B00%3A00&end_time=1997-10-04T04%3A59%3A59%2B00%3A00)
|
177
179
|
|
178
180
|
```sql
|
179
181
|
SELECT * FROM ratings WHERE rated_at >= {start_time} AND rated_at <= {end_time}
|
@@ -181,7 +183,7 @@ SELECT * FROM ratings WHERE rated_at >= {start_time} AND rated_at <= {end_time}
|
|
181
183
|
|
182
184
|
### Smart Variables
|
183
185
|
|
184
|
-
[Example](https://
|
186
|
+
[Example](https://blazer.dokkuapp.com/queries/1-smart-variable)
|
185
187
|
|
186
188
|
Suppose you have the query:
|
187
189
|
|
@@ -210,19 +212,19 @@ smart_variables:
|
|
210
212
|
|
211
213
|
### Linked Columns
|
212
214
|
|
213
|
-
[Example](https://
|
215
|
+
[Example](https://blazer.dokkuapp.com/queries/3-linked-column) - title column
|
214
216
|
|
215
217
|
Link results to other pages in your apps or around the web. Specify a column name and where it should link to. You can use the value of the result with `{value}`.
|
216
218
|
|
217
219
|
```yml
|
218
220
|
linked_columns:
|
219
221
|
user_id: "/admin/users/{value}"
|
220
|
-
ip_address: "
|
222
|
+
ip_address: "https://www.infosniper.net/index.php?ip_address={value}"
|
221
223
|
```
|
222
224
|
|
223
225
|
### Smart Columns
|
224
226
|
|
225
|
-
[Example](https://
|
227
|
+
[Example](https://blazer.dokkuapp.com/queries/2-smart-column) - occupation_id column
|
226
228
|
|
227
229
|
Suppose you have the query:
|
228
230
|
|
@@ -275,13 +277,13 @@ Blazer will automatically generate charts based on the types of the columns retu
|
|
275
277
|
|
276
278
|
There are two ways to generate line charts.
|
277
279
|
|
278
|
-
2+ columns - timestamp, numeric(s) - [Example](https://
|
280
|
+
2+ columns - timestamp, numeric(s) - [Example](https://blazer.dokkuapp.com/queries/4-line-chart-format-1)
|
279
281
|
|
280
282
|
```sql
|
281
283
|
SELECT date_trunc('week', created_at), COUNT(*) FROM users GROUP BY 1
|
282
284
|
```
|
283
285
|
|
284
|
-
3 columns - timestamp, string, numeric - [Example](https://
|
286
|
+
3 columns - timestamp, string, numeric - [Example](https://blazer.dokkuapp.com/queries/5-line-chart-format-2)
|
285
287
|
|
286
288
|
|
287
289
|
```sql
|
@@ -292,13 +294,13 @@ SELECT date_trunc('week', created_at), gender, COUNT(*) FROM users GROUP BY 1, 2
|
|
292
294
|
|
293
295
|
There are also two ways to generate column charts.
|
294
296
|
|
295
|
-
2+ columns - string, numeric(s) - [Example](https://
|
297
|
+
2+ columns - string, numeric(s) - [Example](https://blazer.dokkuapp.com/queries/6-column-chart-format-1)
|
296
298
|
|
297
299
|
```sql
|
298
300
|
SELECT gender, COUNT(*) FROM users GROUP BY 1
|
299
301
|
```
|
300
302
|
|
301
|
-
3 columns - string, string, numeric - [Example](https://
|
303
|
+
3 columns - string, string, numeric - [Example](https://blazer.dokkuapp.com/queries/7-column-chart-format-2)
|
302
304
|
|
303
305
|
```sql
|
304
306
|
SELECT gender, zip_code, COUNT(*) FROM users GROUP BY 1, 2
|
@@ -314,7 +316,7 @@ SELECT x, y FROM table
|
|
314
316
|
|
315
317
|
### Maps
|
316
318
|
|
317
|
-
Columns named `latitude` and `longitude` or `lat` and `lon` or `lat` and `lng` - [Example](https://
|
319
|
+
Columns named `latitude` and `longitude` or `lat` and `lon` or `lat` and `lng` - [Example](https://blazer.dokkuapp.com/queries/15-map)
|
318
320
|
|
319
321
|
```sql
|
320
322
|
SELECT name, latitude, longitude FROM cities
|
@@ -324,7 +326,7 @@ To enable, get an access token from [Mapbox](https://www.mapbox.com/) and set `E
|
|
324
326
|
|
325
327
|
### Targets
|
326
328
|
|
327
|
-
Use the column name `target` to draw a line for goals. [Example](https://
|
329
|
+
Use the column name `target` to draw a line for goals. [Example](https://blazer.dokkuapp.com/queries/8-target-line)
|
328
330
|
|
329
331
|
```sql
|
330
332
|
SELECT date_trunc('week', created_at), COUNT(*) AS new_users, 100000 AS target FROM users GROUP BY 1
|
@@ -332,7 +334,7 @@ SELECT date_trunc('week', created_at), COUNT(*) AS new_users, 100000 AS target F
|
|
332
334
|
|
333
335
|
## Dashboards
|
334
336
|
|
335
|
-
Create a dashboard with multiple queries. [Example](https://
|
337
|
+
Create a dashboard with multiple queries. [Example](https://blazer.dokkuapp.com/dashboards/1-dashboard-demo)
|
336
338
|
|
337
339
|
If the query has a chart, the chart is shown. Otherwise, you’ll see a table.
|
338
340
|
|
@@ -340,7 +342,7 @@ If any queries have variables, they will show up on the dashboard.
|
|
340
342
|
|
341
343
|
## Checks
|
342
344
|
|
343
|
-
Checks give you a centralized place to see the health of your data. [Example](https://
|
345
|
+
Checks give you a centralized place to see the health of your data. [Example](https://blazer.dokkuapp.com/checks)
|
344
346
|
|
345
347
|
Create a query to identify bad rows.
|
346
348
|
|
@@ -392,19 +394,22 @@ data_sources:
|
|
392
394
|
|
393
395
|
### Full List
|
394
396
|
|
395
|
-
- [
|
396
|
-
- [MySQL](#mysql-1)
|
397
|
-
- [SQL Server](#sql-server)
|
398
|
-
- [Oracle](#oracle)
|
399
|
-
- [IBM DB2 and Informix](#ibm-db2-and-informix)
|
400
|
-
- [SQLite](#sqlite)
|
397
|
+
- [Amazon Athena](#amazon-athena)
|
401
398
|
- [Amazon Redshift](#amazon-redshift)
|
402
|
-
- [Amazon Athena](#amazon-athena-master) [master]
|
403
|
-
- [Presto](#presto)
|
404
399
|
- [Apache Drill](#apache-drill)
|
400
|
+
- [Cassandra](#cassandra)
|
401
|
+
- [Druid](#druid)
|
402
|
+
- [Elasticsearch](#elasticsearch) [beta]
|
405
403
|
- [Google BigQuery](#google-bigquery)
|
404
|
+
- [IBM DB2 and Informix](#ibm-db2-and-informix)
|
406
405
|
- [MongoDB](#mongodb-1)
|
407
|
-
- [
|
406
|
+
- [MySQL](#mysql-1)
|
407
|
+
- [Oracle](#oracle)
|
408
|
+
- [PostgreSQL](#postgresql-1)
|
409
|
+
- [Presto](#presto)
|
410
|
+
- [Snowflake](#snowflake)
|
411
|
+
- [SQLite](#sqlite)
|
412
|
+
- [SQL Server](#sql-server)
|
408
413
|
|
409
414
|
You can also [create an adapter](#creating-an-adapter) for any other data store.
|
410
415
|
|
@@ -416,128 +421,162 @@ data_sources:
|
|
416
421
|
url: <%= ENV["BLAZER_MY_SOURCE_URL"] %>
|
417
422
|
```
|
418
423
|
|
419
|
-
###
|
424
|
+
### Amazon Athena
|
420
425
|
|
421
|
-
Add [
|
426
|
+
Add [aws-sdk-athena](https://github.com/aws/aws-sdk-ruby) and [aws-sdk-glue](https://github.com/aws/aws-sdk-ruby) to your Gemfile and set:
|
422
427
|
|
423
428
|
```yml
|
424
429
|
data_sources:
|
425
430
|
my_source:
|
426
|
-
|
431
|
+
adapter: athena
|
432
|
+
database: database
|
433
|
+
output_location: s3://some-bucket/
|
427
434
|
```
|
428
435
|
|
429
|
-
###
|
436
|
+
### Amazon Redshift
|
430
437
|
|
431
|
-
Add [
|
438
|
+
Add [activerecord4-redshift-adapter](https://github.com/aamine/activerecord4-redshift-adapter) or [activerecord5-redshift-adapter](https://github.com/ConsultingMD/activerecord5-redshift-adapter) to your Gemfile and set:
|
432
439
|
|
433
440
|
```yml
|
434
441
|
data_sources:
|
435
442
|
my_source:
|
436
|
-
url:
|
443
|
+
url: redshift://user:password@hostname:5439/database
|
437
444
|
```
|
438
445
|
|
439
|
-
###
|
446
|
+
### Apache Drill
|
440
447
|
|
441
|
-
Add [
|
448
|
+
Add [drill-sergeant](https://github.com/ankane/drill-sergeant) to your Gemfile and set:
|
442
449
|
|
443
450
|
```yml
|
444
451
|
data_sources:
|
445
452
|
my_source:
|
446
|
-
|
453
|
+
adapter: drill
|
454
|
+
url: http://hostname:8047
|
447
455
|
```
|
448
456
|
|
449
|
-
###
|
457
|
+
### Cassandra
|
450
458
|
|
451
|
-
|
459
|
+
Add [cassandra-driver](https://github.com/datastax/ruby-driver) to your Gemfile and set:
|
452
460
|
|
453
|
-
|
461
|
+
```yml
|
462
|
+
data_sources:
|
463
|
+
my_source:
|
464
|
+
url: cassandra://user:password@hostname:9042/keyspace
|
465
|
+
```
|
454
466
|
|
455
|
-
|
467
|
+
### Druid
|
456
468
|
|
457
|
-
|
469
|
+
First, [enable SQL support](http://druid.io/docs/latest/querying/sql.html#configuration) on the broker.
|
458
470
|
|
459
|
-
|
471
|
+
Set:
|
460
472
|
|
461
473
|
```yml
|
462
474
|
data_sources:
|
463
475
|
my_source:
|
464
|
-
|
476
|
+
adapter: druid
|
477
|
+
url: http://hostname:8082
|
465
478
|
```
|
466
479
|
|
467
|
-
###
|
480
|
+
### Elasticsearch
|
468
481
|
|
469
|
-
Add [
|
482
|
+
Add [elasticsearch](https://github.com/elastic/elasticsearch-ruby) to your Gemfile and set:
|
470
483
|
|
471
484
|
```yml
|
472
485
|
data_sources:
|
473
486
|
my_source:
|
474
|
-
|
487
|
+
adapter: elasticsearch
|
488
|
+
url: http://user:password@hostname:9200
|
475
489
|
```
|
476
490
|
|
477
|
-
###
|
491
|
+
### Google BigQuery
|
478
492
|
|
479
|
-
Add [
|
493
|
+
Add [google-cloud-bigquery](https://github.com/GoogleCloudPlatform/google-cloud-ruby/tree/master/google-cloud-bigquery) to your Gemfile and set:
|
480
494
|
|
481
495
|
```yml
|
482
496
|
data_sources:
|
483
497
|
my_source:
|
484
|
-
adapter:
|
485
|
-
|
486
|
-
|
498
|
+
adapter: bigquery
|
499
|
+
project: your-project
|
500
|
+
keyfile: path/to/keyfile.json
|
487
501
|
```
|
488
502
|
|
489
|
-
###
|
503
|
+
### IBM DB2 and Informix
|
490
504
|
|
491
|
-
|
505
|
+
Use [ibm_db](https://github.com/ibmdb/ruby-ibmdb).
|
506
|
+
|
507
|
+
### MongoDB
|
508
|
+
|
509
|
+
Add [mongo](https://github.com/mongodb/mongo-ruby-driver) to your Gemfile and set:
|
492
510
|
|
493
511
|
```yml
|
494
512
|
data_sources:
|
495
513
|
my_source:
|
496
|
-
url:
|
514
|
+
url: mongodb://user:password@hostname:27017/database
|
497
515
|
```
|
498
516
|
|
499
|
-
###
|
517
|
+
### MySQL
|
500
518
|
|
501
|
-
Add [
|
519
|
+
Add [mysql2](https://github.com/brianmario/mysql2) to your Gemfile (if it’s not there) and set:
|
502
520
|
|
503
521
|
```yml
|
504
522
|
data_sources:
|
505
523
|
my_source:
|
506
|
-
|
507
|
-
url: http://hostname:8047
|
524
|
+
url: mysql2://user:password@hostname:3306/database
|
508
525
|
```
|
509
526
|
|
510
|
-
###
|
527
|
+
### Oracle
|
511
528
|
|
512
|
-
|
529
|
+
Use [activerecord-oracle_enhanced-adapter](https://github.com/rsim/oracle-enhanced).
|
530
|
+
|
531
|
+
### PostgreSQL
|
532
|
+
|
533
|
+
Add [pg](https://bitbucket.org/ged/ruby-pg/wiki/Home) to your Gemfile (if it’s not there) and set:
|
513
534
|
|
514
535
|
```yml
|
515
536
|
data_sources:
|
516
537
|
my_source:
|
517
|
-
|
518
|
-
project: your-project
|
519
|
-
keyfile: path/to/keyfile.json
|
538
|
+
url: postgres://user:password@hostname:5432/database
|
520
539
|
```
|
521
540
|
|
522
|
-
###
|
541
|
+
### Presto
|
523
542
|
|
524
|
-
Add [
|
543
|
+
Add [presto-client](https://github.com/treasure-data/presto-client-ruby) to your Gemfile and set:
|
525
544
|
|
526
545
|
```yml
|
527
546
|
data_sources:
|
528
547
|
my_source:
|
529
|
-
url:
|
548
|
+
url: presto://user@hostname:8080/catalog
|
530
549
|
```
|
531
550
|
|
532
|
-
###
|
551
|
+
### Snowflake
|
533
552
|
|
534
|
-
Add [
|
553
|
+
First, install the [ODBC driver](https://docs.snowflake.net/manuals/user-guide/odbc.html). Add [odbc_adapter](https://github.com/localytics/odbc_adapter) to your Gemfile and set:
|
535
554
|
|
536
555
|
```yml
|
537
556
|
data_sources:
|
538
557
|
my_source:
|
539
|
-
adapter:
|
540
|
-
|
558
|
+
adapter: snowflake
|
559
|
+
dsn: ProductionSnowflake
|
560
|
+
```
|
561
|
+
|
562
|
+
### SQLite
|
563
|
+
|
564
|
+
Add [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) to your Gemfile and set:
|
565
|
+
|
566
|
+
```yml
|
567
|
+
data_sources:
|
568
|
+
my_source:
|
569
|
+
url: sqlite3:path/to/database.sqlite3
|
570
|
+
```
|
571
|
+
|
572
|
+
### SQL Server
|
573
|
+
|
574
|
+
Add [tiny_tds](https://github.com/rails-sqlserver/tiny_tds) and [activerecord-sqlserver-adapter](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter) to your Gemfile and set:
|
575
|
+
|
576
|
+
```yml
|
577
|
+
data_sources:
|
578
|
+
my_source:
|
579
|
+
url: sqlserver://user:password@hostname:1433/database
|
541
580
|
```
|
542
581
|
|
543
582
|
## Creating an Adapter
|
@@ -580,6 +619,10 @@ Have team members who want to learn SQL? Here are a few great, free resources.
|
|
580
619
|
|
581
620
|
For an easy way to group by day, week, month, and more with correct time zones, check out [Groupdate](https://github.com/ankane/groupdate.sql).
|
582
621
|
|
622
|
+
## Standalone Version
|
623
|
+
|
624
|
+
Looking for a standalone version? Check out [Ghost Blazer](https://github.com/buren/ghost_blazer).
|
625
|
+
|
583
626
|
## Anomaly Detection on Heroku
|
584
627
|
|
585
628
|
Add the [R buildpack](https://github.com/virtualstaticvoid/heroku-buildpack-r) to your app.
|
@@ -692,7 +735,7 @@ end
|
|
692
735
|
And run:
|
693
736
|
|
694
737
|
```sh
|
695
|
-
|
738
|
+
rails db:migrate
|
696
739
|
```
|
697
740
|
|
698
741
|
Update `config/blazer.yml` with:
|
@@ -761,7 +804,7 @@ View the [changelog](https://github.com/ankane/blazer/blob/master/CHANGELOG.md)
|
|
761
804
|
|
762
805
|
Blazer uses a number of awesome open source projects, including [Rails](https://github.com/rails/rails/), [Vue.js](https://github.com/vuejs/vue), [jQuery](https://github.com/jquery/jquery), [Bootstrap](https://github.com/twbs/bootstrap), [Selectize](https://github.com/brianreavis/selectize.js), [StickyTableHeaders](https://github.com/jmosbech/StickyTableHeaders), [Stupid jQuery Table Sort](https://github.com/joequery/Stupid-Table-Plugin), and [Date Range Picker](https://github.com/dangrossman/bootstrap-daterangepicker).
|
763
806
|
|
764
|
-
Demo data from [MovieLens](
|
807
|
+
Demo data from [MovieLens](https://grouplens.org/datasets/movielens/).
|
765
808
|
|
766
809
|
## Want to Make Blazer Better?
|
767
810
|
|