Commit Graph

87 Commits

Author SHA1 Message Date
Kasper Mol
94369ca6b5 fix(template_processing): get_filters now works for IS_NULL and IS_NOT_NULL operators (#33296)
(cherry picked from commit cc3460832f)
2025-06-18 09:14:25 -03:00
Michael S. Molina
00cd069af2 fix: Missing processor context when rendering Jinja (#33596)
(cherry picked from commit ce9759785a)
2025-05-28 08:34:38 -03:00
Beto Dealmeida
654062db27 fix: ensure metric_macro expands templates (#32344) 2025-03-05 10:01:38 -03:00
github-actions[bot]
b24323d500 chore(🦾): bump python pre-commit 3.7.1 -> 4.0.1 (#31050)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2024-11-24 17:34:36 -08:00
Vitor Avila
9c12b1c7da fix(Jinja metric macro): Support Drill By and Excel/CSV download without a dataset ID (#30443) 2024-10-10 21:03:19 -03:00
Geido
318eff7327 fix(Jinja): Extra cache keys to consider vars with set (#30549) 2024-10-09 23:26:32 +03:00
Ville Brofeldt
a3952051e1 feat(jinja): add option to format time filters using strftime (#30323) 2024-09-18 10:47:38 -07:00
Ville Brofeldt
601e55656c feat(jinja): add advanced temporal filter functionality (#30142) 2024-09-06 11:15:40 -07:00
Michael S. Molina
07a90ad4fe fix: Partition calls from Jinja context (#30019) 2024-08-27 14:25:06 -03:00
Beto Dealmeida
39209c2b40 fix: handle empty catalog when DB supports them (#29840) 2024-08-13 10:08:43 -04: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
John Bodley
27c93f438a chore: Add Apache Spark Jinja template processor (#28335) 2024-05-06 09:24:25 -07:00
Maxime Beauchemin
2d63722150 chore: set up ruff as a new linter/formatter (#28158) 2024-04-24 17:19:53 -07:00
Vitor Avila
d87422527b feat(jinja): metric macro (#27582) 2024-03-25 15:07:17 +00:00
John Bodley
b25dd0c055 fix(sql_parse): Ensure table extraction handles Jinja templating (#27470) 2024-03-22 13:39:28 +13:00
Vitor Avila
1d571ec9e6 feat(jinja): current_user_email macro (#27197) 2024-02-23 15:28:30 -08:00
Daniel Vaz Gaspar
5b34395689 fix: chart import validation (#26993) 2024-02-06 12:14:02 +00:00
John Bodley
07bcfa9b5f chore(command): Organize Commands according to SIP-92 (#25850) 2023-11-22 16:55:54 -03:00
Rob Moore
f6ba75a185 feat(explore): dataset macro: dttm filter context (#25950) 2023-11-14 09:16:42 -08:00
Beto Dealmeida
5659c87ed2 fix: DB-specific quoting in Jinja macro (#25779) 2023-10-30 09:50:44 -04:00
JUST.in DO IT
5ab1e7eae4 feat(sqllab): SPA migration (#25151) 2023-10-04 15:21:41 -04:00
Sebastian Liebscher
067bfbf950 chore: move TypedDict from typing_extensions to typing (#25121) 2023-08-30 09:49:45 -07: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
John Bodley
a4d5d7c6b9 chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
EugeneTorap
4a828f57f4 chore: Update mypy and fix stubs issue (#24033) 2023-05-12 08:47:14 +01:00
Beto Dealmeida
1874f9a3b6 fix: dataset_macro (#23376) 2023-03-14 16:29:12 -07:00
Daniel Vaz Gaspar
79274eb5bc fix: memoized decorator memory leak (#23139) 2023-02-27 15:59:11 +00:00
John Bodley
3483446c28 refactor: Cleanup user get_id/get_user_id (#20492)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-06-24 17:57:04 -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
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
Beto Dealmeida
83c3779a6c feat: add a where_in filter for Jinja2 (#19574) 2022-04-07 07:27:23 -07:00
Ville Brofeldt
a619cb4ea9 chore: upgrade black (#19410) 2022-03-29 20:03:09 +03:00
Ville Brofeldt
d7834f17e3 fix(filter-indicator): show filters handled by jinja as applied (#17140) 2021-10-18 19:28:05 +02:00
Ville Brofeldt
88c09c2138 feat(jinja): improve url parameter formatting (#16711)
* feat(jinja): improve url parameter formatting

* add UPDATING.md

* fix test
2021-09-15 20:00:26 +03:00
Rob DiCiuccio
4e380db3fd fix: Support Jinja template functions in global async queries (#16412)
* Support Jinja template functions in async queries

* Pylint

* Add tests for async tasks

* Remove redundant has_request_context check
2021-09-03 14:33:29 +03:00
grumpy-miner
1f1e2dd29a fix: ensure setting operator to None (#16371) (#16372) 2021-08-31 12:53:40 +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
0df15bf207 chore(pylint): Reenable import-outside-toplevel check (#16263)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 05:20:13 +12:00
John Bodley
24b43beff9 chore(pylint): Bump Pylint to 2.9.6 (#16146)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-14 10:32:28 +12:00
Amit Miran
62a8f2e193 chore(python-testing): move memoized tests to unit tests (#15507)
* chore: move memoized test into a separated file

create integration test workflow

* chore: create unit test workflow to run purely pytest

* fix: bad reference

* fix: remove pip requirements bc there aren't any yet

* temp: install unit dependencies directly

* fix: --rootdir=

* fix: try to run only unit test

* chore: decouple memoized as separated module

* fix: bring back dependencies bc superset top-level module is coupled to flask and others so no reason no to do it

* fix: reference

* fix: pre-commit

* fix: pylint
2021-07-12 10:00:18 +03:00
cccs-jc
c519efe9ad small code review fix (#14756)
Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
2021-05-27 16:04:42 +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
Rob DiCiuccio
6875a1a9e2 Make g.user attribute access safe for public users (#14287) 2021-04-26 08:50:50 -07:00
Beto Dealmeida
8bda6b0bd9 feat: show missing parameters in query (#12049)
* feat: show missing parameters in query

* Fix lint

* Address comments

* Simplify error message

* Use f-string in helper function
2020-12-15 18:47:40 -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
Daniel Vaz Gaspar
7c60939429 chore: turn SQL templating off by default (#11172)
* feat: possible to turn off SQL templating

* turn SQL templating off by default

* Update UPDATING.md

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

* fix missing PR number

* fix missing PR number

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-08 11:55:39 +01:00
Kasia Kucharczyk
3a08fd04f3 chore: pylint fixes in files in project's root (#11064)
* Pylint rule: not necesary unused-import in extensions.py. Autofomatted

* Pylint rule: not necesary unused-import in jinja_context.py. Autofomatted

* Pylint rule: not necesary no-value-for-parameter in stats_logger.py. Autofomatted

* Pylint rule: not necesary no-member in viz.py

* Pylint rule: not necesary no-member in viz_sip38.py
2020-09-28 14:32:45 -07:00
Daniel Vaz Gaspar
e375ed4678 fix(jinja): make context attrs private on SQL templates (#10934)
* fix(jinja): make SQLAlchemy models private on SQL templates

* add missing privates

* fix test
2020-09-18 12:56:07 +01:00
John Bodley
244677cf5e style(mypy): Enforcing typing for superset (#9943)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-03 15:26:12 -07:00