Commit Graph

645 Commits

Author SHA1 Message Date
Jason Davis c544ebd876
fix: Fixed Attribute Error when running core_tests.py (#10154)
* fix: changed import order to fix core-test error

* reformatted using black

Co-authored-by: Jason Davis <@dropbox.com>
2020-06-24 12:46:38 -07:00
John Bodley 37777f382f
fix(security): dbs/clusters perm (#10130)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-24 10:06:25 -07:00
Bogdan 3db76c6fdc
Implement create view as functionality (#9794)
Implement create view as button in sqllab

Make CVAS configurable

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-24 09:50:41 -07:00
John Bodley aefef9ca55
chore(security): Updating assert logic (#10034)
* chore(security): Updating assert logic

* Deprecating rejected_tables

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-23 20:49:39 -07:00
Aliaksei Kushniarevich 550e78ff7c
feat: Add multiple table filters for Row Level Security (#9751)
* Add multiple table filters for Row Level Security

* Set ENABLE_ROW_LEVEL_SECURITY back to False (default)

* Merge DB migrations

* Drop table_id column and foreign key on PostgreSQL, MySQL, SQLite

* Support db records migration also

* Support downgrading from the new-fashioned formatted records

* Straighten up migrations

* Update migration's down_revision to comply master branch
2020-06-22 12:51:08 +03:00
Daniel Vaz Gaspar dbc43d7c7b
perf(datasets): improve datasets API performance for attr kind (#10111)
* perf(datasets): improve datasets API performance for attr kind

* fix test
2020-06-22 08:21:06 +01:00
Bogdan be6b9b8fec
feat: implement dttm column configuration through db extra config (#9444)
* Implement table mutator and examples how to set date defaults

Fix tests

* Fix flaky test

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-17 13:46:45 -07:00
Will Barrett 01aede0652
refactor: Break up superset/views/core.py (#10078)
* Remove unreferenced function from views/core.py

* Remove excess constants from views/core.py

* Extract CssTemplate-related views to their own file from core.py

* Remove duplicate constant declaration and make the constant less racist

* Move free-floating functions in views/core.py to views/utils.py

* Move AccessRequestsModelView out of views/core.py into its own module

* Move health checks and KV ModelView out of core.py and into their own modules

* Move R model view to its own module

* Move after-request header setting to views/base.py from views/core.py

* black

* mypy

* isort

* Fix reference to imported app

* pylint

* Fix some imports

* Add some missing view imports

* Fix a missing import
2020-06-17 13:42:13 -07:00
Bogdan 29e9f2c70b
feat: superset report slack integration (#9810)
* First draft for the slack integration

Fix slack

another typo

another typo

Fix slack

Add channels to the form

another typo

Another set of changes

Make code more transparent

Fix tests

Add logging

logging

use logger

import logging

import logging

import logging

add assert

more logging

Fix channels

Fix channels

* Address comments

* Move slack into a separate module

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-17 11:01:25 -07:00
John Bodley eba1fe2ebb
fix: Ensuring queries route accepts float or int (#10079)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-17 08:02:49 -07:00
ʈᵃᵢ 26120467af
fix: use custom int parsing over flask int parsing in sqllab queries endpoint (#10070) 2020-06-16 12:58:32 -07:00
Erik Ritter 7504b1cf20
fix: caching on viz with relative time ranges and time compare (#10061) 2020-06-16 08:47:35 -07:00
Ville Brofeldt a3393c1bc4
fix: native annotations (#10037)
* fix: native annotations

* Add test

* Add comment to test
2020-06-12 21:53:26 +03:00
John Bodley 9532bff48f
chore(security): Renaming access methods (#10031)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-11 13:12:23 -07:00
John Bodley 54c6ddbdb7
chore(security): Renaming schemas_accessible_by_user (#10030)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-11 11:29:43 -07:00
Will Barrett 4ef26993e2
feat: Add owners and physical/virtual status to Datasets API list endpoint (#10025)
* Add owners and physical/virtual status to Datasets API list endpoint

* black

* Update type definition for DatasourceKind

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Fixin' tests and mypy

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-06-10 22:04:40 +03:00
Erik Ritter e17da58a39
feat: add replace option to hive csv upload (#9764) 2020-06-10 08:57:33 -07:00
Ville Brofeldt 526ee3c3df
fix: flaky test_copy_dash test in dashboard_tests.py (#10021) 2020-06-09 13:29:22 +03:00
Ville Brofeldt 315518d2d2
feat: add support for query offset (#10010)
* feat: add support for query offset

* Address comments and add new tests
2020-06-09 11:46:28 +03:00
John Bodley 91517a56a3
style(mypy): Spit-and-polish pass (#10001)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-07 08:53:46 -07:00
Ville Brofeldt 5c4d4f16b3
feat: finalize Word Cloud move to new chart data endpoint (#9975)
* remove word cloud from viz.py

* Fix Run in SQL Lab

* remove deprecated python tests

* break out legacy endpoint type into function

* Break out exploreChart from exportChart and implement results type

* Fix jest tests and refactor accordingly

* lint

* Rename v1 payload function

* Add dashboard id to v1 chart data request url params

* Add support for domain sharding to v1 chart data request
2020-06-05 14:08:46 +03:00
John Bodley 244677cf5e
style(mypy): Enforcing typing for superset (#9943)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-03 15:26:12 -07:00
Xiang Fu 1d9dbcd9dc
fix: pinot select query logic (#9954)
* Update how pinot handles selection logic

* Change DATETIMECONVERT argument to use single quote for literals
2020-06-02 23:18:35 -07:00
John Bodley 1001c6d5f4
Revert "[caching] Using request context rather than globals" (#9969)
This reverts commit 90cd3889ac.

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-02 16:03:33 -07:00
Ville Brofeldt 38a6bd79da
feat: expand new chart data endpoint coverage (#9903)
* feat: implement new chart API for additional components

* Fix python tests

* Fix tests

* Fix lint

* fix camel case error in requestParams

* lint

* fix samples row limit

* Add samples row limit to config

* remove unnecessary code

* lint

* Address review comments
2020-06-02 10:47:28 +03:00
John Bodley b296a0f250
[mypy] Enforcing typing for superset.utils (#9905)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-27 22:57:30 -07:00
Erik Ritter c4040a2ae0
fix: annotation layer json (#9915)
* fix: annotation layer json

* attempt to add a test

* [tests] Fixing test

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-27 09:02:03 -07:00
Bogdan 3e8e441bfc
feat: implement csv upload configuration func for the schema enforcement (#9734)
* Implement csv upload func for schema enforcement

Implement function controlled csv upload schema

Refactor + fix tests

Fixing hive as well

* Add explore_db to the extras

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-21 13:49:53 -07:00
Ville Brofeldt a43a1d6303
feat: Add new result formats and types to chart data API (#9841)
* feat: Add new result formats and types to chart data API

* lint

* Linting

* Add language to query payload

* Fix tests

* simplify tests
2020-05-20 21:36:14 +03:00
michellethomas 368c85de1b
fix: Removing the logic to add timeseries_limit_metric to the data for table (#9832)
* Removing the logic to add timeseries_limit_metric to the data for table viz

* Also make the change in viz_sip_38

* Fix tests

Co-authored-by: michelle_thomas <michelle.thomas@airbnb.com>
2020-05-20 10:20:54 -07:00
John Bodley c691a07948
Revert "[sqllab] fix, strip comments before parsing statements" (#9862)
This reverts commit 949c4eae28.

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-20 09:54:17 -07:00
Erik Ritter c7c76c6a99
build: Add python 3.8 to the build matrix (#9827) 2020-05-17 14:49:51 -07:00
Daniel Vaz Gaspar 3cc540019f
fix(mssql): reverts #9644 and displays a better error msg (#9752) 2020-05-14 17:00:02 +01:00
Daniel Vaz Gaspar 4427d65717
tests(celery): improve celery tests infra (#9775) 2020-05-14 16:58:30 +01:00
Erik Ritter d02f2d1fa7
feat: return security errors in the SIP-40 format (#9796) 2020-05-13 17:10:37 -07:00
Ville Brofeldt b532c4609f
chore: bump python dependencies (#9786)
* chore: bump pyhton dependencies

* bump flask-testing

* Add note to UPDATING and bump flask-testing in requirements-dev.txt

* fix old sqlparse test case that is fixed with sqlparse==0.3.1

* Fix migration and sqlparse set test

* downgrade alembic

* Downgrade sqlalchemy-utils

* pin sqlalchemy-utils due to regression in 0.36.5

* Refine comment in setup.py

* make cachelib an explicit requirement
2020-05-13 18:49:34 +03:00
Erik Ritter 83ec7365a7
feat: convert backend chart errors to the new error type (#9753) 2020-05-12 18:15:53 -07:00
John Bodley 04e3a4a72d
[caching] Using request context rather than globals (#9715)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-11 15:55:05 -07:00
Ville Brofeldt a8d5a8aaa2
fix: make tests work individually (#9782) 2020-05-11 11:48:22 -07:00
Ville Brofeldt 42b10aecae
Add QueryContext deserialization test (#9778)
* Add QueryContext deserialization test

* deserialize using marshmallow and assert error dict
2020-05-11 14:10:14 +03:00
Bogdan 903217f64d
Fix SQL Lab schema permission checks (#9756)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-08 14:59:49 -07:00
Daniel Vaz Gaspar 453806fc4c
perf(dataset): improve performance on get list (#9739) 2020-05-06 11:48:32 +01:00
Daniel Vaz Gaspar 0d85d25314
docs(api): improve openapi documentation for dash, charts and queries (#9724) 2020-05-05 14:42:18 +01:00
Bogdan 11972ed60d
Fix bad test (#9735)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-04 23:52:18 -07:00
ʈᵃᵢ 4c522ac65f
[sqllab] fix, strip comments before parsing statements (#9692) 2020-05-04 19:47:29 +03:00
Daniel Vaz Gaspar 2b59075d57
tests(engine_specs): full bigquery engine coverage (#9702) 2020-04-30 18:31:15 +01:00
John Bodley 3b0f8e9c8a
[sql] Adding lighweight Table class (#9649)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-30 08:38:02 -07:00
Bogdan 283504479e
Fix ENABLE_ROW_LEVEL_SECURITY flag usage (#9689)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-04-29 23:57:06 +03:00
John Bodley 7f89f12c4a
[debug] Debugging caching issue (#9665)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-29 12:16:47 -07:00
Daniel Vaz Gaspar 527bee5051
tests(engine_specs): full postgres engine coverage (#9682) 2020-04-29 18:20:25 +01:00