Commit Graph

109 Commits

Author SHA1 Message Date
cccs-Dustin
02ef9ca4cd feat(sqllab): Add a configuration option to disable data preview (#19104) 2022-03-17 15:22:57 +02:00
Beto Dealmeida
d01fdad1d8 feat: add export_related flag (#19215)
* feat: add export_related flag

* Fix lint
2022-03-16 16:03:06 -07:00
Smart-Codi
e97cdba092 fix database import error (#19037) 2022-03-09 21:23:13 -07:00
Elizabeth Thompson
c143b37128 chore: log multiple errors (#14064)
* log all errors from db create

* return unique set of errors

* sort set for exceptions list

* run black
2022-03-08 17:31:19 -08:00
Victor Arbues
5ee070c402 feat: datasource access to allow more granular access to tables on SQL Lab (#18064) 2022-02-09 22:05:25 +08:00
Ville Brofeldt
299635c580 docs: add password example to dataset import API (#18580) 2022-02-07 09:38:55 +02:00
Adam Dobrawy
dad6f78419 refactor: extract json_required view decorator (#18170)
* refactor: extract json_required view decorator

* chore: rename json_required to requires_json

* refactor: add requires_form_data decorator and use it

* fix: fix lint issue, raise InvalidPayloadFormatError for invalid payload
2022-01-31 08:53:48 -03:00
Beto Dealmeida
51090c3f1b feat: shorter timeout on test_connection (#18001)
* feat: shorter timeout on test_connection

* pip-compile-multi --no-upgrade

* Fix for SQLite

* Return 408

* Add test
2022-01-12 13:01:34 -08:00
Beto Dealmeida
73ae892066 feat: don't ask for password when DB exists (#17776) 2021-12-16 09:17:15 -08:00
Ville Brofeldt
5d1c9078ad chore(translations): fix translation literals (#17501)
* chore(translations): fix translation literals

* fix table name types and translations

* fix lint

* join concat'd messages
2021-11-23 10:06:09 +02: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
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
Shiva Raisinghani
ef3afbde82 refactor: Repeated boilerplate code between upload to database forms (#16756)
* abstract boilerplate code into class and rename csv to file

* add db migration

* fix some stuff

* more renaming of csv to file

* rename in translations

* update down revision

* update down revision

* bump chart version

* switch to alter column name approach in db migration

* fix db migration for MySQL

* db migration conflict
2021-10-25 13:53:06 +03:00
AAfghahi
904c506591 fixing db connection (#16899) 2021-09-29 10:02:34 -07:00
AAfghahi
aa747219ad feat: Add Private Google Sheets to dynamic form (#16628)
* first pass private gsheets

* made encrypted extra into string, refactored onParametersChanged

* private sheets working, credential_info errors

* all but test connection working

* first pass private gsheets

* made encrypted extra into string, refactored onParametersChanged

* private sheets working, credential_info errors

* all but test connection working

* Regenerate package-lock.json

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-09-28 17:08:50 -07:00
AAfghahi
376c685838 feat: adding logging to validation (#16527)
* adding logging to validation

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx

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

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-09-13 16:09:40 -07:00
John Bodley
1669947bcd chore(pylint): Reenable too-many-lines check (#16287)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-09-13 13:22:19 -07:00
Ville Brofeldt
ac1d779a30 chore(ci): bump pylint to 2.10.2 (#16463) 2021-08-26 20:30:41 +03:00
John Bodley
7e4c940314 chore(pylint): Enable useless-suppression check (#16388)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-24 03:58:41 +12:00
John Bodley
be7065faf8 chore(pylint): Reenable raise-missing-from check (#16266)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 10:26:10 +12:00
John Bodley
36bc7b0b80 chore(pylint): Reenable too-few-public-methods check (#16264)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 05:20:44 +12:00
Beto Dealmeida
7b15b7690d fix: DB exported with incorrect type (#16037)
* fix: DB exported with incorrect type

* Fix export as well
2021-08-03 08:35:48 -07:00
Hugh A. Miles II
bfe7eb9a7b feat(dbc ui): Adding Google Sheets Dynamic Form (#15801)
* feat: Make Google Sheets Dyanmic (#15576)

* first draft

* second draft

* added tests

* first draft

* added table_catalog

* remove console.log

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

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

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx

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

* revisions

* save this for now

* working form

* save disable on public sheets

* refactor somethings

* saving this for now

* working edit

* add back query to schema

* working add

* fix styling

* fixing x

* fix linting

* prettier

* fix some type issues

* more lint fixes

* remove unused dependency

* fix linint

* fix validation

* pylint bypass

* pylint bypass

* fix this

* fix mypy

* yerp

* fix test

* fix test

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx

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

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

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

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

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

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

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

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

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

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

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

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

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

* wrap add sheets

* fix linting issues

* fix unit test

* ignore typing

* fix editting and paste issues

* remove query

* fix this

* fix test

* add test back

* fix error messaging

* update url messaging on error

* change error type

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx

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

* add errors for sheets with no name

* fix

* fix messaging for gsheets

* stop pylint

* update line

Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
Co-authored-by: Arash <arash.afghahi@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-07-28 15:00:27 -04:00
John Bodley
ab4e3b9bf9 chore: Enforce Mypy for non-tests (#15757)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-07-22 06:46:43 +12:00
Peter Kosztolanyi
02032ee8a4 feat: cancel db query on stop (#15403)
* feat: cancel db query on stop

* fix pylint

* Add unit tests

* Do not bind multiple times

* Stop only running queries

* Postgres to cancel only the required query

* Remove extra log

* Add docstring

* Better types, docstring and naming

* Use python3 format strings

* Update superset/sql_lab.py

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

* Add cancel_query_on_windows_unload option to database

* Return cancel_query as bool

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-07-13 12:09:22 -04:00
Hugh A. Miles II
f67e40236d update db for expose in sqllab param (#15609) 2021-07-09 10:08:17 -07:00
Beto Dealmeida
301b94f49a fix: available endpoint showing specs without drivers (#15587) 2021-07-08 09:20:52 -07:00
Hugh A. Miles II
d4480f5c9a feat: Database Connection UI (#14881) 2021-07-01 14:40:27 -07:00
Beto Dealmeida
90d9097841 fix: validate DB-specific parameters (#15155)
* fix: validate DB-specific parameters

* Fix lint

* Update test

* Fix lint/test

* Fix lint

* Update superset/databases/api.py
2021-06-14 18:44:18 -07:00
Hugh A. Miles II
143a1b0650 fix: Test connection before starting on create transaction (#15100)
* test connection before starting on create transaction

* Update create.py
2021-06-14 12:44:27 -04:00
Beto Dealmeida
53df152362 feat: show spinner on exports (#15107)
* feat: show spinner on exports

* Set cookie only if token is passed

* Use iframe

* Small fixes

* Fix lint

* Remove stale test

* Add explicit type
2021-06-11 17:25:00 -07:00
Maxime Beauchemin
7d5bc2438a chore: rename 'tables' to 'datasets' in error message (#15078) 2021-06-10 17:56:26 -06:00
Elizabeth Thompson
8cc97e4790 feat: validation db modal (#14832)
* split db modal file

* hook up available databases

* use new validation component
2021-06-01 18:18:17 -04:00
Beto Dealmeida
2313e3ef4f fix: show error on invalid import (#14851)
* fix: show error on invalid import

* Add unit test

* Remove unused imports

* Fix tests
2021-05-27 14:46:41 -07:00
Beto Dealmeida
8febd81baf feat: validate database parameters (#14883) 2021-05-27 14:46:28 -07:00
Beto Dealmeida
8b1a117d24 feat: return parameters only for DB with default driver (#14803)
* WIP

* Fix sorting of DBs
2021-05-25 14:46:54 -07:00
Beto Dealmeida
f1ea1d74a7 fix: OpenAPI boolean type (#14827) 2021-05-25 14:46:41 -07:00
Hugh A. Miles II
c72894725e fix: Fix Big Query API for POST w/ no parameters (#14822)
* Update schemas.py

* Update bigquery.py

* Fix tests

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-05-25 17:13:17 -04:00
Beto Dealmeida
33cee65c3b fix: ensure engine is outside parameters (#14787) 2021-05-24 11:04:12 -07:00
Hugh A. Miles II
6d33432b58 feat: Create BigQuery Parameters for DatabaseModal (#14721) 2021-05-23 12:45:48 -04:00
Elizabeth Thompson
c7aee4e27b feat: save database with new dynamic form (#14583)
* split db modal file

* split db modal file

* hook up available databases

* add comment
2021-05-21 18:25:56 -04:00
Beto Dealmeida
dd318539fa fix: save non-parameter DBs (#14759) 2021-05-21 15:13:36 -07:00
Hugh A. Miles II
4160e45398 feat: Add headers for DatabaseModal (#14647)
* update styles sheets

* save this

* add backend

* update backend reference

* update styles

* my style updates

* sticky header
2021-05-19 13:20:02 -04:00
Hugh A. Miles II
ec0a7922fe feat: Add Parameters fields to GET Database (#14653) 2021-05-19 10:25:20 -04:00
Beto Dealmeida
5e95d4638c fix: import dataset with extra; Vertica URI (#14698)
* fix: import dataset with extra; Vertica URI

* Fix lint
2021-05-18 20:51:33 -07:00
AAfghahi
852842028a make config method optional (#14668) 2021-05-17 17:09:20 -04:00
AAfghahi
4f5c537250 feat: Configuration Method and expanded parameters for Database Model (#14451)
* db migration for dbs

* first draft at logic

* added unit tests

* revisions

* use strings for db values

* lint and revisions to tests

* changed test back

* added revisions for testing

* Update superset/databases/commands/update.py

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

* Update superset/databases/schemas.py

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

* Update superset/models/core.py

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

* Update superset/databases/commands/update.py

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

* got rid of extra imports added new test

* Update superset/databases/schemas.py

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

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-05-14 18:19:17 -07:00
Beto Dealmeida
ba5d66cb0a fix: DB parameter validation (#14636) 2021-05-14 14:07:34 -07:00
Hugh A. Miles II
3a81e6aee8 change name to Basic instead of Base (#14625) 2021-05-13 15:05:37 -04:00
Beto Dealmeida
31f406a526 feat: API endpoint to validate databases using separate parameters (#14420)
* feat: new endpoint for validating database parameters

* Rebase

* Remove broken tests
2021-05-12 18:32:10 -07:00