Commit Graph

50 Commits

Author SHA1 Message Date
Beto Dealmeida
a26e1d822a chore: remove sqlparse (#33564) 2025-06-04 19:31:41 -04:00
Beto Dealmeida
831369a44b fix(gsheets): update params from encrypted extra (#32661) 2025-03-14 12:00:53 -04:00
Beto Dealmeida
d92af9c95c chore: simplify user impersonation (#32485) 2025-03-13 12:43:05 -04:00
Beto Dealmeida
5af4e61aff feat: improve GSheets OAuth2 (#32048) 2025-03-03 12:55:54 -05:00
Maxime Beauchemin
e51b95ffa8 chore: enforce more ruff rules (#31447)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2024-12-18 17:41:34 -08:00
Beto Dealmeida
4b59e42d3f chore: improve mask/unmask encrypted_extra (#29943) 2024-08-22 16:45:32 -04:00
John Bodley
8fb8199a55 chore(dao/command): Add transaction decorator to try to enforce "unit of work" (#24969) 2024-06-28 12:33:56 -07:00
Eyal Ezer
07b2449bd7 refactor: Unify all json.(loads|dumps) usage to utils.json (#28702)
Co-authored-by: Eyal Ezer <eyal.ezer@ge.com>
2024-05-28 14:17:41 -07:00
Beto Dealmeida
6cf681df68 feat(SIP-95): new endpoint for table metadata (#28122) 2024-04-25 12:23:49 -04:00
Beto Dealmeida
68a982dfe6 feat(sip-95): new endpoint for extra table metadata (#28063) 2024-04-18 10:42:53 -04:00
Beto Dealmeida
9377227e06 chore(OAuth2): refactor for custom OAuth2 clients (#27880) 2024-04-05 12:17:39 -04:00
Beto Dealmeida
9022f5c519 feat(SIP-85): OAuth2 for databases (#27631) 2024-04-02 22:05:33 -04:00
John Bodley
847ed3f5b0 refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (Phase II) (#26909) 2024-02-14 06:20:15 +13:00
Sebastian Liebscher
067bfbf950 chore: move TypedDict from typing_extensions to typing (#25121) 2023-08-30 09:49:45 -07:00
Sebastian Liebscher
e585db85b6 chore: use contextlib.surpress instead of passing on error (#24896)
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
2023-08-29 10:09:01 -06:00
Beto Dealmeida
a3d72e0ec7 fix(gsheets): add column names on file upload (#24963) 2023-08-11 12:51:21 -07:00
Beto Dealmeida
f5ed4072e4 feat(gsheets): file upload (#24921) 2023-08-11 06:35:00 -07:00
Beto Dealmeida
85a7d5cb3e feat: improve SQLite DB engine spec (#24909) 2023-08-07 15:59:56 -07:00
John Bodley
a4d5d7c6b9 chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
Sebastian Liebscher
b31efbae7c chore: remove RemovedInMarshmallow4 warnings (#23704) 2023-04-21 09:11:46 +03:00
Hugh A. Miles II
b820eb8235 chore: Update pre-commit packages (#23173) 2023-03-13 17:05:13 -06:00
Antonio Rivero Martinez
ad758c0802 feat(ssh_tunnel): Rename allow_ssh_tunneling and change the default value to False (#22723) 2023-01-17 19:11:41 -08:00
Hugh A. Miles II
9c0d6c51f1 chore(ssh-tunnel): Refactor establishing raw connection with contextmanger (#22366) 2022-12-29 14:20:45 -05:00
Hugh A. Miles II
e23efefc46 feat: refactor all get_sqla_engine to use contextmanager in codebase (#21943) 2022-11-15 13:45:14 -05: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
Antonio Rivero Martinez
b36bd3f083 fix(databases): GSheets and Clickhouse DBs are not allowed to upload files (#21065) 2022-09-26 10:08:11 -07:00
Beto Dealmeida
34a79add04 feat: filter parameters from DB API (#21248) 2022-09-02 11:50:04 -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
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
Daniel Vaz Gaspar
4fdf230a56 feat: deprecate /superset/extra_table_metadata migrate to api v1 (#19921)
* feat: deprecate /superset/extra_table_metadata migrate to api v1

* use can_read to table_extra_metadata

* troubleshoot sqlite

* fix test

* fix test

* fix test

* fix frontend test on sqllab
2022-05-04 14:55:52 +01:00
Phillip Kelley-Dotson
ad715429f9 chore: simplify error messaging in database modal (#19165)
* testing for dbconn modal error message

* remove consoles and error alert mapping

* lint fix

* update url message

* add modal fix

* update comments

* fix err msg bugs

* fix pylint

* fix line

* fix tests

* fix assertions
2022-04-21 12:44:21 -07:00
Ville Brofeldt
a619cb4ea9 chore: upgrade black (#19410) 2022-03-29 20:03:09 +03:00
AAfghahi
e32a12fa0b bug fix (#17019) 2021-10-08 10:19:04 -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
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
Hugh A. Miles II
fd80ae34a3 fix: Make sheet_name into a ValidationInputError (#16056)
* setup validates for name

* add error type

* fix linting

* fix test

* remove errors

* fix number

* fix test
2021-08-10 13:07:31 -04: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
Beto Dealmeida
4f5f9287fc feat: validate_parameters for GSheets (#15578)
* feat: validate_parameters for GSheets

* Move import inside fixture

* Update deps

* Rename parameter
2021-07-08 08:26:39 -07:00
Beto Dealmeida
cbc4aa8dc1 feat: extra table metadata for Google Sheets (#14775)
* feat: GSheets extra table metadata

* Bump version
2021-07-01 19:27:26 -07:00
Beto Dealmeida
55d0371b92 fix: GSheets supports JOINs (#15487) 2021-07-01 07:28:28 -07:00
AAfghahi
743d9cc928 feat: Better Errors in SQL Lab (#15432)
* snowflake errors

* added big query

* added to setup error messages, first test

* all big query testing added

* added snowflake test

* added syntax error

* added syntax errors to most used databases
2021-06-29 16:48:27 -07:00
Beto Dealmeida
9e13476714 feat: enable user impersonation in GSheets (#14767) 2021-05-22 13:46:36 -07:00
Beto Dealmeida
0554c8918e Enable subqueries in gsheetsdb (#10991) 2020-09-22 08:51:29 -07:00
Erik Ritter
2055ecc1ba feat: refactor error components and add database issue code (#10473)
* feat: refactor error components and add database issue code

* Apply suggestions from code review

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
2020-08-06 13:22:24 -07:00
Will Barrett
ec86d9de17 Fix lint in superset/db_engine_spec (#8338)
* Enable lint checking for files in db_engine_spec that have few to no
lint issues

* Enable lint and fix issue in db_engine_spec/mysql.py

* Enable pylint and fix lint for db_engine_spec/pinot.py

* Enable lint and fix issues for db_engine_specs/hive.py

* Enable lint and fix for db_engine_spec/presto.py

* Re-enable lint on base.py, fix/disable specific failures, including one
bad method signature

* Make flake8 happy after a number of pylint fixes

* Update db_engine_spec_test test cases related to Presto to support
different method naming

* automated reformatting

* One more pylint disable for druid.py

* Find the magic invocation that makes all the lint tools happy
2019-10-04 09:19:21 -07:00
Ville Brofeldt
07a76f83b1 [Bugfix] Remove prequery properties from query_obj (#7896)
* Create query_obj for every filter

* Deprecate is_prequery and prequeries from query_obj

* Fix tests

* Fix typos and remove redundant ; from sql

* Add typing to namedtuples and move all query str logic to one place

* Fix unit test
2019-07-23 22:13:58 +03:00
John Bodley
5c58fd1802 [format] Using Black (#7769) 2019-06-25 13:34:48 -07:00
Ville Brofeldt
95291facff Break up db_engine_specs (#7676)
* Refactor db_engine_specs into package

* Rename bigquery class and add epoch funcs

* Fix flake8 errors

* Dynamically load all engine specs

* Fix linting errors and unit tests

* Implement Snowflake epoch time funcs

* Implement Teradata epoch time func

* Fix presto datasource query and remove unused import

* Fix broken datasource query

* Add mypy ignore for false positive

* Add missing license files

* Make create_time_grains_tuple public

* Fix flake8 quote

* Fix incorrect licence header
2019-06-08 11:27:13 -07:00