Commit Graph

147 Commits

Author SHA1 Message Date
Grace Guo a01c4c95db
fix: [alert] should run alert query from report account (#17499)
* fix: [alert] should run alert query from report account

* add solution2: override username for get_df

* add integration test
2021-12-16 12:12:43 +00:00
Beto Dealmeida c18d4862c4
chore: skip flaky test (#17772) 2021-12-15 17:06:40 -08:00
Evan Rusackas 3aa11614b5
fix: change 401 response to a 403 for Security Exceptions (#17768)
* fix: change 401 to 403 for Security Exceptions

* updating tests to reflect new (proper) status code

* another test update
2021-12-15 17:11:04 -07:00
Beto Dealmeida 0d2299cb60
fix: migration out-of-scope bind (#17728)
* fix: migration out-of-scope bind

* Bypass flaky test
2021-12-13 13:04:35 -08:00
Beto Dealmeida 3873cdff4d
feat: convert dataframe tests (#17655) 2021-12-09 09:47:53 -08:00
Geido 12bd1fcde5
fix: Save properties after applying changes in Dashboard (#17570)
* Refactor PropertiesModal

* Update json_metadata fully

* Clean up

* Verify values

* Catch changed to metadata

* Always updated dashboard info on update

* Avoid unnecessary fetches

* Formt

* Fix copy dashboards

* Fixes onUpdate onCopy handlers

* Pylint

* Update tests

* Clean up

* Handle data on show

* Change Save to Apply

* Update Cypress save test

* Update Cypress edit prop test

* Update PropertiesModal test

* Fix duplicate request with cross filters

* Improve code style

* Fix typo

* Lint
2021-12-09 10:03:07 -07:00
Ville Brofeldt 3a42071e0f
chore(sql): clean up invalid filter clause exception types (#17702)
* chore(sql): clean up invalid filter clause exception types

* fix lint

* rename exception
2021-12-09 17:49:32 +02:00
Beto Dealmeida b7ae7f976a
chore: convert feature flag tests to unit tests (#17689)
* chore: convert feature flag tests to unit tests

* Fix test
2021-12-08 14:51:47 -08:00
Geido 46cdc77ae6
fix: Redirect on 401 (#17597)
* Redirect on 401

* Bump FAB

* Format

* Update Cypress save test

* Revert Cypress change

* Bump FAB 3.4.1rc2

* Update test

* Update return statement

* Update api test

* Update datasets api test

* Update datasets api 401s to 403s

* Add typeguard

* Use Promise.resolve

* Update callApiAndParseWithhTimeout test

* Disable parseResponse test

* Try catch

* Handle npm 8 issues
2021-12-08 13:14:30 -07:00
Beto Dealmeida 8c25f2f356
fix: extract tables doesn't work with reserved keywords (#17654) 2021-12-08 05:50:42 -08:00
Ville Brofeldt c4b04952d0
feat: customize recent activity access (#17589)
* feat: customize recent activity access

* address comments

* fix and add tests

* add alert assertion and UPDATING.md entry

* replace .get_id() with .id

* fix updating comment

* update config name
2021-12-08 11:30:23 +02:00
Shiva Raisinghani cd88b8e81e
feat(prophet): enable confidence intervals and y_hat without forecast (#17658)
* enable confidence intervals and y_hat without forecast

* fix if statement

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

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2021-12-08 09:56:18 +02:00
Michael S. Molina 2ae83fac86
fix: Allows PUT and DELETE only for owners of dashboard filter state (#17644)
* fix: Allows PUT and DELETE only for owners of dashboard filter state

* Converts the values to TypedDict

* Fixes variable name
2021-12-05 22:13:09 -03:00
Kamil Gabryjelski 07e8837093
feat(explore): export csv data pivoted for Pivot Table [ID-9] (#17512)
* feat(explore): export csv data pivoted for Pivot Table

* Implement dropdown with download csv options

* Change label to "Original"

* Add tests

* Add form data to query context

* Add form data to query context generator

* Explicitly make form_data optional
2021-12-03 12:42:28 +01:00
Ville Brofeldt b2ffa268cd
fix(sqla): make text clause escaping optional (#17641) 2021-12-03 12:35:26 +02:00
AAfghahi b13d953b34
chore: Added unit test to query context change (#17624)
* a lot of console logs

* added unit test
2021-12-02 08:46:25 -08:00
Ville Brofeldt 0544bee74e
fix(api): incorrect api schema definitions (#17620) 2021-12-01 21:47:22 +02:00
Michael S. Molina 78c5d9ac27
fix: Dashboard API flaky test (#17611) 2021-12-01 10:36:13 -03:00
Michael S. Molina 2f2e8fe412
feat: Adds a key-value endpoint to store the state of dashboard filters (#17536)
* feat: Adds a key-value endpoint to store the state of dashboard filters

* Fixes pylint issues

* Adds openapi schemas

* Adds more tests, move logic to commands and use singular form for the endpoint name

* Fixes model description

* Removes database model

* Adds open api specs

* Simplifies the commands

* Adds more tests

* Validates the value content and submits the correct http status code

* Fixes import order

* Skips flakky test

* Fixes tests

* Updates UPDATING.md
2021-12-01 09:06:49 -03:00
AAfghahi d7e3a601b6
fix: Ch31968query context (#17600)
* a lot of console logs

* import and export of query context
2021-11-30 16:51:00 -08:00
Karthikeyan Singaravelan 11cf15f8dc
chore: Fix deprecated unittest aliases for Python 3.11 compatibility. (#17562)
* chore: Fix deprecated unittest aliases for Python 3.11 compatibility.

* chore: Cache pip dependencies.

* chore: Cache more pip dependencies.
2021-11-26 18:21:01 +02:00
Đặng Minh Dũng ebb34196f2
feat: trino support server-cert (#16346)
Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
2021-11-26 13:28:15 +02:00
Hugh A. Miles II 2e29f36e78
fix: RBAC for export for dashboard viewers (#17527)
* set out export

* update test

* use default dataset

* update test

* these test work

* fix test

* update

* fix

* fix test

* make the test better
2021-11-25 20:10:41 -08:00
aniaan 5a1c68177e
fix(elasticsearch): time_zone setting does not work for cast datetime expressions (#17048)
* fix(elasticsearch): cast does not take effect for time zone settings

* test(elasticsearch): add test

* fix(test): fix typo

* docs(elasticsearch): add annotation

* docs(elasticsearch): add time_zone desc

* docs(elasticsearch): fix typo

* refactor(db_engine): change convert_dttm signature

* fix(test): fix test

* fix(es): add try catch

* fix(test): fix caplog

* fix(test): fix typo
2021-11-25 11:58:44 +02:00
Geido 83e49fc9ee
feat: Certify Charts and Dashboards (#17335)
* Certify charts

* Format

* Certify dashboards

* Format

* Refactor card certification

* Clear details when certified by empty

* Show certification in detail page

* Add RTL tests

* Test charts api

* Enhance integration tests

* Lint

* Fix dashboards count

* Format

* Handle empty value

* Handle empty slice

* Downgrade migration

* Indent

* Use alter

* Fix revision

* Fix revision
2021-11-24 13:42:52 +02:00
Michael S. Molina 76024313c6
fix: Dashboard access when DASHBOARD_RBAC is disabled (#17511)
* fix: Dashboard access when RBAC is disabled

* Sends 403 when forbidden

* Fixes issort

* Changes assertion

* Allow access to unpublished dashboards that don't have roles

* Fixes the test_get_dashboard_changed_on test
2021-11-23 11:45:32 -03:00
Long Le Xich bc855f4040
fix(hive): Update _latest_partition_from_df in HiveEngineSpec to work on tables with multiple indexes (#14302)
* Fix _latest_partition_from_df in HiveEngineSpec

* Add test HiveEngineSpec._latest_partition_from_df

* Fix formatting to pass black

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-11-23 10:07:47 +02:00
ofekisr 16e012fe5d
refactor(chart.commands): separate commands into two different modules (#17509)
refactor: move imports under TYPE_CHECKING
2021-11-22 19:57:52 +02:00
Kamil Gabryjelski 1f8eff72de
fix: Always use temporal type for dttm columns [ID-2] (#17458)
* fix: Always use temporal type for dttm columns

* move inference and implement in chart postproc

* fix test

* fix test case

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-11-22 15:40:38 +01:00
ofekisr 66d756955b
refactor(QueryContext): separate all processing concerns into QueryContextProcessor (#17497) 2021-11-22 10:01:01 +02:00
Rafał Ganczarek 8da982bc7c
fix(presto): expand data with null item (#17470)
* fix(presto): expand data with null item

* Fixed pre-commit check
2021-11-21 20:10:35 +02:00
AAfghahi 69c3cc712d
chore(sql_lab): Added Unit Test for stop query exception (#17464)
* added unit test

* feedback implemented
2021-11-19 12:58:12 -05:00
Daniel Vaz Gaspar 69f9ee8f5e
fix: feature flags typing (#15254)
* fix: feature flags typing

* fix tests

* add note in UPDATING.md

* fix frontend

* also move SCHEDULED_QUERIES to top level

* fix test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-11-19 15:56:16 +00:00
ofekisr 683d1dab13
refactor(QueryObject): decouple from superset (#17479)
* refactor: queryObject - decouple from superset

* refactor: queryObject - decouple from superset
2021-11-18 19:53:56 +02:00
ofekisr 377db1bd71
refactor: queryObject - add QueryObjectFactory (#17466) 2021-11-18 17:38:17 +02:00
binome74 211b32a4cd
fix(mssql): week time grain should respect datefirst setting (#10811)
* "P1W" grain should respect DATEFIRST setting in MS SQL Server

* Added "week_start_sunday" and "week_start_monday" grains support. Adjusted the "week" grain for better backward compatibility with MS SQL 2005/2008.

* Stylistic and linter-requested changes

* fix test

Co-authored-by: Valeriy Aleksashkin <v.aleksashkin@gmail.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-11-16 09:36:37 +02:00
Ville Brofeldt e2a429b0c8
feat(explore): adhoc column expressions [ID-3] (#17379)
* add support for adhoc columns to api and sqla model

* fix some types

* fix duplicates in column names

* fix more lint

* fix schema and dedup

* clean up some logic

* first pass at fixing viz.py

* Add frontend support for adhoc columns

* Add title edit

* Fix showing custom title

* Use column name as default value in sql editor

* fix: Adds a loading message when needed in the Select component (#16531)

* fix(tests): make parquet select deterministic with order by (#16570)

* bump emotion to help with cache clobbering (#16559)

* fix: Support Jinja template functions in global async queries (#16412)

* Support Jinja template functions in async queries

* Pylint

* Add tests for async tasks

* Remove redundant has_request_context check

* fix: impersonate user label/tooltip (#16573)

* docs: update for small typos (#16568)

* feat: Add Aurora Data API engine spec (#16535)

* feat: Add Aurora Data API engine spec

* Fix lint

* refactor: sql_json view endpoint: encapsulate ctas parameters (#16548)

* refactor sql_json view endpoint: encapsulate ctas parameters

* fix failed tests

* fix failed tests and ci issues

* refactor sql_json view endpoint: separate concern into ad hod method (#16595)

* feat: Experimental cross-filter plugins (#16594)

* fix:fix get permission function

* feat: add cross filter chart in charts gallery under FF

* chore(deps): bump superset-ui to 0.18.2 (#16601)

* update type guard references

* fix imports

* update series_columns schema

* Add changes that got lost in rebase

* Use current columns name or expression as sql editor init value

* add integration test and do minor fixes

* Bump superset-ui

* fix linting issue

* bump superset-ui to 0.18.22

* resolve merge conflict

* lint

* fix select filter infinite loop

* bump superset-ui to 0.18.23

* Fix auto setting column popover title

* Enable adhoc columns only if UX_BETA enabled

* put back removed test

* Move popover height and width to constants

* Refactor big ternary expression

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Rob DiCiuccio <rob.diciuccio@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: joeADSP <75027008+joeADSP@users.noreply.github.com>
Co-authored-by: ofekisr <35701650+ofekisr@users.noreply.github.com>
Co-authored-by: simcha90 <56388545+simcha90@users.noreply.github.com>
2021-11-15 12:50:08 +02:00
ofekisr 5d3e1b5c2c
refactor: ChartDataCommand into two separate commands (#17425) 2021-11-15 01:00:08 +02:00
ofekisr d8851c9a89
refactor(TestChartApi): move chart data api tests into TestChartDataApi (#17407)
* refactor charts api tests

* move new added test

* refactor charts api tests
2021-11-14 23:35:23 +02:00
Ville Brofeldt ad8a7c42f9
fix: avoid escaping bind-like params containing colons (#17419)
* fix: avoid escaping bind-like params containing colons

* fix query for mysql

* address comments
2021-11-13 09:01:49 +02:00
Elizabeth Thompson f10bc6d8fe
fix: add fallback and validation for report and cron timezones (#17338)
* add fallback and validation for report and cron timezones

* add logging to exception catch

* Run black

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-11-12 12:28:17 -08:00
John Bodley bcef8fa13b
feature: Add quarter unit to datetrunc (#17416)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-11-12 09:46:55 -08:00
ofekisr 9ce6b7de83
refactor ChartDataCommand - separate loading query_context form cache into different module (#17405) 2021-11-12 14:44:21 +02:00
ofekisr 45480f7ae5
refactor move ChartDataResult enums to common (#17399) 2021-11-11 11:41:37 +02:00
Francesco Frassinelli 0d77f36679
fix: handle TIME column serialization (#16869)
* Add support for datetime.time in json_int_dttm_ser

* Test base_json_conv support for datetime.time

* Group types by conversion function for JSON dump
2021-11-11 10:35:00 +02:00
Kamil Gabryjelski fa51b3234e
fix(dashboard): Return columns and verbose_map for groupby values of Pivot Table v2 [ID-7] (#17287)
* fix(dashboard): Return columns and verbose_map for groupby values of Pivot Table v2

* Refactor

* Fix test and lint

* Fix test

* Refactor

* Fix lint
2021-11-05 16:05:48 +01:00
Hugh A. Miles II e5fe18660c
fix: Show sqllab state when deleting databases (#17331)
* saving

* fix ts

* update test

* update test

* log unit

* updated test
2021-11-04 20:17:08 -04:00
Beto Dealmeida 1fbce88a46
fix: set correct schema on config import (#16041)
* fix: set correct schema on config import

* Fix lint

* Fix test

* Fix tests

* Fix another test

* Fix another test

* Fix base test

* Add helper function

* Fix examples

* Fix test

* Fix test

* Fixing more tests
2021-11-04 11:09:08 -07:00
John Bodley 36f489eea0
fix: Normalize prequery result type (#17312)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-11-03 13:58:40 -07:00
Beto Dealmeida cb34a22684
fix: import should accept old keys (#17330)
* fix: import should accept old keys

* Fix lint

* Preserve V1 schema
2021-11-03 11:25:30 -07:00