Commit Graph

250 Commits

Author SHA1 Message Date
Erik Ritter
e969edc451 fix: Bust chart cache when metric/column is changed (#15786) 2021-07-21 07:46:20 -07:00
Elizabeth Thompson
618a354ca1 Revert "quote column name if db requires (#15465)" (#15752)
This reverts commit 80b8df0673.
2021-07-19 10:31:05 -07:00
Yongjie Zhao
0721f54580 fix: use expected label in the metrics map (#15707)
* fix: use expected label in metrics map

* added comments

* fix type
2021-07-16 14:02:00 +08:00
Guy Doulberg
bee386e643 feat: supporting jinja templating in saved metrics (#15502)
* feat: supporting jinja templating in saved metrics

* cutting the line length to fit requirements

* follwing PR I should have not created a new insance method

* running precommit locally and fixing the issue

Co-authored-by: Guy <guy@nexite.io>
2021-07-06 00:00:13 +08:00
Elizabeth Thompson
80b8df0673 quote column name if db requires (#15465)
Co-authored-by: hughhhh <hughmil3s@gmail.com>
2021-07-02 12:48:24 -05:00
Ville Brofeldt
822eb2e27e feat(sql): add jinja support to metrics and expressions (#15247)
* feat(sql): add jinja support to metrics and expressions

* add test
2021-06-19 08:29:04 +03:00
Beto Dealmeida
8e7f0237ab fix: apply template_params on external_metadata (#14996)
* fix: apply template_params on external_metadata

* Fix test
2021-06-04 18:12:22 -07:00
Yongjie Zhao
e6bc7c99e7 feat: add type_generic and is_dttm to table metadata (#14863) 2021-06-03 08:20:47 +08:00
Yongjie Zhao
f4de0dcb65 fix: is_temporal should overwrite is_dttm (#14894)
* fix: is_temporal should overwrite is_dttm

* move up
2021-06-02 18:00:15 +08:00
Yongjie Zhao
6bdbd2bf50 fix: the calculated columns explicit type convert into date (#14813) 2021-05-26 20:33:20 +08:00
Ville Brofeldt
e9657afe4b feat(native-filters): add search all filter options (#14710)
* feat(native-filters): add search all filter options

* add tests

* fix default value

* implement ILIKE operator

* rebump packages

* fix test

* address comments

* fix state changes coming from application

* fix debouncer
2021-05-24 16:33:59 +03:00
cccs-jc
590fe20a45 feat: Add a remove filter_flag to jinja filter_values function (#14507)
Implementation issue 13943

Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
2021-05-21 19:37:09 +03:00
Ajay M
90378ed94e fix(explore): #10098 boolean filter not working (#14567)
* Restrict operators when column is boolean

* refactor 'isOperatorRelevant' a little bit

* Include 'BOOLEAN' to handle presto

* Update tests

* number column should show bool operators

* fix test - some dbs translate true/false to 1/0

* Fix tests and add linting

* When column type is boolean, show bool operators

* Address PR comments - simplify conditions

* Fix a linting error

* Addressing PR comment - remove unused variables
2021-05-18 14:39:19 -07:00
Ville Brofeldt
97c9e37c24 perf: memoize db_engine_spec in database (#14638)
* perf: memoize db_engine_spec in sqla table classes

* remove extended cypress timeouts
2021-05-14 12:49:35 +03:00
Ville Brofeldt
3f6bd1e4a4 feat: add generic type to column payload (#14547)
* feat: add generic type to column payload

* feat: add generic type to column payload

* xit flaky test
2021-05-13 09:36:09 +03:00
Ville Brofeldt
c760030b83 fix(sqla): timeseries limit not applied when using columns (#14297) 2021-04-22 10:38:28 +03:00
Ville Brofeldt
15ac075b78 fix(sqla): labels_expected contains mutated label (#14095) 2021-04-13 16:19:52 +03:00
Hugh A. Miles II
a4fd6b8f33 fix: Use superset generic db to catch external_metadata queries (#13974) 2021-04-10 10:15:03 -04:00
John Bodley
a3b41e2bac fix: Issue 13956 (#13980)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-04-09 15:21:58 +12:00
Beto Dealmeida
c60a93db9c feat: add extract_errors to Postgres (#13997)
* feat: add extract_errors to Postgres

* Add unit tests

* Fix lint

* Fix unit tests
2021-04-08 13:24:54 -07:00
Ville Brofeldt
b427a80a4f fix(sqla): apply sqla type on calculated columns (#14014) 2021-04-08 10:59:26 +03:00
Phillip Kelley-Dotson
34991f5fab fix(explore): strip semicolons in virtual table SQL (#13801)
* add method to strip semicolon

* address comments

* test the test

* Update tests/sqla_models_tests.py

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>

* Update tests/sqla_models_tests.py

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

* fix test

* add suggestion

* fix trailing space

* remove logger

* fix unit test

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2021-04-06 13:40:34 -07:00
Jesse Yang
4789074309 fix(sqla-query): order by aggregations in Presto and Hive (#13739) 2021-04-01 18:10:17 -07:00
Ville Brofeldt
13f7e0d755 feat(native-filters): add temporal support to select filter (#13622) 2021-03-18 16:15:43 +02:00
Erik Ritter
64785c20bd feat: add warning metadata to tables and metrics (#13606) 2021-03-17 21:27:34 -07:00
Jesse Yang
bd1d6acb0c fix(query): order by adhoc metrics should trigger group by (#13434)
* fix(query): properly select adhoc metrics in orderby

* Throw error when sql is empty

* Allow `metrics` to be None

* Always use alias in orderby for metrics

* Bump table chart version and migrate histogram to typescript

* Fix Histogram without groupby

* Fix Presto birth names test

* Raw records mode should not aggregate
2021-03-16 21:00:03 -07:00
Nikola Gigić
609c3594ef feat(explore): Postgres datatype conversion (#13294)
* test

* unnecessary import

* fix lint

* changes

* fix lint

* changes

* changes

* changes

* changes

* answering comments & changes

* answering comments

* answering comments

* changes

* changes

* changes

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests
2021-03-12 10:36:43 +02:00
Jesse Yang
b9884fb55b fix: IS NULL filter operator for numeric columns (#13496) 2021-03-10 10:15:25 -08:00
Ville Brofeldt
375797f649 feat(native-filters): add timegrain and column filter (#13484)
* feat(native-filters): add timegrain and column filter

* add fetch values predicate

* bump deps

* lint

* fix test

* add python test for legacy merge

* fix default value and isInitialized to not check strict equality

* Address comments

* add FilterValue type

* address review comments
2021-03-09 17:27:46 +02:00
Ville Brofeldt
0a00153375 feat(chart-data): add rowcount, timegrain and column result types (#13271)
* feat(chart-data): add rowcount, timegrain and column result types

* break out actions from query_context

* rename module
2021-02-24 07:43:47 +02:00
Ville Brofeldt
c1e10c4627 fix: sorting by saved metric (#13059) 2021-02-10 21:45:45 +02:00
Ville Brofeldt
2f6d1ff4cd chore: remove SIP-38 feature flag (#12894) 2021-02-03 09:41:44 +02:00
Grace Guo
fd2d87340b fix: Config for dataset health check (#12906) 2021-02-02 22:41:25 -08:00
Ville Brofeldt
36c43113e7 fix(explore): missing select when groupby without metrics (#12890) 2021-02-02 17:14:30 +02:00
Beto Dealmeida
dcef5e1381 fix: remove explicit cursor closing for BQ (#12836) 2021-01-29 14:32:47 -08:00
Jesse Yang
e3db935c62 refactor: migrate table chart to new API (#10270)
* refactor: migrate table chart to new API

* chore: bump superset-ui to 0.17.0

* Fix Cypress tests

* Apply soft-conversion to numeric metrics

Fix time column formatting test

* Add translation to chart does not exist error

* Bump to 0.17.1
2021-01-29 13:12:09 +02:00
Jesse Yang
c14ed80f28 refactor: rename DbColumnType to GenericDataType (#12617) 2021-01-20 10:07:42 -08:00
Jesse Yang
deebd6f738 fix(viz): missing groupby and broken adhoc metrics for boxplot (#12556) 2021-01-15 17:03:12 -08:00
David Aaron Suddjian
b5dd0f32cc feat: Dynamically imported viz plugins (#10288)
* first attempts at dynamic plugin loading

* dynamic import working for explore

* memoize appropriately

* add a backend for dynamic plugins

* hack at getting dynamic plugins working with dashboards

* more work on making it work, + feature flag

* lint

* actions to fix explore state when plugins load

* handle dynamic control panel, functionify ExploreViewContainer

* fix: rearrange migrations branch

* fix: name and key as strings with length 50

* bundle url length 2000

* bundle url to text
for some reason not supported on my sql

* fix: too long varchart

* fix: pre-commit typing

* fix: licenses

* fix: add slice container was not initing feature flags

* fix: undo linting issue

* fix: adjust down revision again

* fix: adjust down revision again

* isort

* pylint

* god damn linters

* remove unnecessary(?) loading message

* only log non-standard errors

* testing

* python is terrible

* see above commit message

* fix imports in DynamicPluginProvider

* fix

* shift migration forward

* lint

* fix form data calculations to handle missing control config

* temp commit - waiting for superset-ui changes and crud fixes

* remove unnecessary todo

* use new superset-ui shared module function

* fetch the plugins instead of hardcoding the test one

* migration sort

* remove duplicated import statement

* format

* try moving the import 🙄

* copy

* fix frontend tests

* safe access

* comment out dead code

* isort

* disable pylint on necessary lines

* use @superset-ui/logging instead of console

* remove temp code

* rearrange some code

* try triggering mouseover in cypress before click

* use loading spinner instead of text

* trying to fix cypress

* attempt cypress fix

* customize permissions

* update package lock

* only admins can write to plugins by default

* better copy

* disable flaky tests

* use makeApi

* flaky tests

* cleanup code

* flaaaakkkyyyyyy

* dry

Co-authored-by: amitNielsen <amit.miran@nielsen.com>
2020-12-19 07:06:11 -08:00
Grace Guo
8da1900d8a feat: add hook for dataset health check (#11970)
* feat: add hook for dataset health check

* add event log

* optimize datasource json data like certified data

* add unit test

* fix review comments

* extra code review comments
2020-12-15 18:12:06 -08:00
Daniel Vaz Gaspar
916f7e923a fix(dataset): fetch metadata on dataset creation may raise broad exceptions (#11973)
* fix(dataset): fetch metadata on dataset creation may raise broad driver exceptions
2020-12-11 11:07:43 +00:00
Bogdan
0396c705d4 chore: Support SET & SHOW commands as read only SQL commands (#11868)
* Support SET & SHOW commands as read only SQL commands

* Move is_readonly definition into the engine spec

* Rename & use super()

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-12-03 10:44:11 -08:00
Erik Ritter
c0224aa928 feat: add certification info to table selector (#11785) 2020-11-24 12:13:52 -08:00
Ville Brofeldt
7ae8cd07cc fix: do not drop calculated column on metadata sync (#11731) 2020-11-18 08:33:14 -08:00
Rob DiCiuccio
01d15f5368 feat(templating): Safer Jinja template processing (#11704)
* Enable safer Jinja template processing

* Allow JINJA_CONTEXT_ADDONS with SAFE_JINJA_PROCESSING

* Make template processor initialization less magical, refactor classes

* Consolidat Jinja logic, remove config flag in favor of sane defaults

* Restore previous ENABLE_TEMPLATE_PROCESSING default

* Add recursive type checking, update tests

* remove erroneous config file

* Remove TableColumn models from template context

* pylint refactoring

* Add entry to UPDATING.md

* Resolve botched merge conflict

* Update docs on running single python test

* Refactor template context checking to support engine-specific methods
2020-11-17 11:55:47 -08:00
Beto Dealmeida
45738ffc1d chore: consolidate datasource import logic (#11533)
* Consolidate dash import logic

* WIP

* Add license

* Fix lint

* Retrigger tests

* Fix lint
2020-11-11 22:04:16 -08:00
Ville Brofeldt
600a6fa92a chore(rls): move to feature flag and disable related view (#11575)
* chore(rls): move to feature flag and disable related view

* rename feature flag
2020-11-05 12:19:48 +02:00
Erik Ritter
ca40877640 feat: add certifications to tables (#11450) 2020-10-30 11:28:01 -07:00
Ville Brofeldt
ecdff724ea feat: enable metadata sync for virtual tables (#10645)
* feat: enable metadata sync for virtual tables

* add migration and check for empty schema name

* simplify request

* truncate trailing column attributes for MySQL

* add unit test

* use db_engine_spec func to truncate collation and charset

* Remove redundant migration

* add more tests

* address review comments and apply templating to query

* add todo for refactoring

* remove schema from tests

* check column datatype
2020-10-27 07:58:38 +02:00
Ville Brofeldt
8575439f48 fix: is_temporal should be overridden by is_dttm value (#11429) 2020-10-27 07:22:27 +02:00