Commit Graph

182 Commits

Author SHA1 Message Date
anamitraadhikari
6ede3271ff fix(SQL Lab): hang when result set size is too big (#30522)
Co-authored-by: aadhikari <aadhikari@apple.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2024-10-14 18:03:28 -07:00
Beto Dealmeida
a098809294 feat(SQL Lab): better SQL parsing error messages (#30501) 2024-10-04 19:17:56 -04:00
Beto Dealmeida
cc9fd88c0d chore: improve DML check (#30417) 2024-09-27 15:26:36 -04:00
Beto Dealmeida
bdf29cb7c2 chore: organize SQL parsing files (#30258) 2024-09-13 16:24:19 -04:00
Beto Dealmeida
1f890718a2 feat: is_mutating method (#30177) 2024-09-09 13:56:18 -04:00
Beto Dealmeida
d5c0506faa fix: OAuth2 in async DBs (#29461) 2024-07-02 21:12:07 -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
Maxime Beauchemin
4bb2e2f8af chore: enable ruff lint rule TRY201 and B904 to improve raise stack traces (#29166) 2024-06-12 13:04:42 -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
Eyal Ezer
56f0fc4ec2 refactor: Migration of json utilities from core (#28522)
Co-authored-by: Eyal Ezer <eyal.ezer@ge.com>
2024-05-20 10:27:22 -07:00
Beto Dealmeida
6cf681df68 feat(SIP-95): new endpoint for table metadata (#28122) 2024-04-25 12:23:49 -04:00
Maxime Beauchemin
cfc440c56c feat: improve event logging for queries + refactor (#27943)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2024-04-22 16:30:50 -07:00
Beto Dealmeida
99a1601aea refactor: rename get_sqla_engine_with_context (#28012) 2024-04-12 13:31:05 -04:00
John Bodley
5ed48760fb chore(sqllab): Do not strip comments when executing SQL statements (#27725) 2024-04-03 19:24:39 -07:00
Beto Dealmeida
9022f5c519 feat(SIP-85): OAuth2 for databases (#27631) 2024-04-02 22:05:33 -04:00
Beto Dealmeida
c0b57bd1c3 feat(sqlparse): improve table parsing (#26476) 2024-01-22 11:16:50 -05:00
John Bodley
7af82ae87d refactor: Ensure Celery leverages the Flask-SQLAlchemy session (#26186) 2024-01-17 17:06:22 +13:00
Beto Dealmeida
2bd611916d feat: safer insert RLS (#20323) 2023-11-08 22:52:25 -05:00
Rob Moore
4e94fc4cff fix(sqllab): reinstate "Force trino client async execution" (#25680) 2023-10-19 16:38:13 +03:00
Ville Brofeldt
e56e0de458 fix: revert fix(sqllab): Force trino client async execution (#24859) (#25541) 2023-10-13 11:58:20 +00:00
Rob Moore
cfda30c81a fix(sqllab): Force trino client async execution (#24859) 2023-09-06 14:20:26 -07:00
Hugh A. Miles II
d8496425e2 fix: DML failures in SQL Lab (#25190) 2023-09-06 09:41:36 -03:00
EugeneTorap
fc89718d48 chore: Update pylint to 2.17.4 (#24700)
Co-authored-by: John Bodley <john.bodley@gmail.com>
2023-07-24 17:13:49 -07:00
Santiago Cárdenas
e13b80aff1 fix(sql-lab): SQL Lab commit connection even if no CTA query is made (#19808)
Co-authored-by: Santiago <s@inkremental.co>
2023-06-07 16:35:23 -06:00
John Bodley
a4d5d7c6b9 chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
Sebastian Liebscher
1583090623 chore(sqllab): remove deprecated PyArrow API (#24135) 2023-05-20 21:57:18 +03:00
John Bodley
0496779434 chore: Update QUERY_LOGGER and SQL_QUERY_MUTATOR signatures (#24029) 2023-05-19 06:42:19 -07:00
John Bodley
d583ca9ef5 chore: Embrace the walrus operator (#24127) 2023-05-19 00:37:13 -07:00
Artem Shumeiko
c839d0daf5 chore: Localization of superset pt. 2 (#22772) 2023-01-30 09:20:43 -07:00
Hugh A. Miles II
9c0d6c51f1 chore(ssh-tunnel): Refactor establishing raw connection with contextmanger (#22366) 2022-12-29 14:20:45 -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
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
e6c44e02cb chore: stop logging "SyntaxError" as exceptions (#21787) 2022-10-13 11:58:02 -04:00
Jesse Yang
77db0651d8 feat(sql lab): display presto and trino tracking url (#20799) 2022-07-26 20:20:08 -07:00
Hugh A. Miles II
e5e8867394 feat: Visualize SqlLab.Query model data in Explore 📈 (#20281) 2022-07-15 19:34:02 -04: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
Diego Medina
92057858c2 fix(sql lab): View result button is not showing consistently (#20164) 2022-06-02 22:53:59 -06: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
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
Luis Casillas
1fa841ee29 Revert "fix(sql lab): display the 'View Results' button consistently in the history tab on sync mode (#19362)" (#19906)
This reverts commit 6d5d03e592.
2022-05-02 11:45:43 -06:00
Jesse Yang
231716cb50 perf: refactor SIP-68 db migrations with INSERT SELECT FROM (#19421) 2022-04-19 18:58:18 -07:00
Diego Medina
6d5d03e592 fix(sql lab): display the 'View Results' button consistently in the history tab on sync mode (#19362)
* fix(sql lab): display the 'View Results' button in the history tab when running sync queries

* pr comment
2022-04-13 10:20:32 -06:00
Elizabeth Thompson
d645579cdd chore!: update mutator to take kwargs (#19083)
* update mutator to take kwargs

* update updating.md

* lint

* test that the database name is properly passed in to the mutator
2022-03-18 16:01:27 -07:00
Sujith Kumar S
7e51b200b4 fix(mssql): support top syntax for limiting queries (#18746)
* SQL-TOP Fix For Database Engines

MSSQL is not supporting LIMIT syntax in SQLs. For limiting the rows, MSSQL having a different keyword TOP. Added fixes for handling the TOP and LIMIT clauses based on the database engines.

* Teradata code for top clause handling removed from teradata.py

Teradata code for top clause handling removed from teradata.py file, since we added generic section in base engine for the same.

* Changes to handle CTE along with TOP in complex SQLs

Added changes to handle TOP command in CTEs, for DB Engines which are not supporting inline CTEs.

* Test cases for TOP unit testing in MSSQL

Added multiple unit test cases for MSSQL top command handling and also along with CTEs

* Corrected the select_keywords name key in basengine

Corrected the select_keywords name key in basengine

* Changes based on as per review.

made the required corrections based on code review to keep good code readability and code cleanliness.

* Review changes to correct lint and typo issues

Made the changes according to the review comments.

* fix linting errors

* fix teradata tests

* add coverage

* lint

* Code cleanliness

Moved the top/limit flag check from sql_lab to core.

* Changed for code cleanliness

Changes for keeping code cleanliness

* Corrected lint issue

Corrected lint issue.

* Code cleanliness

Code cleanliness

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2022-02-21 09:58:39 +02:00
Craig Rueda
6a63a21e06 chore: Bumping pyarrow / pandas (#17290)
* Bumping pyarrow / pandas

* Appeasing the pylint gods

* Adjusting UPDATING.md

* Buping testing requirements
2021-10-31 10:47:02 -07:00
Amit Miran
029ed90afb fix: preventing sql lab None limit value (#17155)
* fix: preventing sql lab None limit value

* test: create a test for the fix

* pylint (#17172)

* add test (#17173)

Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
2021-10-20 23:43:14 +03:00
ofekisr
c520eb79b0 refactor: sqllab: move sqllab ralated enumns and utils to more logical place (#16843)
* refactor move QueryStatus to common

* refactor move apply_display_max_row_limit to sqllab package

* refactor move limiting_factor to sqllab package

* fix pylint issues
2021-09-26 21:15:57 +03:00
John Bodley
fb4650a6eb chore(pylint): Remove top-level disable (#16589)
* chore(pylint): Remove top-level disable

* Update examples.py

* Update command.py

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-09-15 09:30:23 -07:00
Shaoqing Hu
d0f69f2e5c fix: pybabel extract fails (#16629)
* fix pybabel extract fails

* fix black

* trigger GitHub actions
2021-09-09 14:28:25 +03:00