Commit Graph

336 Commits

Author SHA1 Message Date
Michael S. Molina bb1db9e86f
fix: Deque mutated during iteration (#24550) 2023-06-29 12:12:12 -03:00
cwegener f1b003f109
refactor: pkg_resources -> importlib.metadata (#24514) 2023-06-28 15:25:50 -07:00
Kamil Gabryjelski 83ff4cd86a
feat: Implement currencies formatter for saved metrics (#24517) 2023-06-28 20:51:40 +02:00
Daniel Vaz Gaspar 0ddc0a6738
chore: remove marshmallow-enum dependency and bump FAB (#24499) 2023-06-27 08:37:43 +01:00
Ville Brofeldt ea89949118
fix(oracle): denormalize column names where applicable (#24471) 2023-06-21 22:35:46 +03:00
Rob Moore d5f88c18f6
fix(charts): Fix chart load task error handling (#24447) 2023-06-21 15:21:14 +03:00
Hugh A. Miles II 93e1db4bd9
fix: save columns reference from sqllab save datasets flow (#24248) 2023-06-20 13:54:19 -04:00
John Bodley 3e76736874
chore(dao): Organize DAOs according to SIP-92 (#24331)
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
2023-06-18 18:32:32 -07:00
Hugh A. Miles II eb05225f0d
feat(sshtunnel): add configuration for SSH_TIMEOUT (#24369) 2023-06-13 12:29:40 -04:00
John Bodley 2b364898a5
fix: Address regression introduced in #22853 (#24121) 2023-06-12 15:32:40 -07:00
Michael S. Molina 4e47771df1
fix: Viz migration adjustments - 1 (#24341) 2023-06-09 15:39:23 -03:00
Michael S. Molina e5b7f7c9b5
fix: Time shifts with different granularity for ECharts (#24176) 2023-06-08 16:03:37 -03:00
miomiocat fd3effe712
feat: support complex types and use get_columns implementation of starrrocks python client (#24237) 2023-06-08 11:08:37 -06:00
Michael S. Molina f5148ef728
feat: Migrates Dual Line Chart to Mixed Chart (#23910) 2023-06-08 12:31:28 -03:00
Michael S. Molina af24092440
feat: Migrates TreeMap chart (#23741) 2023-06-08 11:27:08 -03:00
Michael S. Molina 522eb97b65
feat: Migrates Pivot Table v1 to v2 (#23712) 2023-06-08 10:13:39 -03:00
John Bodley a4d5d7c6b9
chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
Hugh A. Miles II 8b0c68c0d2
chore(ssh): Allow users to set TUNNEL_TIMEOUT from config (#24202) 2023-05-24 16:25:02 -04:00
miomiocat f036adbc4f
feat: Add StarRocks support (#23209)
Signed-off-by: miomiocat <284487410@qq.com>
Co-authored-by: Ville Brofeldt <ville.brofeldt@apple.com>
2023-05-23 08:33:27 -06:00
Beto Dealmeida c3b96d12de
feat: split database information (#24067) 2023-05-22 13:35:58 -04:00
Ville Brofeldt 71d0543f28
fix(permalink): migrate to marshmallow codec (#24166) 2023-05-22 13:35:58 +03:00
Rob Moore 6159ced86b
fix: handle temporal columns in presto partitions (#24054) 2023-05-19 23:29:42 +03:00
jwilliams-ocient f0a26fd86a
fix(ocient): convert pyocient GIS data types to geoJSON (#23814) 2023-05-17 13:35:54 -06:00
John Bodley 2f0caf8a0d
fix: Handle python_date_format in ExploreMixin (#24068) 2023-05-16 06:54:12 -07:00
EugeneTorap 4a828f57f4
chore: Update mypy and fix stubs issue (#24033) 2023-05-12 08:47:14 +01:00
Sebastian Liebscher c963416c09
chore: remove deprecated distutils (#24001) 2023-05-11 19:00:04 +03:00
Sebastian Liebscher c8beaabab8
test: cover empty AdvancedDataTypes internet_address and internet_port (#23756) 2023-05-11 13:02:21 +03:00
Sebastian Liebscher 0788b5fdcc
chore: fix deprecation warnings for SQLALchemy URL (#23770) 2023-05-11 11:20:53 +03:00
Beto Dealmeida 2a1a061a3e
fix: handle comments in `has_table_query` (#23882) 2023-05-01 11:06:54 -07:00
EugeneTorap 689bc8ea04
chore: Use nh3 lib instead of bleach (#23862) 2023-04-28 14:36:51 +01:00
Arkadii Yakovets ff126542d8
fix(utils): evaluate date parser multiple holiday results correctly (#23685) 2023-04-26 13:59:31 +03:00
Daniel Vaz Gaspar 6ae5388dcf
fix: allow db driver distinction on enforced URI params (#23769) 2023-04-23 15:44:21 +01:00
alexclavel-ocient adde66785c
feat: Add Ocient support (#22812)
Co-authored-by: jwilliams-ocient <60358443+jwilliams-ocient@users.noreply.github.com>
Co-authored-by: Jordan Williams <jwilliams@ocient.com>
Co-authored-by: rmasters1 <100157128+rmasters1@users.noreply.github.com>
2023-04-22 19:49:32 -06:00
Ville Brofeldt 764c3c95cf
fix(mssql): apply top after distinct (#23751) 2023-04-21 17:02:59 +03:00
Daniel Vaz Gaspar 0ad6c879b3
feat: add enforce URI query params with a specific for MySQL (#23723) 2023-04-18 17:07:37 +01:00
Francisco Muniz de Paula Neto e9b4022787
fix: is_select check for lowercase select with "WITH" clauses (#22370) 2023-04-18 08:59:50 -07:00
John Bodley e8cfb31bff
fix: Ensure the reporting framework handles charts with no data (#23585) 2023-04-06 07:30:27 +12:00
Diego Medina cdc7af11bf
chore: Migrate /superset/user_slices and /superset/fave_slices to API v1 (#22964)
Co-authored-by: hughhhh <hughmil3s@gmail.com>
2023-04-03 13:29:02 -04:00
Diego Medina f2be53dd53
chore: Migrate /superset/favstar to API v1 (#23165)
Co-authored-by: hughhhh <hughmil3s@gmail.com>
2023-03-29 16:42:23 -04:00
Elizabeth Thompson b021f6e05d
feat: add new cache_query_by_user key (#23415)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2023-03-20 12:17:20 -07:00
Beto Dealmeida 2c6f581fa6
feat(postgresql): dynamic schema (#23401) 2023-03-17 17:53:42 -07:00
Beto Dealmeida 42e8d1b498
chore: improve schema security (#23385) 2023-03-17 08:05:50 -07:00
Beto Dealmeida ec6318b379
fix: permission checks on import (#23200) 2023-03-15 08:31:09 -07:00
Beto Dealmeida 1874f9a3b6
fix: dataset_macro (#23376) 2023-03-14 16:29:12 -07:00
Beto Dealmeida 1b95da7487
fix: table schema permissions (#23356) 2023-03-14 15:18:18 -07:00
Hugh A. Miles II b820eb8235
chore: Update pre-commit packages (#23173) 2023-03-13 17:05:13 -06:00
John Bodley 5f0c320415
chore: Deprecate show_native_filters (#23228) 2023-03-02 07:29:51 +13:00
Daniel Vaz Gaspar b479e93b49
fix: add disallowed query params for engines specs (#23217)
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2023-02-28 12:00:22 +00:00
Daniel Vaz Gaspar 79274eb5bc
fix: memoized decorator memory leak (#23139) 2023-02-27 15:59:11 +00:00
Antonio Rivero 3484e8ea7b
feat(ssh_tunnel): Import/Export Databases with SSHTunnel credentials (#23099) 2023-02-24 09:36:21 -08:00
Ville Brofeldt d0c54cddb0
fix(clickhouse): add clickhouse connect driver (#23185) 2023-02-24 14:04:12 +02:00
Beto Dealmeida fbf10c35a9
feat: return UUID on database creation (#23143) 2023-02-21 17:36:16 -08:00
Elizabeth Thompson 434b445e31
chore: increment statsd as warn (#23041) 2023-02-16 15:43:18 -08:00
Elizabeth Thompson 4ddf67fc14
chore: move dashboard screenshot standalone logic (#23003) 2023-02-15 14:35:08 -08:00
Daniel Vaz Gaspar 7a0f350028
fix: add new config to allow for specific import data urls (#22942) 2023-02-06 08:17:08 -08:00
JUST.in DO IT ad1ffbd723
fix(explore): unable to update linked charts (#22896) 2023-02-03 07:07:17 +13:00
Ville Brofeldt cd6fc35f60
chore(db_engine_specs): clean up column spec logic and add tests (#22871) 2023-01-31 15:54:07 +02:00
Elizabeth Thompson f2b61fca15
fix: edit pyarrow stringify to better handle emojis and accents (#22881) 2023-01-30 12:29:19 -08:00
Artem Shumeiko c839d0daf5
chore: Localization of superset pt. 2 (#22772) 2023-01-30 09:20:43 -07:00
Diego Medina 14878a160f
chore: Migrate /superset/queries/<last_updated_ms> to API v1 (#22611) 2023-01-27 13:20:56 -05:00
Antonio Rivero Martinez d6a4a5da79
feat(ssh_tunnel): Add feature flag to SSH Tunnel API (#22805) 2023-01-26 16:53:36 -08:00
Geido 3fd4718ecb
fix: Convert TIMESTAMP_* to TIMESTAMP in Snowflake (#22872) 2023-01-26 19:49:44 +01:00
Evan Rusackas 6998f65e1d
chore: removing unnecessary double spaces, a.k.a. "shotgun holes" (#22852) 2023-01-26 11:48:41 -07:00
Josh Soref 02e5dcbbf2
chore(misc): Spelling (#19678)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2023-01-25 16:35:08 -07:00
Geido 9ed2326a20
feat: Move cross filters to Dashboard (#22785) 2023-01-25 18:01:06 +01:00
Beto Dealmeida 6f0fed77cf
feat: export/import `allow_dml` flag (#22806) 2023-01-24 19:16:46 -08:00
Elizabeth Thompson d091a68909
fix: better logic to extract errors on databricks (#22792) 2023-01-20 15:35:09 -08:00
Diego Medina 3ed288d4ee
chore: Migrate /superset/stop_query/ to API v1 (#22624) 2023-01-16 14:07:52 +00:00
Elizabeth Thompson cd1f6d469b
fix: remove whitespace from http_path for databricks (#22671) 2023-01-13 14:50:18 -08:00
Hugh A. Miles II 2de19f1d66
feat: Add logging for ssh tunneling test_connection attempts (#22625) 2023-01-12 21:49:35 +00:00
Elizabeth Thompson 804e89d725
fix: stringify ValueErrors for NaT types (#22628) 2023-01-06 15:15:12 -08:00
Hugh A. Miles II ebaad10d6c
feat(ssh-tunnelling): Setup SSH Tunneling Commands for Database Connections (#21912)
Co-authored-by: Antonio Rivero Martinez <38889534+Antonio-RiveroMartnez@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2023-01-03 17:22:42 -05:00
Ville Brofeldt b6d39d194c
feat(trino): support early cancellation of queries (#22498) 2022-12-24 06:31:46 +02:00
Hugh A. Miles II 9b26794419
chore: Update dataset_id & dataset_type datasource_id & datasource_type for SPA explore (#22461) 2022-12-22 19:46:00 -05:00
Stan 7d8fff87b5
fix(assets api): import replaces dashboard (#22208)
Co-authored-by: Stan Houcke <stan.houcke@skyscanner.net>
2022-12-21 15:36:40 -08:00
Beto Dealmeida bdeedaaf80
chore: set Snowflake user agent (#22432) 2022-12-15 17:08:34 -08:00
Ville Brofeldt aa0cae9b49
feat(thumbnails): add support for user specific thumbs (#22328) 2022-12-14 15:02:31 +02:00
Antonio Rivero Martinez 60a617eaba
fix(bigquery): Properly display errors for BigQuery DBs (#22349) 2022-12-07 13:34:30 -05:00
Elizabeth Thompson 1c20206057
fix: convert <NA> values to None instead of stringifying (#22321) 2022-12-02 17:15:20 -08:00
Elizabeth Thompson 5c77f1ad2a
feat: add databricks form (#21573) 2022-12-02 10:36:27 -08:00
EugeneTorap 7bc5f04368
chore: Bump bigquery libs (#21466) 2022-12-02 12:48:36 +02:00
Yongjie Zhao 22fab5e58c
feat: Axis sort in the Bar Chart V2 (#21993) 2022-11-26 22:06:26 +08:00
EugeneTorap 394fb2f2d0
fix: slug is empty if filename is non-ASCII (#22118) 2022-11-16 10:53:30 -08:00
EugeneTorap 38a3fbdc33
feat: use a new official CH driver: clickhouse-connect (#22039) 2022-11-16 10:53:15 -08:00
Peng Ren b32de3dd9e
feat: Add a new database driver for Amazon DynamoDB (#22077) 2022-11-14 20:57:04 -08:00
Elizabeth Thompson ce145c676c
refactor: use exception status for logging (#21971) 2022-11-14 14:14:24 -08:00
Elizabeth Thompson 86d52fcbc4
chore: remove shadow write of new sip 68 dataset models (#21986) 2022-11-14 09:55:53 -08:00
Antonio Rivero Martinez 95b4c7b7fe
chore(bigquery): Add extra logging for BigQuery exceptions so we can have better insight on exceptions (#22024) 2022-11-09 22:56:08 -05:00
Daniel Vaz Gaspar e33a08693b
fix: datasource save, improve data validation (#22038) 2022-11-07 10:33:24 +00:00
Yongjie Zhao a9b229dd1d
feat: support mulitple temporal filters in AdhocFilter and move the Time Section away (#21767) 2022-11-02 08:21:17 +08:00
Ville Brofeldt a02a778cc3
feat(reports): execute as other than selenium user (#21931)
Co-authored-by: Ville Brofeldt <ville.brofeldt@apple.com>
2022-10-31 14:32:49 +02:00
AAfghahi 33fc57854d
fix: error_parsing (#21946) 2022-10-28 19:43:37 -04:00
Beto Dealmeida a88dfe24c7
fix: check that imports are ZIPs (#21875) 2022-10-26 12:15:46 -07:00
Beto Dealmeida 1388f21ee3
fix: accept old database payload (#21923) 2022-10-25 10:29:29 -07:00
Elizabeth Thompson f58227a912
feat: add denylist for db engines (#21486) 2022-10-08 19:45:21 -07:00
Hugh A. Miles II 882bfb67ae
fix: gsheets editing with dynamic forms (#21710) 2022-10-06 19:57:12 -07:00
Elizabeth Thompson e98943e580
refactor: pass all properties to validate_parameters (#21487) 2022-10-03 17:48:54 -07:00
Elizabeth Thompson ef78ec6b30
fix: catch error when masking encrypted extra is none (#21570) 2022-10-02 19:49:01 -07:00
Erik Cederstrand 82bd5a31b8
chore(deps): Unpin sqlparse dependency (#21581)
Co-authored-by: Erik Cederstrand <erik@adamatics.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2022-09-26 17:41:04 +03:00
John Bodley eac6fdcd29
chore(sqllab): Cleanup /tables/... endpoint (#21284) 2022-09-13 08:22:12 -07:00
Ville Brofeldt e1e9fda72b
fix: remove extras from all adhoc_filters controls (#21450)
Co-authored-by: Ville Brofeldt <ville.brofeldt@apple.com>
2022-09-13 15:52:21 +03:00
Hugh A. Miles II 14cd8a2160
chore: add test for SPA explore endpoints around missing datasets (#21303) 2022-09-09 10:54:39 -07:00
Yongjie Zhao ce3d38d2e7
feat: apply Time Grain to X-Axis column (#21163) 2022-09-07 16:24:15 +08:00
Beto Dealmeida 34a79add04
feat: filter parameters from DB API (#21248) 2022-09-02 11:50:04 -07:00
Daniel Vaz Gaspar 3f2e894af3
fix: dataset name change and permission change (#21161)
* fix: dataset name change and permission change
2022-08-31 18:11:03 +01:00
Beto Dealmeida 8772e2cdb3
fix: improve get_db_engine_spec_for_backend (#21171)
* fix: improve get_db_engine_spec_for_backend

* Fix tests

* Fix docs

* fix lint

* fix fallback

* Fix engine validation

* Fix test
2022-08-29 11:42:42 -07:00
Đặng Minh Dũng ccb293a083
fix(Trino): create `PrestoBaseEngineSpec` base class to share common code between Trino and Presto (#21066)
* chore: create `PrestoBaseEngineSpec` class that share common functions between Presto and Trino

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

* feat(Trino): support CertificateAuthentication

* chore(Presto): move `get_function_names` to `PrestoBaseEngineSpec`

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

* chores(Presto): remove `is_readonly_query`

* feat(Trino): implement `extra_table_metadata`

* feat(Trino): specify `User-Agent`

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

* fix: pylint

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

* chores(Presto): move `PrestoBaseEngineSpec` to `presto.py`

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

* fix(Presto): typing annotations

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
2022-08-29 10:21:28 +03:00
Yongjie Zhao 11bf7b9125
feat: generate label map on the backend (#21124) 2022-08-22 21:00:02 +08:00
AAfghahi dda1dcf8ee
feat: add header_data into emails (#20903)
* test sparkpost

* added logging info

* header function implementation

* added test

* daniel revisions

* daniel revision

* elizabeth review
2022-08-18 10:32:25 -04:00
Yongjie Zhao 1afcdfb9fa
fix: datetime value should be seconds in sqlite (#21113) 2022-08-18 11:42:58 +08:00
Ville Brofeldt 5113b01031
feat(trino): add query cancellation (#21035) 2022-08-12 07:48:29 +03:00
Hugh A. Miles II e13c5b2b7b
fix: take form_data reference for metrics for pivot_v2 table reports (#21029)
* take form_data reference for form_data

* better

* remove comments

* remove comments

* Update superset/charts/post_processing.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* add test

* test

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2022-08-11 12:08:40 -04:00
Bogdan 17b58037f8
perf: Implement model specific lookups by id to improve performance (#20974)
* Implement model specific lookups by id to improve performance

* Address comments e.g. better variable names and test cleanup

* commit after cleanup

* even better name and test cleanup via rollback

Co-authored-by: Bogdan Kyryliuk <bogdankyryliuk@dropbox.com>
2022-08-09 09:59:31 -07:00
Beto Dealmeida bb3871ddaf
feat: per-db add metrics (#20990)
* feat: per-db add metrics

* Add unit tests
2022-08-08 12:07:16 -07:00
Beto Dealmeida 7e501cd816
fix: BigQuery get_parameters_from_uri (#20966) 2022-08-03 17:27:40 -07:00
Jesse Yang 7e836e9b04
test: autouse app_context in unit tests (#20911) 2022-08-02 15:42:50 -07:00
Jesse Yang e739ff5076
feat: allow more HTML tags in report description (#20908) 2022-07-29 08:27:39 -07:00
Yongjie Zhao 718bc3062e
fix: invalid metric should raise an exception (#20882) 2022-07-28 08:15:43 +08:00
Cody Leff 84d4302628
fix(explore): Fix chart standalone URL for report/thumbnail generation (#20673)
* Update explore URLs.

* More URL fixes.

* Make frontend accept true/false query params case-insensitively.

* Fix URL mistake.

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
2022-07-19 13:53:55 -03:00
Jesse Yang e2d3ea831a
fix(db): use paginated_update for area chart migration (#20761) 2022-07-19 07:20:46 -07:00
Beto Dealmeida e60083b45b
chore: upgrade SQLAlchemy to 1.4 (#19890)
* chore: upgrade SQLAlchemy

* Convert integration test to unit test

* Fix SQLite

* Update method names/docstrings

* Skip test

* Fix SQLite
2022-07-18 15:21:38 -07:00
Elizabeth Thompson bbaa4cc65d
use existing row when id is found (#20661) 2022-07-16 00:00:39 -07:00
Elizabeth Thompson c2be54c335
fix: pandas bug when data is blank on post-processing (#20629)
* fix pandas bug when data is blank on post-processing

* account for multiple queries when data is blank
2022-07-08 16:33:53 -07:00
Yongjie Zhao 4e6e87f62e
feat: Area viz migration (#20359) 2022-07-08 19:56:03 +08:00
John Bodley f0ca158989
fix: Refactor ownership checks and ensure consistency (#20499)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-07-07 11:04:27 -07:00
Yongjie Zhao 7626c31372
feat: TreeMap migration (#20346) 2022-07-07 19:37:18 +08:00
Yongjie Zhao 414cc99ca2
fix: datetime.data in series (#20618) 2022-07-07 09:33:44 +08:00
Reese f9109583ce
fix: Allow dataset owners to explore their datasets (#20382)
* fix: Allow dataset owners to explore their datasets

* Re-order imports

* Give owners security manager permissions to their datasets

* Update test suite

* Add SqlaTable to is_owner types

* Add owners to datasource mock

* Fix VSCode import error

* Fix merge error
2022-07-06 11:27:50 -03:00
John Bodley ad308fbde2
chore(rls): Remove passing global username (#20344)
* chore(rls): Remove passing global username

* Update manager.py

* Update manager.py

* Update manager.py

* Update manager.py

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-07-05 10:51:24 -07:00
Yongjie Zhao b870a21eaa
refactor: remove unused flatten function (#20582) 2022-07-01 19:17:55 +08:00
Elizabeth Thompson 44f0b511dd
remove autoflush for queries during dual write (#20460) 2022-06-23 14:50:30 -07:00
Beto Dealmeida f3b289d3c3
fix: ensure column name in description is string (#20340)
* fix: ensure column name in description is string

* Add unit test
2022-06-21 10:10:46 -03:00
Hugh A. Miles II e3e37cb68f
chore: switching out ConnectorRegistry references for DatasourceDAO (#20380)
* rename and move dao file

* Update dao.py

* add cachekey

* Update __init__.py

* change reference in query context test

* add utils ref

* more ref changes

* add helpers

* add todo in dashboard.py

* add cachekey

* circular import error in dar.py

* push rest of refs

* fix linting

* fix more linting

* update enum

* remove references for connector registry

* big reafctor

* take value

* fix

* test to see if removing value works

* delete connectregistry

* address concerns

* address comments

* fix merge conflicts

* address concern II

* address concern II

* fix test

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
2022-06-21 13:22:39 +02:00
Daniel Vaz Gaspar 60eb1094a4
feat: add name, description and non null tables to RLS (#20432)
* feat: add name, description and non null tables to RLS

* add validation

* add and fix tests

* fix sqlite migration

* improve default value for name
2022-06-20 13:52:05 +01:00
John Bodley 8b0bee5e8b
[fbprophet] Fix frequencies (#20326) 2022-06-19 21:53:09 -07:00
mohittt8 41bbf62e58
fix(presto): use correct timespec for presto (#20333) 2022-06-16 16:43:17 -07:00
Beto Dealmeida 998624b1a5
feat: allow setting db UUID (#20412)
* WIP

* feat: allow passing UUID when creating a DB

* Test

* Fix field
2022-06-16 15:53:59 -07:00
John Bodley b08e21efd9
[requirements] Resolve rebase conflicts (#20152)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-06-03 15:27:35 -07:00
Elizabeth Thompson 32bb1ce3ff
feat!: pass datasource_type and datasource_id to form_data (#19981)
* pass datasource_type and datasource_id to form_data

* add datasource_type to delete command

* add datasource_type to delete command

* fix old keys implementation

* add more tests
2022-06-02 16:48:16 -07:00
Diego Medina 8638f59b4c
fix: Box Plot Chart throws an error when the average (AVG) / SUM is being calculated on the Metrics (#20235)
* fix: Box Plot Chart throws an error when the average (AVG) / SUM is being calculated on the Metrics

* add test
2022-06-02 10:00:04 +08:00
Beto Dealmeida 05a138a191
feat: query datasets from SQL Lab (#15241)
* feat: Jinja2 macro for querying datasets

* Add docs

* Address comments
2022-06-01 15:18:40 -07:00
Ville Brofeldt 64c4226817
fix(temporary-cache): when user is anonymous (#20181)
* fix(temporary-cache): fail on anonymous user

* make exceptions generic

* fix test

* remove redundant bool return

* fix unit tests
2022-05-26 14:45:20 +03:00
Phillip Kelley-Dotson 0501ad25e8
fix: always create parameter json field (#19899)
* fix: always create parameter json field

* ensure validation for empty catalog

* check engine instead of name

* put validation in be

* fix test

* fix test

* remove test
2022-05-25 14:23:25 -07:00
Ville Brofeldt e2f11d3680
fix(presto,trino): use correct literal dttm separator (#20123)
* fix(presto,trino): use correct literal dttm separator

* remove redundant tests
2022-05-19 20:42:31 +03:00
Hugh A. Miles II 660af409a4
feat: Save column data into json_metadata for all Query executions (#20059)
* add save_metadata function to QueryDAO

* use set_extra_json_key

* added test

* Update queries_test.py

* fix pylint

* add to session

* add to session

* refactor

* forgot the return
2022-05-18 13:11:14 -04:00
cccs-RyanS ddc01ea781
feat(business-types): initial implementation of SIP-78 (#18794)
* add BUSINESS_TYPE_ADDONS to config with example callback

* Removing uneeded whitespace

* [Work in progress] Modifying cidr function to allow for  single ip and adding port outline

* Added test REST endpoint, added some more ports

I've thrown in a test.py script as well that will try to connect to the
business_type endpoint.

* Moving code from config.py into the business api

Very simple api is exposed that will allow someone to call a checkport
endpoint and get back a response.

* Removing commented out bits.

* Adding fucntion dict back to the config

* Moving business_type endpoint to charts

* Adding schema for get endpoint

* Removing imports, updating docstring, fixing typo

Just some small changes as described in the title.  I've updated the
test.py as well so it functions with the endpoint changes.

* Adding translation dict

* Fixing ops

* Adding check for list

* Modifying changes to add quotes where needed

Also changed BusinessTypeResponse to resp.

* Adding in some code to call the filter config

If a column starts with "cidr_" it will call the code in config.py to
try to translate the filter.  Nothing is changed in the JSON being
executed, just some information is dumped to console.

* Porting Ryan's changes

* Adding migration script (as per Ryan's PR)

* Fixing typo

* Prettier fixes

* [CLDN-1043] Adding rough version of filter changes for business types

* fix down migration

* Fixing bugs after merge

* adding functionality to appy filters in back end

* Fixing linting issues

* fix down revision

* Changing conversion callback to handle multiple values at once

* Adding string representation of values

* Code cleanup plus fixing debouce to only be called once for each entry

* Removing non needed logginh

* Changing operator list to use sting values

* Using text value operators

* Removing clear operator call

* Moving business type endpoints

* fix down revision

* Adding port functions

* update migration

* fix bad rebase and add ff

* implement validator

* dont add invalid values to response

* [CLDN-1205] Added a new exception type for a business type translation error. Added the error message in the display_value field within the business type response. Modified the IP and Port business types to populate the error message field in the response if an error occurs

* [CLDN-1205] Added meaningful error message for port translation errors

* Removing status field from businesstype Response and adding in error message

* [CLDN-1205] Added check to make sure the port business type is within the valid range of ports, if it is not, it will populate the error message

* [CLDN-1205] Fixed the if statement that checks to see if the string_value is in the valid range of port numbers. It did not corrently verify this before now.

* [CLDN-1205] Fixed an error where it was trying to use string_value in <= statements. I just casted string_value to an integer if it is numeric, which allows <= operators to be used on it

* [CLDN-1207] Added unit tests for the cidr_func and port_translation_func functions which are located in /superset/config.py

* [CLDN-1207] removed the assertRaises line as it does not work with the cidr_func and port_translation_func functions

* [CLDN-1207] Added the skeleton of the test_cidr_translate_filter_func unit test, still need to update what the expected response from the function will be.

* [CLDN-1207] Added the remainder of the back-end unit tests for the business types

* [CLDN-1207] Fixed the syntax error which caused the test_cidr_translate_filter_func_NOT_IN_double unit test to fail

* [CLDN-1207] Removed the logging that was added for debugging purposes

* [CLDN-1207] Formatted the commands_tests.py file to make it nicer to look at/read through

* [CLDN-1207] Fixed the code so that it conformed to the pylint requirements (i.e., pylint no longer complains about the code in commands_tests.py)

* [CLDN-1207] Modified some of the docstrings so they made better use of the 100 character per line, line limit

* [CLDN-1207] Added the beginnings of the unit tests for the
business types API

* [CLDN-1207] Added a comment to the top of the commands_tests.py file explaining how to run the unit tests. This prevents the next person who tries to run them from having to waste time trying the different forms of testing that Superset supports (e.g., pytest, tox, etc.)

* [CLDN-1207] Added a grammar fix to the comments describing how to run the unit tests

* [CLDN-1207] Modified the description of the business_type API endpoints as they did not represent what the API was actually doing

* [CLDN-1207] Added further instructions on how to run the unit tests that are within the business_type/api_tests.py file

* add request validation

* disable request if business type missing

* [CLDN-1207] Unit tests for the business type API are now working, however, they need to be modified to make use of @mock as we don't want to have to run the server to be able to run the unit tests

* Removing businesss types deffinitons from config

* Adding select to only show valid business types

* Fixed Enzyme tests

* Added scalfolding for selecting filter dropdown

* Adding intigration tests

* fix revision

* fix typos and unnecessary requests

* break out useBusinessTypes

* Added front-end RTL unit tests for the business type API endpoint

* Fixed error from unit tests

* Added a unit test to ensure the operator list is updated after a business type API response is received

* Removing elect compoenet for business types

* Adding feature flag and allowing saving when no business type present

* fixing useEffect hooks

* Adding feature flag to model

* Changing behavior such that an empty string returns a default response

* add form validation

* Modified comments in unit test as command to run test has changed

* Modified comments in unit test as filename to run test has changed

* Modified the api_tests.py file to conform to the linting requirements

* Changed the name of one of the tests to reflect what the test is actually testing

* Added cypress back to the package.json

* Added informative comments

* Updated comments in files as well as removed imports which were not being used

* Changes made by npm run prettier

* Fixed spelling mistakes

* Updated models.py to remove placeholder comments used in development

* Added feature flag mocking in unit test

* Fixing open api failure

* Fixing business types to pass unit tests

* Reverting unsafe connections back to false

* Removing print statement

* Adding business tpye to export test

* setting default feature flag to false for business type

* Reverting pre commit

* Reverting pre commit and running pre commit

* Reverting pre commit and running pre commit

* Fixing formatting

* Adding license

* Fixing Linting

* Protecting api enpoints

* updating model

* Fixing code path when business type exists

* Linting

* Linting

* Fixing linting

* Fixing spelling

* Fixing schemas

* Fixing app import

* fixing item render

* Added RTL test to make sure business type operator list is updated after API response

* Fixing linting

* fix migration

* Changing unit tests

* Fixing import and DB migration after rebase

* Renaming to advanced types

* Fixing Linting

* More renaming

* Removing uneeded change

* Fixing linting and test errors

* Removing unused imports

* linting

* Adding more detailed name for migration

* Moving files to plugins

* more renaming

* Fixing schema name

* Disabling feature flag that should not be enabled by default

* Adding extra cehck

* NameChange

* formatting

* Fixing equals check

* Moveing all advanced type classes and types to one file, and converting tests to functional

* Adding advanced type to test and fix linitng

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Dan Parent <daniel.parent@cse-cst.gc.ca>
Co-authored-by: GITHUB_USERNAME <EMAIL>
Co-authored-by: cccs-Dustin <96579982+cccs-Dustin@users.noreply.github.com>
2022-05-16 17:58:21 +03:00
thinhnd2104 85315460cb
fix: Athena timestamp literal format (#19970)
* Fix Athena timestamp literal format

related: [#19969]

* Update test_athena.py

Update test

* Update athena.py

* Resolving CI/CD

* lint

Co-authored-by: Thinh Nguyen Duc <thinhnd.it@tripi.vn>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2022-05-16 09:50:20 +03:00
Hugh A. Miles II 21c5b26fc8
feat(sip-68): Add DatasourceDAO class to manage querying different datasources easier (#20030)
* restart

* update with enums

* address concerns

* remove any
2022-05-13 12:28:57 -04:00
John Bodley 449d08b25e
fix: Refactor SQL username logic (#19914)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-05-12 21:03:05 -07:00
Beto Dealmeida f2881e5bbd
feat: RLS for SQL Lab (#19999)
* feat: RLS for SQL Lab

* Small fixes

* Pass username to security manager

* Update docstrings

* Add tests

* Remove type from docstring
2022-05-12 11:03:01 -07:00