Commit Graph

883 Commits

Author SHA1 Message Date
ʈᵃᵢ 50672bb11b
feat: database delete warning (#10800) 2020-09-08 18:54:02 -07:00
Ville Brofeldt 3ae80d3b98
test: add rls jinja extra cache key test (#10810) 2020-09-08 07:42:48 +03:00
Daniel Vaz Gaspar 5199423ad1
feat: CRUD REST API for saved queries (#10777)
* feat: CRUD REST API for saved queries

* debug test

* fix test

* use pytest fixtures
2020-09-03 15:46:27 -07:00
Ville Brofeldt 70c6764780
fix: pivot table timestamp grouping (#10774)
* fix: pivot table timestamp grouping

* address comments
2020-09-03 19:49:54 +03:00
Jason Davis 54ae3b044f
fix: add validator information to email/slack alerts (#10762)
* added validator info to alerts

* adjusted format of messages

* added nits

Co-authored-by: Jason Davis <@dropbox.com>
2020-09-03 08:15:05 -07:00
John Bodley 1ee87cc4d1
fix: dashboard extra filters (#10692)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-09-02 16:03:25 -07:00
ʈᵃᵢ 7bccb38a60
feat: SIP-34 table list view for databases (#10705) 2020-09-02 11:48:21 -07:00
ʈᵃᵢ 5a4370012b
refactor: convert DatasetList schema filter to use new distinct api (#10746) 2020-09-02 11:07:37 -07:00
Daniel Vaz Gaspar 77a3167412
feat(database): POST, PUT, DELETE API endpoints (#10741)
* feat(database): POST, PUT, DELETE API endpoints

* post tests

* more tests

* lint

* lint

* debug ci

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* cleanup

* handle db connection failures

* lint

* skip hive and presto for connection fail test

* fix typo
2020-09-02 09:58:08 -07:00
Jason Davis b59f6b1833
feat: refractored SQL-based alerting framework (#10605)
* added new tables for alerting refractor

* reformatted inheritance structure

* added workflow for updated framework

* added suggested changes

* cleaned up changes

* added obervations to alert table to enable view

* added comments

* added requested changes

* fix tests

* added styling changes

* mypy

* added requested changes

* updated operator logic

* requested changes, 1 validator, styling changes

* refactored tests

* fix test alert workflow

* fixed create_alert in test

Co-authored-by: Jason Davis <@dropbox.com>
2020-09-01 13:36:02 -07:00
Bogdan 4572ebb600
chore: log cache keys to the logs (#10678)
* Log cache keys to the logs

* Add tests

* Use separate table for the cache keys

* Add migration for the cache lookup table

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-01 09:41:25 -07:00
Maxime Beauchemin 3d8857ecc8
style: rename 'Source' top nav item to 'Data' (#10715)
* style: rename 'Source' top nav item to 'Data'

* Fix tests

* tables -> datasets

* rename datasource -> dataset

* lint

* more renaming

* use npm ci
2020-08-29 18:09:47 -07:00
Bogdan 33fa9ebff1
Covert celery tests to the pytest (#10704)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-28 17:04:30 -07:00
Ville Brofeldt 58b075bc17
fix(jinja): extract form_data from json body (#10684)
* fix(jinja): extract form_data from json body

* add test

* disable test for presto
2020-08-28 21:26:07 +03:00
Daniel Vaz Gaspar 3e374dab07
fix: change public role like gamma procedure (#10674)
* fix: change public role like gamma procedure

* lint and updating UPDATING with breaking change

* fix updating text

* add test and support PUBLIC_ROLE_LIKE_GAMMA

* fix, cleanup tests

* fix, new test

* fix, public default

* Update superset/config.py

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

* add simple public welcome page

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-28 10:49:10 +01:00
Bogdan 6ed36552e6
Use test name for the custom macros testing: (#10695)
:

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-27 13:12:24 -07:00
Bogdan 19a9bcc9c5
chore: ci Initial hive support (#10593)
* Initial hive support

* Clone hive setup

* Make hive tests work locally

* Debugging presto failure

* sleep in dataset test

* Address comments

* Address comments

* Pin ipython, exclude new pylint rules

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-27 09:49:18 -07:00
Lily Kuang bb92c1f84d
feat: chart and dashboard card list view e2e cypress test (#10669)
* card view cypress tests

* update test config

* chart filter cypress test

* move setting to superset test config

* update test description card view
2020-08-27 09:38:12 -07:00
John Bodley 502f4db6f9
feature: Adding extra_filters to warm_up_cache (#10675)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-08-25 15:19:34 -07:00
Ville Brofeldt 9461f9c1e0
fix(db_engine_specs): improve Presto column type matching (#10658)
* fix: improve Presto column type matching

* add optional callback to type map and add tests

* lint

* change private to public
2020-08-24 22:42:07 +03:00
Ville Brofeldt 0177c2f591
fix(db_engine_specs): mysql longtext type should not be numeric (#10661) 2020-08-24 21:24:43 +03:00
Daniel Vaz Gaspar 692266f4f5
feat: dataset REST API for distinct values (#10595)
* feat: dataset REST API for distinct values

* add tests and fix lint

* fix mypy, and tests

* fix docs

* fix test

* lint

* fix test
2020-08-17 15:46:59 +01:00
Ville Brofeldt acb00f509c
fix(chart-data-api): assert referenced columns are present in datasource (#10451)
* fix(chart-data-api): assert requested columns are present in datasource

* add filter tests

* add column_names to AnnotationDatasource

* add assertion for simple metrics

* lint
2020-08-14 20:58:24 +03:00
Ville Brofeldt c0ebd7f434
fix: show error if rolling window returns empty df (#10572)
* fix: show error if rolling window returns empty df

* add test
2020-08-13 20:51:03 +03:00
Daniel Vaz Gaspar 11da6ee812
fix: dataset delete and perm delete (#10578) 2020-08-13 10:18:13 +01:00
Craig Rueda 2aaa4d92d9
chore: Migrating reports to AuthWebdriverProxy (#10567)
* Migrating reports to AuthWebdriverProxy

* Extracting out webdriver proxy / Adding thumbnail tests to CI

* Adding license

* Adding license again

* Empty commit

* Adding thumbnail tests to CI

* Switching thumbnail test to Postgres

* Linting

* Adding mypy:ignore / removing thumbnail tests from CI

* Putting ignore statement back

* Updating docs

* First cut at authprovider

* First cut at authprovider mostly working - still needs more tests

* Auth provider tests added

* Linting

* Linting again...

* Linting again...

* Busting CI cache

* Reverting workflow change

* Fixing dataclasses

* Reverting back to master

* linting?

* Reverting installation.rst

* Reverting package-lock.json

* Addressing feedback

* Blacking

* Lazy logging strings

* UPDATING.md note
2020-08-12 13:28:41 -07:00
Ville Brofeldt 85c0cad816
fix: add None checking to cast_to_num (#10584)
* fix: add None checking to cast_to_num

* fix doctest
2020-08-12 19:58:14 +03:00
Jason Davis c0bb86d0d6
feat: slack integration for SQL-based alerts (#10566)
* add slack functionality

* deleted unused variable

* updated test

* black

* fix rebase

* added nits

* added slack no screenshot integration

* isort

* added namedtuple for screenshot

* added test

* fix precommit

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-11 11:15:31 -07:00
Bogdan 0071d374da
chore: move load examples to the fixture (#10545)
* Move load examples to the fixture

* Update tests/celery_tests.py

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

* Address feedback

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-10 13:20:19 -07:00
Bogdan 101e5b670b
chore: clean up csv tests (#10556)
* Clean up csv tests

* Update tests/base_tests.py

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

* Update tests/base_tests.py

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

* import optional

* Fix mypy error

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-10 11:22:38 -07:00
Jason Davis 8b9292ed05
fix: add retry to SQL-based alerting celery task (#10542)
* added retry and minimized sqlalchemy object lives

* pylint

* added try catch

* adjusted naming

* added scoped session

* update tests for dbsession

* added requested changes

* nit todo

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-10 10:20:43 -07:00
Ville Brofeldt 08358d623b
fix: handle query exceptions gracefully (#10548)
* fix: handle query exceptions gracefully

* add more recasts

* add test

* disable test for presto

* switch to SQLA error
2020-08-07 17:37:40 +03:00
Ville Brofeldt 363abfa1a5
fix: remove unnecessary exception when exploring non-legacy viz plugins (#10538)
* fix: remove unnecessary exception when exploring non-legacy viz plugins

* lint
2020-08-07 08:41:39 +03:00
Erik Ritter fd2d1c58c5
Revert "chore: Cleanup database sessions (#10427)" (#10537)
This reverts commit 7645fc85c3.
2020-08-06 15:33:48 -07:00
Bogdan 62b873e3da
feat: welcome presto to the suite of tested databases (#10498)
* Add presto to the CI

Sample test data

Datetime conversion

Sample test data

Fix tests

* TODO to switch to timestamps

* Address feedback

* Update requirements

* Add TODOs

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-06 12:07:22 -07:00
Jason Davis 9c5b0e1c86
fix: refactored SQL-based alerts to not pass sqlalchemy objects as args (#10506)
* refractored alerting to not pass sqlalchemy obj as args

* updated to pass only alert id as arg

* used object id instead of argument

* updated alerts_tests.py to reflect change

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-04 09:52:32 -07:00
Bogdan ab404ea2cf
Sample test data (#10487)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-03 09:08:49 -07:00
Jesse Yang ce10e13ec3
test: schedules test refactor (#10492) 2020-07-31 12:05:39 -07:00
Ville Brofeldt 9d9c34835a
fix: support non-string groupbys for pie chart (#10493)
* chore: add unit tests to pie chart

* refine logic for floats and nans and add more tests
2020-07-31 11:19:21 +03:00
John Bodley 7645fc85c3
chore: Cleanup database sessions (#10427)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-30 23:07:56 -07:00
Jesse Yang 7ff1757448
build: optimize GitHub Actions for building speed and stability (#10485) 2020-07-30 22:28:56 -07:00
Jason Davis 7a329c25e9
feat: add test email functionality to SQL-based email alerts (#10476)
* added test email functionality

* formatting changes

* more formatting

* applied requested changes

* mypy

Co-authored-by: Jason Davis <@dropbox.com>
2020-07-30 13:27:22 -07:00
Hossein Torabi 259a344fd1
test: upload excel (#10467) 2020-07-29 12:50:39 -07:00
ʈᵃᵢ 78cad9a4a8
refactor(listviews): use correct filter endpoints for charts and datasets (#10442) 2020-07-29 11:00:19 -07:00
Daniel Vaz Gaspar 671461d0d0
feat(api): database schemas migration to new API (#10436)
* fix(log): log crashes if expired or not authenticated

* fix lint and rison

* add tests

* more tests

* perm fix

* fix test not found

* JS lint

* fix Jest test
2020-07-29 09:33:15 +01:00
Jason Davis d065633c81
fix: Implement updates to SQL-based email alerts (#10454)
* implemented updates to alerting

* fixed imports and teardown

* changed unittest to pytest conventions

* add app_context to tests

Co-authored-by: Jason Davis <@dropbox.com>
2020-07-28 16:48:42 -07:00
Beto Dealmeida 4f678272d6
fix(presto): Handle ROW data stored as string (#10456)
* Handle ROW data stored as string

* Use destringify

* Fix mypy

* Fix mypy with cast

* Bypass pylint
2020-07-28 16:05:58 -07:00
Ville Brofeldt fc28c92f57
feat: support non-numeric columns in pivot table (#10389)
* fix: support non-numeric columns in pivot table

* bump package and add unit tests

* mypy
2020-07-28 10:40:53 +03:00
ʈᵃᵢ 6f56cd5e9d
feat(listviews): SIP-34 filters for charts, dashboards, datasets (#10335) 2020-07-27 10:14:11 -07:00
Daniel Vaz Gaspar 562012c586
fix(permissions): alpha role has all full features (#10241)
* fix(permissions): alpha role is inconsistent

* reverse and allow Alpha to access manager menu

* Bump FAB to 3.0.1rc1 to include del permission fix

* add docs, tests and UPDATING

* EOL

* Fix query view for Alpha
2020-07-27 10:32:30 +01:00
Ville Brofeldt 5b6ff4944c
fix: incorrect filter operator emitted by Filter Box (#10421)
* fix: equals operator in filter box

* fix time range endpoint schema

* fix test

* bump packages

* fix tests

* lint
2020-07-26 12:40:03 +03:00
Daniel Vaz Gaspar 2fd37b18e3
fix(api): fixes perf on charts and introduces sorting by database on datasets (#10392) 2020-07-23 11:19:05 -07:00
Daniel Vaz Gaspar 98a11e7cf2
fix(api): fixes openapi spec errors and adds a test to validate all spec (#10393) 2020-07-23 10:43:41 +01:00
Daniel Vaz Gaspar 961108625e
fix(datasets): sort and humanized modified by (#10380)
* fix(datasets): sort and humanized modified by

* size xl on changed_on_delta_humanized

* Fix, tests

* Fix, tests

* Fix, frontend tests

* remove debug flag
2020-07-22 11:34:47 +01:00
Maxime Beauchemin 85169f2f1c
chore: remove QueryView (ModelView) (#10162)
* chore: deprecate QueryView (ModelView)

* lint

* fix unit tests
2020-07-21 09:14:15 -07:00
Erik Ritter 5fa4680447
feat: update timeout error UX (#10274) 2020-07-20 15:32:17 -07:00
Bogdan 7075c2ff69
Pin slack client, breaking change (#10345)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-20 09:20:05 -07:00
Ville Brofeldt 7af8b2b3f8
feat: add optional prophet forecasting functionality to chart data api (#10324)
* feat: add prophet post processing operation

* add tests

* lint

* whitespace

* remove whitespace

* address comments

* add note to UPDATING.md
2020-07-20 18:46:51 +03:00
bryanck 73797b8b64
check for empty dataframes before processing results (#10361)
Co-authored-by: Bryan Keller <bkeller@netflix.com>
2020-07-19 17:19:30 +03:00
Daniel Vaz Gaspar 74cb82e1ad
fix: humanised changed on UTC on dashboards and charts (#10321)
* fix: API marshmallow3 drop utc for naive datetime fields

* fix: API marshmallow3 drop utc for naive datetime fields

* fix, tests

* isort and test

* black

* add and fix test

* fix comment
2020-07-15 19:09:32 +01:00
Ville Brofeldt ac85aebe4a
chore: prefer allow/deny terminology (#10320)
* chore: prefer allow/deny terminology

* fix tests

* add PR reference
2020-07-15 19:22:46 +03:00
Ville Brofeldt 42b6347fca
fix: fix csv and query result type and QueryObject schema (#10312) 2020-07-14 16:37:19 +03:00
Ville Brofeldt c44ee06b5d
fix(chart-data-api): improve chart data endpoint errors (#10300)
* fix: improve chart data error response

* Populate error_message in QueryResult

* add tests

* Lint + fix incorrect raise

* add more tests
2020-07-14 12:40:00 +03:00
Bogdan 7abe3e5182
Add more fields to the log API (#10271)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-13 18:06:33 -07:00
Ville Brofeldt b316f723a1
fix(chart-data-api): case insensitive evaluation of filter op (#10299)
* fix(chart-data-api): case insensitive evaluation of filter op

* fix(chart-data-api): case insensitive evaluation of filter op

* mypy

* remove print statement

* add test
2020-07-13 17:21:02 +03:00
Ville Brofeldt 14260f9843
feat: add contribution operation and fix cache_key bug (#10286)
* feat: add contribution operation and fix cache_key_bug

* Add contribution schema
2020-07-10 17:06:05 +03:00
serenajiang c67b1abfd8
fix(csv upload): hive params typo (#10273)
* fix(csv upload): fix :params typo

* fix tests
2020-07-09 11:25:35 -07:00
Daniel Vaz Gaspar 6224edd42d
fix: dashboard endpoint sig changed (#10220)
* fix(thumbnails): dashboard endpoint sig changed

* fix, flask get url for Superset.dashboard

* add simple test
2020-07-09 11:42:38 +01:00
Ville Brofeldt baeacc3c56
feat(chart-data-api): make pivoted columns flattenable (#10255)
* feat(chart-data-api): make pivoted columns flattenable

* Linting + improve tests
2020-07-08 13:35:53 +03:00
Daniel Vaz Gaspar 7ecff0e513
fix: datasets related objects, apply filter and openapi spec (#10252)
* fix, datasets related objects, apply filter and openapi spec

* fix, add 404 test

* fix, add 404 test

* fix test
2020-07-08 10:04:05 +01:00
Daniel Vaz Gaspar 878dbcda3f
feat(api): bump marshmallow and FAB to version 3 (#9964)
* feat(api): bump marshmallow and FAB to version 3

* revert query context tests changes

* obey mypy

* fix tests

* ignore types that collide with marshmallow

* preparing for RC2

* fix tests for marshmallow 3

* typing fixes for marshmallow

* fix tests and black

* fix tests

* bump to RC3 and lint

* Test RC4

* Final 3.0.0

* Address comments, fix tests, better naming, docs

* fix test

* couple of fixes, addressing comments

* bumping marshmallow
2020-07-07 13:26:54 +01:00
Lily Kuang b9e0678752
feat: dataset api endpoint for charts and dashboards count (#10235)
* create GET endpoint for charts and dashboards count associated to a dataset

* add test for chart and dashboard count dataset
2020-07-06 16:25:57 -07:00
Bogdan 84f8a51458
feat: support nulls in the csv uploads (#10208)
* Support more table properties for the hive upload

Refactor

Add tests, and refactor them to be pytest friendly

Use lowercase table names

Ignore isort

* Use sql params

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-06 13:26:43 -07:00
Maxime Beauchemin 318e5347bc
feat: Alerts! allowing users to set SQL-based email alerts with screenshots (#9944)
* feat: add support for alerts

* Add ModelViews

* First pass at adding scheduled Alert support

* Fix syntax errors

* Add log_retention and database to model

* Improving screenshots

* Still refactoring screenshots

* Pass down thumb_size properly

* Progress on screenshot endpoint

* Add alerts.last_eval_dttm and alert query logic

* Getting ready to split compute_screenshot and screenshot/{SHA}

* split the endpoints

* Improving alerting loop

* empty methods

* Add CLI command 'superset alert' that runs a sched loop

* Getting things to work

* email delivery

* A working email\!

* Add feature flag

* Add some description_columns to AlertModelView

* Little tweaks

* Use database.get_df, eval cells for truthiness

* Migrate thumbnail/screenshot functions to use new arg pattern

* Addressing PR feedback

* Update alerts DB migration down_revision

* Resolve _deliver_email arg conflict

* Make mypy happy

* Make isort happy

* Make pylint happy

Co-authored-by: Rob DiCiuccio <rob.diciuccio@gmail.com>
2020-07-06 13:12:27 -07:00
Bogdan b7c45fed80
fix: downgrade sqlparse and add unit test (#10165)
* Downgrade sqlparse and add unit test

* Explain why sqlparse is pinned

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-06 11:10:46 -07:00
Maxime Beauchemin 2314aad450
feat: add database dropdown to dashboard import (#10118)
* feat: add database dropdown to dashboard import

Currently, when importing a database from a JSON file, the process
looks at the database name from the source (the info is in the file)
and matches the datasources to that name. If no database by that name
exists, it simply fails.

With this PR, we add a database dropdown that allows the user to specify
which databases the datasources should target as the get upserted.

I want to stress that the code in this area is not in a great shape,
and that the challenge of serializing/deser the nested objects is
challenging, but that there should be a much better way to do this.
One of the improvement (out of scope for this PR) that would allow to
simplify those import/export would be to use UUIDs for
importable/exportable objects.

Another identified issue is the indirections between
`utils/import_expor_{model}.py` on top of `{Model}.import_object`. Not
addressing that here.

Next topic is the MVC stuff. Decided to stick with it for now as this is
more of a [obious missing feat:] than a rewrite.

* isort \!? 0%^$%Y$&?%$^?%0^?

* fix tests

* pre-committing to py3.6

* address dpgaspar's comments

* revert isort
2020-07-05 15:08:37 -07:00
John Bodley b181e48f5c
[log] Updating form-data logic (#10197)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-04 12:51:43 -07:00
Bogdan 77b36783e7
s/assertEqual/assertEquals (#10195)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-29 16:38:06 -07:00
Bogdan 4e340c8368
feat: Switch from nosetest to pytest (#10177)
* Switch from nosetest to pytest

Fix schedule tests

Collect pytest coverage

Move pytest config into pytest.ini

Move cov to the pytest.ini

* Append coverage for the 2nd run

* Add coverage to all commands

* Coverage only for tests

* Get coverage from 1 place

* Rename classes to be  pytest compatible

* Test coverage for examples and tests

* Max diff to -1

* Explain how to run pytest for the whole project

* Do not append code coverage for the main run

* Do not run coverage on examples

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-29 15:36:06 -07:00
Jason Davis 72fc581b15
added explore database for ctas/cvas (#10174)
Co-authored-by: Jason Davis <@dropbox.com>
2020-06-29 11:13:54 -07:00
Ville Brofeldt 26d34727d3
fix: make time grain nullable in chart data endpoint (#10187)
* fix: make time grain nullable

* add test

* lint
2020-06-29 09:54:01 +03:00
Jesse Yang 9bdfa055ac
feat(viz): add query mode switch to table chart (#10113)
1, Replace table chart rendering from jquery.DataTables to react-table: apache-superset/superset-ui#623
2. Rearrange the control panel, replace GROUP BY and NOT GROUP BY with a "Query Mode" switch: apache-superset/superset-ui#609
2020-06-28 21:37:04 -07:00
Will Barrett 4965d87505
Break some static methods out of superset.views.core.Superset (#10175) 2020-06-26 14:34:45 -07:00
Jason Davis 9de9e1c19d
feat: Added configuration to SQL Lab results "Explore" button (#10164)
* added configuration to virtual table explore button

* added description to mixin

* fixed unit tests

Co-authored-by: Jason Davis <@dropbox.com>
2020-06-26 09:54:55 -07:00
Will Barrett df71fac1e0
refactor: Fix lint on superset/utils/core.py (#10120)
* Fix lint on superset/utils/core.py

* black

* mypy

* Fix some missing renames
2020-06-26 08:49:12 -07:00
Ville Brofeldt 410c5be2f8
fix: return slice owners for /user_slices ep (#10171)
* fix: return slice wowners for /user_slices ep

* put back created_by and changed_by

* improve comment
2020-06-26 18:10:56 +03:00
Maxime Beauchemin 1781ebbaa4
fix: [search query view] edit link is broken (#10128)
* fix: [search query view] edit link is broken

* eslint + mypy

* rever app.py changes

* addressing comments

* use api/v1/query

* fix test
2020-06-25 12:20:10 -07:00
Ville Brofeldt b205ce32b0
feat: Add new timegrains and convert_dttm to Druid engine spec (#10160)
* feat: Add new timegrains and convert_dttm to Druid engine spec

* Add TemporalType enum and fix test case

* Remove DATETIME for athena (original spec)
2020-06-25 12:18:37 +03:00
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
Daniel Vaz Gaspar f13ba2561c
fix(tests): custom filter flaky tests on dash and charts (#9679) 2020-04-29 08:36:11 +01:00
Lily Kuang b27a81e0da
[logging] deprecation notices for SQLite (#9662)
* [logging] deprecation notices for SQLite

* [logging] use warning for SQLite notice

* [logging] update grammar
2020-04-28 14:28:09 -07:00
Ville Brofeldt a52cfcd234
feat: Add geospatial post processing operations (#9661)
* feat: Add geospatial post processing operations

* Linting

* Refactor

* Add tests

* Improve docs

* Address comments

* fix latitude/longitude mixup

* fix: bad refactor by pycharm
2020-04-28 20:15:16 +03:00
Daniel Vaz Gaspar f07ca7d836
fix(database): test connection error message for module not found (#9634) 2020-04-27 09:24:41 +01:00
Daniel Vaz Gaspar 516bdf6db1
fix(mssql): apply limit and set alias for functions (#9644) 2020-04-27 09:23:08 +01:00
Lily Kuang b2720074bd
[datesets] feat: add statsd to datasets api (#9577)
* add statsd to tables api

* [datasets] update export endpoint

* [datasets] update charts api test
2020-04-24 16:38:29 +01:00
John Bodley 955a4fe792
[fix] Automatically add relevant Jinja methods to cache key if present (#9572)
* [fix] Adding URL params to cache key if present

* [cache] Wrapping Jinja methods

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-24 08:18:22 -07:00
John Bodley 8ae92b50ad
[fix] Fixing regression from #9161 (#9641)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-23 22:51:33 -07:00
Ville Brofeldt a6cedaaa87
chore: Improve chart data API + schemas + tests (#9599)
* Make all fields optional in QueryObject and fix having_druid schema

* fix: datasource type sql to table

* lint

* Add missing fields

* Refactor tests

* Linting

* Refactor query context fixtures

* Add typing to test func
2020-04-23 14:30:48 +03:00
Ville Brofeldt 85778f5bec
fix: broken IS NULL and IS NOT NULL operator (#9613)
* fix: broken is null and is not null operator

* add unit tests

* Rename filter operator enum
2020-04-22 19:11:45 +03:00
ʈᵃᵢ 0b999e3b91
[charts] adds new filters ui (#9530)
* [charts] adds new filters ui

* move null check to be more visible

* better filter lists and async filter functionality
2020-04-21 12:04:11 -07:00
Lily Kuang 7cefc89c64
[charts] feat: add statsd to charts api (#9571)
* add statsd to charts api

* update test for charts api

* [charts] add statsd asserts wrapper

* [charts] update api test

* removed white space
2020-04-21 19:57:42 +01:00
John Bodley 237ac59474
[fix] Fixing issue with Jinja filter_value (#9582)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-20 09:44:45 -07:00
Ville Brofeldt 0472c11157
fix: Add deprecated fields to QueryObject schema (#9579)
* fix: Add deprecated fields to QueryObject schema

* linting
2020-04-18 20:28:57 +03:00
Ville Brofeldt 8e439b1115
chore: Add OpenAPI docs to /api/v1/chart/data EP (#9556)
* Add OpenAPI docs to /api/v1/chart/data EP

* Add missing fields to QueryObject, fix linting and unit test errors

* Fix unit test errors

* abc

* Fix errors uncovered by schema validation and add unit test for invalid payload

* Add schema for response

* Remove unnecessary pylint disable
2020-04-17 16:44:16 +03:00
John Bodley 074e3653e2
[fix] warm up cache error handling (#9560)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-16 15:19:32 -07:00
Daniel Vaz Gaspar 7b11b44abe
[dashboard] New, add statsd metrics to the API (#9519) 2020-04-16 10:54:45 +01:00
Bogdan 3574a3a4fb
Make email parsing more robust (#9523)
* Make email parsing more robust

* Address comment

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-04-15 16:58:03 +03:00
Aliaksei Kushniarevich ef5e11f45b
[copy] fix: Row Level Security get_rls_filters func SELECT statement (#9541)
* fix: Row Level Security get_rls_filters func SELECT statement

* More general RowLevelSecurityTests case to avoid improper ids matching
2020-04-15 16:41:54 +03:00
Daniel Vaz Gaspar d81f720502
[thumbnails] API and celery task for dashboards and charts (#8947) 2020-04-15 09:40:14 +01:00
Jianchao Yang 7b4b0d1c61
[Build] Add Github workflows (#9517)
As an replacement to Travis CI.
2020-04-14 13:38:09 -07:00
Daniel Vaz Gaspar 925d8b5315
[dashboard] Fix, improve test for custom filter (#9521) 2020-04-14 10:10:14 +01:00
Ville Brofeldt 9447381549
deprecate groupby controls in query_obj (#9366)
* Deprecate groupby from query_obj

* Fix query_object bug

* Fix histogram

* Remove groupby from legacy druid connector and fix first batch of unit tests

* Deprecate some unnecessary tests + fix a few others

* Address comments

* hide SIP-38 changes behind feature flag

* Break out further SIP-38 related tests

* Reslove test errors

* Add feature flag to QueryContext

* Resolve tests and bad rebase

* Backport recent changes from viz.py and fix broken DeckGL charts

* Fix bad rebase

* backport #9522 and address comments
2020-04-14 12:06:10 +03:00
Daniel Vaz Gaspar 622561f756
[charts] New, custom filter for name OR description (#9492)
* [charts] New, custom filter for name OR description

* Improve test
2020-04-11 07:25:54 +01:00
Bogdan 02b3fb1d63
Add visualization flow to the CTA queries (#9370)
* Visualize after running Ctas query (#4)

* Visualize after running Ctas query.

Stub for table viz

Work on the viz

Add JS functionality for Ctas viz

Add test for the table viz flow

Fix test

Add js test for the ctas viz

* Fix tests

* Resolve comments

* Leverate tmpSchema in the query object

* Fix i18n string

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-04-11 00:46:46 +03:00
Ville Brofeldt a8ce3bccdf
feat: Add post processing to QueryObject (#9427)
* Add post processing to QueryObject

* Simplify sort signature and require explicit sort order

* Add new operations and unit tests

* linting

* Address comments

* Simplify test method names

* Address comments

* Linting

* remove unnecessary logic

* Apply strict whitelisting to all getattr calls

* Add checking of rolling_type_options and add/improve docs
2020-04-10 20:50:11 +03:00
Daniel Vaz Gaspar b39e78fca5
[dashboards] New, tittle and slug OR filter (#9435)
* [dashboards] New, tittle and slug OR filter

* Update requirements, because of prison bump

* Tests

* Fix tests

* Avoid like filter on empty string value

* merge master brings strict typing to the table
2020-04-09 11:14:28 +01:00
Daniel Vaz Gaspar bb80ceaccc
[dashboards] Fix, update dashboard owners not propagating to charts o… (#9484)
* [dashboards] Fix, update dashboard owners not propagating to charts owners

* Add tests

* Fix tests

* better naming
2020-04-09 09:37:37 +01:00
Daniel Vaz Gaspar 0610c489bb
[query] Migrate api v1 query to new location (#9479)
* [query] Migrate api v1 query to new location

* Improved errors and tests

* [query] nit and revert undesired change

* [query] lint

* [query] revert nan change

* Update superset/queries/api.py

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

* Update tests/queries/api_tests.py

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

* change endpoint location to charts

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-04-09 09:05:49 +01:00
Daniel Vaz Gaspar 4485800e21
[tests] refactor, change datasets and charts to it's own folder (#9487) 2020-04-08 08:44:35 +01:00
dandanhub 72f051f3ce
[sqllab] Add CUSTOM_TEMPLATE_PROCESSOR config (#9376)
Co-authored-by: Dandan Shi <dshi@dropbox.com>
2020-04-07 21:00:42 +01:00
David Aaron Suddjian 5e535062da
Filter owners select by text input (#9337)
* filter owners select by text input

* use rison

* fix backend owners filter logic

* use fullname, not username on owners inputs

* fix some tests

* fixing tests

* deterministic tests

* appease linter

* add back search by username

* more comprehensive filter test

* add clarifying text

* formatting...
2020-04-07 09:09:02 -07:00
Daniel Vaz Gaspar c0807c1af7
[query] New, readonly API (#9403)
* [query] New, readonly API

* Update tests/queries/api_tests.py

Co-Authored-By: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-04-06 11:18:32 +01:00
Jianchao Yang 801e2f1777
chore: bump black to 19.10b0 and mypy to 0.770 (#9378)
* Bump black to 19.10b0

* Upgrade mypy to 0.770

* Update how inline type is defined
2020-04-04 13:23:18 -07:00
Daniel Vaz Gaspar 752de8fe9d
[dashboards] Fix, API update slug uniqueness refusing empty string (#9417)
* [dashboards] Fix, API update slug uniqueness refusing empty string

* [dashboards] tests
2020-03-30 16:10:08 +01:00
Ville Brofeldt 499f9c8fca
feat: add SSL certificate validation for Druid (#9396)
* feat: add SSL certificate feature

* Address comments

* don't mutate extras

* Address comments and add polish

* Add further polish
2020-03-27 19:07:07 +02:00
Daniel Vaz Gaspar 81971967c3
[charts] New, bulk delete API endpoint (#9387)
* [charts] New, bulk delete API endpoint

* [charts] Fix, typos

* [charts] Fix wrong model name
2020-03-27 09:31:01 +00:00
Daniel Vaz Gaspar 40bc1b33d2
[dataset] New, export API endpoint (#9367)
* [dataset] New, export API endpoint

* Fix, lint
2020-03-27 09:30:23 +00:00
John Bodley 19da9042ff
[cache] Cleaning up viz/cache logic (#9375)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-03-26 09:22:06 -07:00
Grace Guo 6b0f62a36e
[explore view] fix long query issue from Run in SQL LAB Button (#9345)
* [explore view] fix long query issue from Run in SQL LAB Button

* SQL Lab page needs to take the post form data, too

* fix variable names

* updated payload dict, rename hidden form

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-03-25 13:15:52 -07:00
Daniel Vaz Gaspar ccb22dc976
[dataset] columns and metrics API (nested) (#9268)
* [dataset] columns and metrics API (nested)

* [dataset] tests and validation

* [datasets] Fix, revert list field name to database_name
2020-03-24 17:24:08 +00:00
Daniel Vaz Gaspar f51ab59748
[charts] Refactor API using SIP-35 (#9329)
* [charts] Refactor charts API using SIP-35

* [charts] Fix, copy pasta

* [charts] simplify
2020-03-24 10:05:11 +00:00
Maxime Beauchemin 98a71be80b
feat: [explore] don't save filters inherited from a dashboard (#9340)
* feat: [explore] don't save filters inherited from a dashboard

When navigating to explore from a dashboard context, the current
dashboard filter(s) are passed along to explore so that the context is
kept. So say you're filtering on "country=Romania", in your dashboard
and pivot to explore, that filter is still there and keep on exploring.

Now a common issue is that you'll want to make some tweak to your chart
that are unrelated to the filter, say toggling the legend off for
instance, and then save it. Now you back to your dashboard and even
though you started with an "all countries" dashboard, with a global
filter on country, now that one chart is stuck on "Romania". Typically
you notice this when filtering on something else, say "Italy" and then
that one chart now has two mutually exclusive filters, and show "No data".

Now, the fix is to flag the filter as "extra" (that's the not-so-good internal
name we use for these inherited filters) and make it clear that that
specific filter is special and won't be saved when saving the chart.

* fix build
2020-03-23 23:05:00 -07:00
Daniel Vaz Gaspar c34df6b7b3
[dashboard] Refactor API using SIP-35 (#9315)
* [dashboard] Refactor API using SIP-35

* [dashboard] Fix, import

* [dashboard] more tests

* [dashboards] a misc of improvements

* [charts] Fix, DAO and tests

* [dashboards] small exceptions refactor

* [dashboards] lint

* [dashboards] Improves comments on base classes

* [dashboards] lint
2020-03-20 16:32:03 +00:00
Ville Brofeldt f1edcebc79
fix: handle list of lists from fetch_data (#9322)
* fix: handle list of lists from fetch_data

* Address comments
2020-03-18 22:04:26 +02:00
Grace Guo adebd40d30
[cache warm_up] warm_up slice with dashboard default_filters (#9311)
* [cache warm_up] warm_up slice with dashboard default_filters

* update Celery warmup tasks

* fix code review comments

* add try catch and type checking for parsed dash metadata

* extra code review fix
2020-03-18 08:21:10 -07:00
Ville Brofeldt 982c234a50
fix: remove character set and collate column info by default (#9316)
* fix: remove character set and collate column info by default

* lint

* remove collation and charset info before compile
2020-03-17 21:34:39 +02:00
Maxime Beauchemin 6cf36c91ea
fix: big number to handle NULL as it did in the past (#9314) 2020-03-17 10:46:59 -07:00
ʈᵃᵢ 5767fb15cd
[datasets] new, listview (react) (#9197)
* [datasets] new, react listview

* add hidden columns to support filtering by columns not rendered

* throw exception if config is incorrect

* fix database filter

* update endpoints to point to datasets; fix translation strings

* move Link into src/components

* add add new record button to datasets listview
2020-03-13 21:35:00 +02:00
Erik Ritter f80fadff0e
Reduce dashboard bootstrap payload (#9284) 2020-03-13 12:18:22 -07:00
Daniel Vaz Gaspar 78ba7d52f6
[dashboard][api] Fix, PUT publish/draft to not clean slug and owners (#9279) 2020-03-12 15:35:27 +00:00
Ville Brofeldt 3682702e91
fix: add connection testing params for snowflake (#9272)
* fix: add connection testingt params for snowflake

* Linting
2020-03-11 06:51:57 +02:00
Grace Guo 724b8a3c31
[fix] copy filter_scopes with duplicate charts (#9271) 2020-03-10 10:23:15 -07:00
Maxime Beauchemin c04d6163e7
feat: add rolling window support to 'Big Number with Trendline' viz (#9107)
* Rolling big number

* addressing comment
2020-03-10 10:19:12 -07:00
Maxime Beauchemin 116200cf73
fix: change database save in DatasourceEditor (#9255)
* fix: change database save in DatasourceEditor

This addresses the issue where pointing a datasource to another database
in the datasource editor is not reflected.

Also addresses:
- a minorcosmetic issue in the datasource editor.
- user/owners list not getting populated

* tests
2020-03-10 09:20:37 -07:00
Daniel Vaz Gaspar 52c59d6890
[datasets] new, API using command pattern (#9129)
* [datasets] new, API using command pattern

* [datasets] tests and improvements

* [datasets] lint

* [database] address comments

* [datasets] lint

* [datasets] Address PR comments

* [dataset] Fix, dataset expects a Dict now

* [dataset] lint and optional commits

* [dataset] mypy

* [dataset] Fix, license and parent class

* [dataset] Make CRUD DAO raise exceptions
2020-03-08 09:13:08 +00:00
Erik Ritter f34e9e393a
Replace No data error with help message (#9249) 2020-03-06 16:11:01 -08:00
Grace Guo 000a038af1
[fix] use filter_scopes in dashboard warmup strategy (#9235)
* [fix] use filter_scopes in dashboard warmup strategy

* remove unnecessary comment
2020-03-05 17:50:32 -08:00
Ville Brofeldt ef2ebbd570
Add option to specify type specific date truncation functions (#9238) 2020-03-05 07:25:50 +02:00
Ville Brofeldt 969bc87431
fix: Oracle fetch_query and datetime conversion (#9240) 2020-03-04 23:43:28 +02:00
Ville Brofeldt 7a91498cf1
fix: share column type matching between model and result set (#9161)
* Share column type matching between model and result set

* Address comments
2020-03-04 16:33:22 +02:00
Bogdan 4e1fa95035
Make schema name for the CTA queries and limit configurable (#8867)
* Make schema name configurable

Fixing unit tests

Fix table quoting

Mypy

Split tests out for sqlite

Grant more permissions for mysql user

Postgres doesn't support if not exists

More logging

Commit for table creation

Priviliges for postgres

Update tests

Resolve comments

Lint

No limits for the CTA queries if configures

* CTA -> CTAS and dict -> {}

* Move database creation to the .travis file

* Black

* Move tweaks to travis db setup

* Remove left over version

* Address comments

* Quote table names in the CTAS queries

* Pass tmp_schema_name for the query execution

* Rebase alembic migration

* Switch to python3 mypy

* SQLLAB_CTA_SCHEMA_NAME_FUNC -> SQLLAB_CTAS_SCHEMA_NAME_FUNC

* Black
2020-03-03 19:52:20 +02:00