Commit Graph

3035 Commits

Author SHA1 Message Date
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
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
John Bodley d322e48c57
[markup] Enable allow-forms (#5062) 2018-05-23 13:30:02 -07:00
Gabe Lyons fa3e4e23b3 integrating dashboard filters with adhoc filters (#5056) 2018-05-23 11:46:00 -07:00
John Bodley 17d6464aa9
[get_df] Adding support for multi-statement SQL (#5060) 2018-05-23 11:40:25 -07:00
Grace Guo 4c44223234
[Dashboard] Allow Superset Alpha, Gamma users to save dashboard as a copy (#5051) 2018-05-22 15:31:37 -07:00
michellethomas b8aeb1a825 Allow MetricsControl to aggregate on a column with an expression (#5021)
* Allow MetricsControl to aggregate on a column with an expression

* Adding test case for metrics based on columns
2018-05-22 09:58:38 -07:00
Hua Jigang b312cdad2f fix metrics type error in pivot table viz (#5025)
transfer metrics dict label to list of string
2018-05-21 21:13:10 -07:00
Beto Dealmeida 973c661501 Rename "slice" to "chart" and update translations (#5008)
* Rename slice to chart and update translations

* Fix unit tests
2018-05-21 17:49:02 -07:00
Beto Dealmeida 459cb701fb Visualization for multiple line charts (#4819)
* Initial test

* Save

* Working version

* Use since/until from payload

* Option to prefix metric name

* Rename LineMultiLayer to MultiLineViz

* Add more styles

* Explicit nulls

* Add more x controls

* Refactor to reuse nvd3_vis

* Fix x ticks

* Fix spacing

* Fix for druid datasource

* Rename file

* Small fixes and cleanup

* Fix margins

* Add proper thumbnails

* Align yaxis1 and yaxis2 ticks

* Improve code

* Trigger tests

* Move file

* Small fixes plus example

* Fix unit test

* Remove SQL and Filter sections
2018-05-21 17:47:21 -07:00
Gabe Lyons a746fce383 expanding simple tab (#5032) 2018-05-21 16:22:40 -07:00
Gabe Lyons 0e1fb62db2 forcing ace editor to refresh when it is shown (#5038) 2018-05-21 16:20:46 -07:00
Maxime Beauchemin ce0011e5fc
Add missing dep on contextlib2 (#5027) 2018-05-21 13:19:07 -07:00
Gabe Lyons 1c9474b4ff treating floats like doubles for druid versions lower than 11.0.0 (#5030) 2018-05-21 11:50:04 -07:00
Yongjie Zhao 9f66dae328 [bugfix] Fix ZeroDivisionError and get metrics label with percent metrics (#5026)
* Fix percent_metrics ZeroDivisionError and can not get metrics with label issue

* convert iterator to list

* get percentage metrics with get_metric_label method

* Adding tests case for expression type metrics

* Simplify expression
2018-05-20 11:10:57 -05:00
timifasubaa 5505c116ba
Merge pull request #5019 from timifasubaa/fix_error_message_for_missing_datasource
fix missing datasource error message
2018-05-18 01:13:47 -07:00
timifasubaa 63115fbb87
nit 2018-05-17 23:34:12 -07:00
Timi Fasubaa f52f7aa7cf raise exception early 2018-05-17 17:39:59 -07:00
timifasubaa 5a64b3f577
Merge pull request #5022 from mistercrunch/flask_sub_1
Fix flask<1.0.0
2018-05-16 18:26:27 -07:00
Maxime Beauchemin 2ba929ac9e Fix flask<1.0.0
Made a mistake originally, meant to flask<1.0.0
2018-05-16 18:37:14 -05:00
Arup Malakar 2bf53dad98 Make port number optional in superset for druid (#5020)
* Make port number optional in superset for druid

It appears that urllib throws error with ssl if port number is provided

```
    url = "https://example.com:443/druid/v2"

    req = urllib.request.Request(url, druid_query_str, headers)
    res = urllib.request.urlopen(req)

```

The above call fails with the following error:
```
urllib2.HTTPError: HTTP Error 404: Not Found
```

If url is set to https://example.com/druid/v2 it works, this change
makes the port number optional.

* Rewrite if/else in concisely python way
2018-05-16 17:38:00 -04:00
Timi Fasubaa cf374efb3f fix missing datasource error message 2018-05-16 12:32:31 -07:00
Maxime Beauchemin e72c9cded3
Fix EncryptedType error (#5007)
fixes https://github.com/apache/incubator-superset/issues/5005
2018-05-16 13:24:51 -05:00
michellethomas c2eae96327 Fix AdhocFilterControl for single metric options (#5012) 2018-05-15 16:41:23 -07:00
Maxime Beauchemin 7b427d7ee0
Make MetricsControl the standard across visualizations (#4914)
* [WiP] make MetricsControl the standard across visualizations

This spreads MetricsControl across visualizations.

* Addressing comments

* Fix deepcopy issue using shallow copy

* Fix tests
2018-05-15 12:37:34 -05:00
Maxime Beauchemin b839608c32
[sql lab] a better approach at limiting queries (#4947)
* [sql lab] a better approach at limiting queries

Currently there are two mechanisms that we use to enforce the row
limiting constraints, depending on the database engine:
1. use dbapi's `cursor.fetchmany()`
2. wrap the SQL into a limiting subquery

Method 1 isn't great as it can result in the database server storing
larger than required result sets in memory expecting another fetch
command while we know we don't need that.

Method 2 has a positive side of working with all database engines,
whether they use LIMIT, ROWNUM, TOP or whatever else since sqlalchemy
does the work as specified for the dialect. On the downside though
the query optimizer might not be able to optimize this as much as an
approach that doesn't use a subquery.

Since most modern DBs use the LIMIT syntax, this adds a regex approach
to modify the query and force a LIMIT clause without using a subquery
for the database that support this syntax and uses method 2 for all
others.

* Fixing build

* Fix lint

* Added more tests

* Fix tests
2018-05-14 14:44:05 -05:00
Yongjie Zhao 7a4a89b195 Update Apache Kylin dbengine with supported week/quarter grains (#4965) 2018-05-14 14:11:59 -05:00
Gabe Lyons ce710f8c8f cleaning up the table fab view since we hide these autogenerated metrics anyway (#4992) 2018-05-14 14:09:12 -05:00
Ville Brofeldt b391676544 Force lowercase column names for Snowflake and Oracle (#4994)
* Force lowercase column names for Snowflake and Oracle

* Force lowercase column names for Snowflake and Oracle

* Remove lowercasing of DB2 columns

* Remove DB2 lowercasing

* Fix test cases
2018-05-14 13:43:13 -05:00
timifasubaa 071c6a6c03
Merge pull request #4991 from michellethomas/fix_filter_blank_custom_sql
[Bugfix] Allowing sqlExpression to be blank
2018-05-14 11:26:08 -07:00
Maxime Beauchemin 2c5200affd
[deps] force flask<=1.0.0 (#4959)
flask 1.0 came out and has backwards incompatible changes. People
are reporting that fresh install doesn't work anymore.

fixes https://github.com/apache/incubator-superset/issues/4953

We should ship a 0.25.1 with this in
2018-05-13 11:16:09 -07:00
Michelle Thomas ad4912d601 Allowing sqlExpression to be blank 2018-05-11 16:03:17 -07:00
Gabe Lyons 7d5195aae3 expanding regex for automated columns (#4990) 2018-05-11 15:43:52 -07:00
timifasubaa b75942daa5
Merge pull request #4977 from timifasubaa/bump_pyhive_version
bump pyhive version
2018-05-10 11:50:14 -07:00
Timi Fasubaa 6720255868 bump pyhive version 2018-05-10 11:13:44 -07:00
Gabe Lyons a8514b267b [Explore] Adding Adhoc Filters (#4909)
* adding custom expressions to adhoc metrics

* adjusted transitions and made the box expandable

* adding adhoc filters

* adjusted based on feedback
2018-05-10 10:41:10 -07:00
grafke 8591319bde [sql lab] Use context manager for sqllab sessions (#4927)
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering
2018-05-10 10:32:31 -07:00
Ville Brofeldt af4dd59661 Fix templating in sqla datasource (#4971)
Fix templating in sqla datasource [has migration]
2018-05-10 10:28:56 -07:00
Nicole Dominguez 94249ed20c superset/import_dashboards.html: Update title, clean up html (#4972)
* Changes "Import the dashboards." to "Import dashboards"
* Cleans up the HTML to add quotes, self close tags, etc.
* Adds a class to the `<submit>` button to utilize bootstrap style
* Remove the `<title>` tag in body as it's not vaild HTML and redundant with `{% block %}`
2018-05-09 20:42:17 -07:00
Maxime Beauchemin 918399d4e2
[bugfix] handling UTF8 in Druid dimensions (#4943) 2018-05-08 22:04:05 -07:00
jasnovak e29beba023 Add extraction function support for Druid queries (#4740)
* add extraction fn support for Druid queries

* bump pydruid version to get extraction fn commits

* update and add tests for druid for filters with extraction fns

* conform to flake8 rules

* fix flake8 issues

* bump pyruid version for extraction function features
2018-05-08 22:00:06 -07:00