Commit Graph

3174 Commits

Author SHA1 Message Date
michellethomas
d6846d96ff Adding column only if it doesn't already exist (#5179) 2018-06-13 11:49:43 -07:00
Yuance.Li
7f30b48955 fetch datasources from broker endpoint when refresh new datasources (#5183)
* fetch datasources from broker endpoint when refresh new datasources

* remove get_base_coordinator_url as out of use

* add broker_endpoint in get_test_cluster_obj
2018-06-13 08:10:58 -07:00
John Bodley
502b617310
[migrations] Cleaning up migration logic (#5167) 2018-06-12 12:10:53 -07:00
John Bodley
52a933ffb8
[migrations] Cleanup recent migrations (#5155) 2018-06-12 12:10:41 -07:00
michellethomas
280200f834 Fixing tooltip displaying metrics in heatmap (#5055) 2018-06-11 17:14:02 -07:00
Tresdon Jones
3de79b69d0 Fix bullet chart rendering (#5108)
* Fix bullet chart rendering

* Fix code style errors
2018-06-11 16:40:29 -07:00
Maxime Beauchemin
a3477abf7e
Pin FAB and bump a bunch of JS libs (#5122) 2018-06-10 21:43:37 -07:00
Xiao Hanyu
0a276ff75d Init docker for local development environment. (#4193)
This commit will try to dockerize superset in local development
environment.

The basic design is:
- Enable superset, redis and postgres service instead of using sqlite,
  just want to simulate production environment settings
- Use environment variables to config various app settings. It's easy to
  run and config superset to any environment if we use environment than
  traditional config files
- For local development environment, we just expose postgres and redis
  to local host machine thus you can connect local port via `psql` or
  `redis-cli`
- Wrap start up command in a standard `docker-entrypoint.sh`, and use
  `tail -f /dev/null` combined with manually `superset runserver -d` to
  make sure that code error didn't cause the container to fail.
- Use volumes to share code between host and container, thus you can use
  your favourite tools to modify code and your code will run in
  containerized environment
- Use volumes to persistent postgres and redis data, and also
  `node_modules` data.
  - If we don't cache `node_modules` in docker volume, then every time
    run docker build, the `node_modules` directory, will is about 500 MB
    large, will be sent to docker daemon, and make the build quite slow.
- Wrap initialization commands to a single script `docker-init.sh`

After this dockerize setup, any developers who want to contribute to
superset, just follow three easy steps:

```
git clone https://github.com/apache/incubator-superset/
cd incubator-superset
cp contrib/docker/{docker-build.sh,docker-compose.yml,docker-entrypoint.sh,docker-init.sh,Dockerfile} .
cp contrib/docker/superset_config.py superset/
bash -x docker-build.sh
docker-compose up -d
docker-compose exec superset bash
bash docker-init.sh
```
2018-06-09 21:26:41 -07:00
John Bodley
7d1c035658
[druid] Fixing Druid version check (#5028) 2018-06-08 16:55:15 -07:00
Maxime Beauchemin
915e6e9d40
Restore translations as of 459cb701fb (#5156) 2018-06-08 14:05:50 -07:00
Gabe Lyons
b53b240710 [Explore][Adhoc Metrics/ Filters] disabled message for custom sql tab in druid (#5162)
* added disabled message for custom sql tab on druid datasources

* Update AdhocFilterEditPopover.jsx

Fixing indentation.

* Update AdhocMetricEditPopover.jsx

Fixing indent.

* Update AdhocFilterEditPopover.jsx

Fixing indentation.

* Update AdhocMetricEditPopover.jsx

Fixing indentation.
2018-06-07 16:16:46 -07:00
John Bodley
1b4406db3f
[migration] Adding migration to remove empty in/not-in filters (#5161) 2018-06-07 15:48:53 -07:00
Gabe Lyons
5b35f75cbf empty lists are invalid comparators (#5160) 2018-06-07 15:02:43 -07:00
Beto Dealmeida
57e125688f Improve time shift (#5140)
* Improve time shift color and pattern

* Revert change

* Fix js unit test

* Move code to better place, add unit test

* Move classed code to backend

* Remove console.log

* Remove 1 hour time compare

* Remove unused import
2018-06-06 20:40:55 -07:00
John Bodley
0545d11a22
[migrations] Fix time grain SQLA (#5135) 2018-06-06 16:56:39 -07:00
timifasubaa
0abbc98630 pin kombu dependency (#5150) 2018-06-06 14:29:08 -07:00
John Bodley
f102eab33c
[crud] Improving performance (#5136) 2018-06-05 17:24:19 -07:00
Xiao Hanyu
b71f551493 Optimize presto SQL Lab query performance. (#5132)
By stop polling when presto query already finished.

When user make queries to Presto via SQL Lab, presto will run the query
and then it can return all data back to superset in one shot.

However, the default implementation of superset has enabled a default
polling for presto to:

- Get the fancy progress bar
- Get the data back when the query finished.

However, the polling implementation of superset is not right.

I've done a profiling with a table of 1 billion rows, here're some data:

- Total number of rows: 1.02 Billion
- SQL Lab query limit: 1 million
- Output Data: 1.5 GB
- Superset memory consumed: about 10-20 GB
- Time: 7 minutes to finish in Presto, takes additional 15 minutes for
  superset to get and store data.

The problems with default issue is, even if presto has finished the
query (7 minutes with above profiling), superset still do lots of wasted
polling, in above profiling, superset sent about 540 polling in total,
and at half of the polling is not necessary.

Part of the simplied polling response:

```
{
  "infoUri": "http://10.65.204.39:8000/query.html?20180525_042715_03742_nza9u",
  "id": "20180525_042715_03742_nza9u",
  "nextUri": "http://10.65.204.39:8000/v1/statement/20180525_042715_03742_nza9u/11",
  "stats": {
    "state": "FINISHED",
    "queuedSplits": 21701,
    "progressPercentage": 35.98264191882267,
    "elapsedTimeMillis": 1029,
    "nodes": 116,
    "completedSplits": 15257,
    "scheduled": true,
    "wallTimeMillis": 2571904,
    "peakMemoryBytes": 0,
    "processedBytes": 40825519532,
    "processedRows": 47734066,
    "queuedTimeMillis": 0,
    "queued": false,
    "cpuTimeMillis": 849228,
    "rootStage": {
      "state": "FINISHED",
      "queuedSplits": 0,
      "nodes": 1,
      "totalSplits": 17,
      "processedBytes": 16829644,
      "processedRows": 11495,
      "completedSplits": 17,
      "stageId": "0",
      "done": true,
      "cpuTimeMillis": 69,
      "subStages": [
        {
          "state": "CANCELED",
          "queuedSplits": 21701,
          "nodes": 116,
          "totalSplits": 42384,
          "processedBytes": 40825519532,
          "processedRows": 47734066,
          "completedSplits": 15240,
          "stageId": "1",
          "done": true,
          "cpuTimeMillis": 849159,
          "subStages": [],
          "wallTimeMillis": 2570374,
          "userTimeMillis": 730020,
          "runningSplits": 5443
        }
      ],
      "wallTimeMillis": 1530,
      "userTimeMillis": 50,
      "runningSplits": 0
    },
    "totalSplits": 42401,
    "userTimeMillis": 730070,
    "runningSplits": 5443
  }
  }
}
```

Superset will terminate the polling when it finds that `nextUri`
becomes none, but actually, when `["stats"]["state"] == "FINISHED"`,
it means that presto has already finished the query and superset can stop
polling and get the data back.

After this simple optimization, we get a 2-5x performance boost for
Presto SQL Lab queries.
2018-06-05 08:56:18 -07:00
Maxime Beauchemin
d2bc4ece3e
Bump celery to 4.1.1 (#5134)
* Bump celery to 4.1.1

Docs reference `celery worker --app=superset.sql_lab:celery_app
--pool=gevent -Ofair` command which seems only to work with Celery 4.1.1

* Add UPDATING.md message
2018-06-04 14:54:36 -07:00
Maxime Beauchemin
ffd65ce623
Pin FAB to 1.10.0 (#5133)
Related to
https://github.com/apache/incubator-superset/issues/5088#issuecomment-394064133
2018-06-04 09:03:30 -07:00
Tamika Tannis
dc21e0dd78 URL shortner for dashboards (#4760)
* Added support for URLShortLinkButton to work for the dashboard case

* Fix lint errors and test

* Change references to 'slice' to 'chart'.

* Add unit tests to improve coverage

* Fixing lint errors

* Refactor to make URLShortLink more generic. Remove history modification code, redirect should be handling this.

* Remove history modification code, redirect should be handling this

* Generate a shorter link without the directory, and delegate default linked to the contents of window.location

* Fix lint errors

* Fix test_shortner test to check for new pattern

* Remove usage of addHistory to manipulate explore shortlink redirection

* Address build failure and using better practices for shortlink defaults

* Fixing alphabetical order

* More syntax mistakes

* Revert explore view history changes

* Fix use of component props, & rebase
2018-06-02 11:08:43 -07:00
Michelle Thomas
47768284d0 Adding tests for adhoc metric as timeseries_limit_metric 2018-05-31 23:48:12 -07:00
Gabe Lyons
cc0942ac98 updating adhoc metric filtering (#5105) 2018-05-31 23:34:48 -07:00
Ky-Anh Huynh
556ef44fac docs: Add new Athena URI scheme awsathena+rest:// (#5112)
See also some discussions on https://github.com/laughingman7743/PyAthenaJDBC/pull/62
2018-05-31 22:19:07 -07:00
Beto Dealmeida
1d3e96bce0 Allow multiple time shifts (#5067)
* Allow multiple time shifts

* Handle old form data
2018-05-31 21:18:36 -07:00
Gabe Lyons
40fadfcb4f adding null checks to adhoc filter popover (#5111) 2018-05-31 21:00:20 -07:00
Maxime Beauchemin
28611108d7
Refactor NULL handling into method, disable for DECK.gl vizes (#5106) 2018-05-31 16:01:49 -07:00
michellethomas
ff4b103025 Fixing time table viz for adhoc metrics (#5117) 2018-05-31 13:53:26 -07:00
Michelle Thomas
6f05b48385 Adding the MetricsControl to the timeseries_limit_metric field 2018-05-31 12:52:00 -07:00
Maxime Beauchemin
4ecd95a318
[bugfix] deck.gl on druid always shows animation (#5107) 2018-05-31 11:57:53 -07:00
Gabe Lyons
f3778c3c81 fixing LIKE constant name (#5110) 2018-05-31 11:34:51 -07:00
timifasubaa
cefc206a36
Merge pull request #5023 from timifasubaa/fix_sqllab_commit
[sqllab] force limit queries only when there is no existing limit
2018-05-31 11:12:46 -07:00
Beto Dealmeida
875d0b5ad2 Override time grain in annotations (#5084) 2018-05-30 15:29:48 -07:00
timifasubaa
e8b25988e2
Merge pull request #5109 from cxmcc/patch-1
Add Lime to Superset user list.
2018-05-30 15:17:16 -07:00
Xiuming Chen
21967f40e7
Add Lime to Superset user list.
Add Lime to Superset user list.
2018-05-30 14:24:03 -07:00
Timi Fasubaa
a9d7fafd9f add tests 2018-05-30 12:50:27 -07:00
Maxime Beauchemin
f6117973e9
Bump dep on pydruid to 0.4.3 (#5098) 2018-05-30 09:15:10 -07:00
John Bodley
0511d1f38d
[get_df] Adding support for multi-statement SQL (#5086) 2018-05-29 14:20:17 -07:00
谢邵虎
7dbb45e5fb add CnOvit to Superset users list (#5094) 2018-05-29 13:59:49 -07:00
Beto Dealmeida
6c3e469154 Add more time grains (#5083)
* Add more time grains

* Use FLOOR

* Fix quotes for lint
2018-05-29 12:43:48 -07:00
Maciej Bryński
ae50845843 Proper error handling in Hive Queries (#4428)
* Proper error handling in Hive Queries

* Change quotes

* Trigger checks

* Adding call to parent class

* Small fix

* Fix in method call
2018-05-29 12:42:45 -07:00
zjj
459267785f Fix python2 str() in visualization (#5093) 2018-05-29 10:33:22 -07:00
Timi Fasubaa
d38315a307 reuse_regex_logic 2018-05-25 15:07:27 -07:00
Timi Fasubaa
1aced9b562 force limit only when there is no existing limit 2018-05-25 14:54:11 -07:00
Yongjie Zhao
c18ef89034 [bugfix] fix visualization with adhocMetric (#5080)
* fix visualization with adhocMetric

* update
2018-05-25 09:48:18 -07:00
Alexander Ko
e30215c3d8 Add 24 hours refresh for dashboard (#5068)
* adding 24 hours refresh

* adding additional hours
2018-05-24 17:44:24 -07:00
Maxime Beauchemin
42d0597b90
Use a dummy version number on master (#5000)
Currently we assign release version number in release branches and
master was still pointing to some old version number from when the
process was different. We need a dummy version number that both setuptools
and npm are ok with.
2018-05-24 17:42:46 -07:00
John Bodley
3207116535
Revert "[get_df] Adding support for multi-statement SQL" (#5078) 2018-05-24 14:59:34 -07:00
michellethomas
1aaa73b548 Translate string to array for multi fields in getControlsState (#5057)
* Translate string to array for multi fields in getControlsState

* Updating format to fit on one line
2018-05-23 22:30:44 -07:00
Maxime Beauchemin
05061a73ce
Fix time shift color assignements (#5065)
closes https://github.com/apache/incubator-superset/pull/4765
2018-05-23 21:30:03 -07:00