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
Yeachan Park
8b72354654
fix(sqllab/charts): casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp ( #18873 )
...
* fix casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp from sqllab and charts
* Add unittests
* Lint changes and parameter variable rename
* Fix linting
2022-05-04 09:47:12 +03:00
Beto Dealmeida
90130e4b4f
feat: simplify SQLite time grain ( #19745 )
2022-05-03 07:13:33 -07:00
Ville Brofeldt
99f1f9ec61
fix(sqla): replace custom dttm type with literal_column ( #19917 )
2022-05-03 07:19:36 +03:00
Beto Dealmeida
1ebdaac487
fix: memoize primitives ( #19930 )
2022-05-02 14:50:56 -07:00
Beto Dealmeida
aff10a7fad
feat: simplify memoized_func ( #19905 )
2022-04-29 15:55:58 -07: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
Yongjie Zhao
3c28cd4625
feat: add renameOperator ( #19776 )
2022-04-20 19:48:12 +08:00
Jesse Yang
231716cb50
perf: refactor SIP-68 db migrations with INSERT SELECT FROM ( #19421 )
2022-04-19 18:58:18 -07:00
Yongjie Zhao
9425dd2cac
fix: drop the first level of MultiIndex ( #19716 )
2022-04-14 23:40:38 +08:00
Yongjie Zhao
d7dd4119d4
fix: time comparision ( #19659 )
2022-04-12 18:19:22 +08:00
Ville Brofeldt
9a9e3b6e3b
test(jinja): refactor to functional tests ( #19606 )
2022-04-08 20:32:38 +03:00
Beto Dealmeida
83c3779a6c
feat: add a where_in filter for Jinja2 ( #19574 )
2022-04-07 07:27:23 -07:00
Elizabeth Thompson
aa419b8119
fix: check type of url before performing string actions ( #19569 )
...
* ensure url is a string
* return url if param is a url
2022-04-06 17:32:10 -07:00
Beto Dealmeida
6828624f61
feat: improve adhoc SQL validation ( #19454 )
...
* feat: improve adhoc SQL validation
* Small changes
* Add more unit tests
2022-03-31 11:55:19 -07:00
James Turton
85e330e94b
fix(drill): specify an SA URL parm of impersonation_target for drill+sadrill ( #19252 )
...
* Update drill+sadrill to specify an SA URL parm of "impersonation_target".
Sqlalchemy-drill is being updated to support impersonation with the
drill+sadrill driver, where previously it did not. The way that callers
should specify impersonation matches that for the drill+jdbc driver in that
a SA URL parameter of impersonation_target should be set to the username
of the user to be impersonated, while the stadard SA username and password
should be those of the proxy user.
* Remove lint.
* Address review comments.
* Use idiomatic pytest to test for a raised exception.
* Fix import statement order in drill.py.
2022-03-31 19:42:27 +03:00
Beto Dealmeida
63b5e2e4fa
perf: improve perf in SIP-68 migration ( #19416 )
...
* chore: improve perf in SIP-68 migration
* Small fixes
* Create tables referenced in SQL
* Update logic in SqlaTable as well
* Fix unit tests
2022-03-29 22:33:15 -07:00
Ville Brofeldt
a619cb4ea9
chore: upgrade black ( #19410 )
2022-03-29 20:03:09 +03:00
Yongjie Zhao
a39dd4493e
feat: linear imputation in Resample ( #19393 )
2022-03-28 22:30:45 +08:00
Ville Brofeldt
f4b71abb22
feat: introduce hashids permalink keys ( #19324 )
...
* feat: introduce hashids permalink keys
* implement dashboard permalinks
* remove shorturl notice from UPDATING.md
* lint
* fix test
* introduce KeyValueResource
* make filterState optional
* fix test
* fix resource names
2022-03-24 21:53:09 +02:00
Beto Dealmeida
c7f9060a2f
feat: import external management columns ( #19315 )
...
* feat: import flags
* Add tests
2022-03-24 10:41:22 -07:00
Yongjie Zhao
375c03e084
feat(advanced analysis): support MultiIndex column in post processing stage ( #19116 )
2022-03-23 13:46:28 +08:00
Beto Dealmeida
b05e7dbf2a
feat: API for asset sync ( #19220 )
...
* feat: API for asset sync
* Add unit tests.
* Improve tests
* Move files
* Add more tests
2022-03-22 08:29:24 -07:00
John Bodley
82a6811e7e
fix(presto/trino): Add TIME/TIMESTAMP WITH TIME ZONE ( #19263 )
...
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2022-03-22 06:33:38 +13:00
Elizabeth Thompson
88029e21b6
fix dataset update table ( #19269 )
2022-03-21 09:43:51 -07:00
Ville Brofeldt
f341025d80
feat: add support for comments in adhoc clauses ( #19248 )
...
* feat: add support for comments in adhoc clauses
* sanitize remaining freeform clauses
* sanitize adhoc having in frontend
* address review comment
2022-03-18 15:08:06 -07:00
Lily Kuang
50902d51f5
fix: allow subquery in ad-hoc SQL (WIP) ( #19242 )
...
* allow adhoc subquery
* add config for allow ad hoc subquery
* default to true allow adhoc subquery
* fix test
* Update superset/errors.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
* Update superset/connectors/sqla/utils.py
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com >
* rename and add doc string
* fix for big query test
* Update superset/connectors/sqla/utils.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
* Apply suggestions from code review
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
* add test
* update validate adhoc subquery
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com >
2022-03-18 10:04:55 -07:00
Beto Dealmeida
51061f0d67
feat: import/export assets commands ( #19217 )
...
* feat: import/export assets commands
* Add overwrite test
* Fix tests
2022-03-17 10:51:17 -07:00
Craig Rueda
4b34817b19
feat(ui): Adding manifest prefix config ( #19141 )
...
* Adding manifest prefix config
* Fixing broken tests
* Fixing import
* Adding prefix for remaining assets
* Changing static prefix strategy
* Fixing DST test
* Fixing up formatting
* Fixing up async_query_manager.py types
2022-03-17 08:58:48 -07:00
Ville Brofeldt
b7a0559aaf
feat: add permalink to dashboard and explore ( #19078 )
...
* rename key_value to temporary_cache
* add migration
* create new key_value package
* add commands
* lots of new stuff
* fix schema reference
* remove redundant filter state from bootstrap data
* add missing license headers
* fix pylint
* fix dashboard permalink access
* use valid json mocks for filter state tests
* fix temporary cache tests
* add anchors to dashboard state
* lint
* fix util test
* fix url shortlink button tests
* remove legacy shortner
* remove unused imports
* fix js tests
* fix test
* add native filter state to anchor link
* add UPDATING.md section
* address comments
* address comments
* lint
* fix test
* add utils tests + other test stubs
* add key_value integration tests
* add filter box state to permalink state
* fully support persisting url parameters
* lint, add redirects and a few integration tests
* fix test + clean up trailing comma
* fix anchor bug
* change value to LargeBinary to support persisting binary values
* fix urlParams type and simplify urlencode
* lint
* add optional entry expiration
* fix incorrect chart id + add test
2022-03-17 01:15:52 +02:00
Beto Dealmeida
8234395466
feat: helper functions for RLS ( #19055 )
...
* feat: helper functions for RLS
* Add function to inject RLS
* Add UNION tests
* Add tests for schema
* Add more tests; cleanup
* has_table_query via tree traversal
* Wrap existing predicate in parenthesis
* Clean up logic
* Improve table matching
2022-03-11 14:47:11 -08:00
Ville Brofeldt
999c2c6826
fix(dashboard): import handle missing excluded charts ( #19088 )
2022-03-10 12:59:29 +02:00
John Bodley
26486d01c1
chore: Remove legacy SIP-15 interim logic/flags ( #18936 )
...
* chore: Remove legacy SIP-15 logic
* Update ab9a9d86e695_deprecate_time_range_endpoints.py
* Update UPDATING.md
* Update UPDATING.md
* Update UPDATING.md
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2022-03-04 09:15:36 +13:00
Beto Dealmeida
00c99c91ec
feat: new dataset/table/column models ( #17543 )
...
* feat: new models for SIP-68
* feat: new dataset models DB migration
* Add shadow write (WIP)
* Physical dataset shadow write (WIP)
* Virtual dataset shadow write (WIP)
* Update migration to populate models
* Cascade delete columns
* after_delete
* Update hook
* Add metric test
* Do not rename tables
* Small fixes
* Fix migration
* Fix tests
* Fix more tests
* Even more tests
* Addressing comments (WIP)
* Fix migration
* Rebase and update head
* Fix unit tests
* Add external management cols
* Small fixes
2022-02-24 11:02:01 -08:00
Corbin Robb
0ae1ca7e02
chore(tests-backend): migrate snowflake and sqlite to unit tests ( #18854 )
...
* migrate snowflake and sqlite
* change structure to better match the other unit tests
Co-authored-by: Corbin Robb <corbin@Corbins-MacBook-Pro.local >
2022-02-23 11:11:10 -06: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
Yongjie Zhao
987740aa8d
fix: contribution operator meets nan value ( #18782 )
2022-02-18 23:28:28 +08:00
Yongjie Zhao
38cd696981
refactor: move date_parser to unittest ( #18810 )
2022-02-18 20:15:31 +08:00
Yongjie Zhao
30a9d14639
refactor: postprocessing move to unit test ( #18779 )
2022-02-17 20:05:41 +08:00
Sujith Kumar S
b8aef10098
fix(mssql): support cte in virtual tables ( #18567 )
...
* Fix for handling regular CTE queries with MSSQL,#8074
* Moved the get_cte_query function from mssql.py to base.py for using irrespetcive of dbengine
* Fix for handling regular CTE queries with MSSQL,#8074
* Moved the get_cte_query function from mssql.py to base.py for using irrespetcive of dbengine
* Unit test added for the db engine CTE SQL parsing.
Unit test added for the db engine CTE SQL parsing. Removed additional spaces from the CTE parsing SQL generation.
* implement in sqla model
* lint + cleanup
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com >
2022-02-10 10:28:05 +02:00
Ville Brofeldt
fdbcbb5c84
fix(csv-export): pivot v2 with verbose names ( #18633 )
...
* fix(csv-export): pivot v2 with verbose names
* refine logic + add test
* add missing verbose_map
2022-02-09 14:01:57 +02:00
Hugh A. Miles II
7194a01040
fix: user UUIDs on export for Native Filter Configuration ( #18562 )
...
* saving work for import
* update
* move logic to update ref
* remove export updates
* remove unneeded code
* cleanup
* Update superset/dashboards/commands/importers/v1/utils.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
* Update tests/unit_tests/dashboards/commands/importers/v1/utils_test.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
2022-02-08 13:10:40 -08:00
Ville Brofeldt
7ad38d5ba1
chore(tests): migrate mssql tests to pytest ( #18251 )
...
* move test
* migrate to pytest
2022-02-02 13:19:58 +02:00
Dave McNulla
8c376548e3
fix(teradata): LIMIT syntax ( #18240 )
...
Co-authored-by: Mccush, Jack <jack.mccush@teradata.com >
Co-authored-by: Jack McCush <33156805+mccushjack@users.noreply.github.com >
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
Co-authored-by: David McNulla <david.mcnulla@teradata.com >
2022-01-31 19:15:42 -08:00
AAfghahi
fa11a97585
fix: remove standalone ( #18157 )
...
* removed standalone
* Update tests/integration_tests/reports/commands_tests.py
* changed standalone
* added tests
* made function more generic
* Update superset/reports/notifications/email.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net >
2022-01-26 13:04:26 -05:00
Michael S. Molina
f018c826b8
refactor: Moves the Explore form_data endpoint ( #18151 )
...
* refactor: Moves the Explore form_data endpoint
* Removes unused imports
* Fixes openapi schema error
* Fixes typo
* Renames and UPDATING.md
2022-01-25 11:14:50 -03:00
Michael S. Molina
959b15eeca
feat: Adds a key-value endpoint to store charts form data ( #17882 )
...
* feat: Adds a key-value endpoint to store charts form data
* Fixes linting problems
* Removes the query_params from the endpoints
* Refactors the commands
* Removes unused imports
* Changes the parameters to use dataclass
* Adds more access tests
* Gets the first dataset while testing
* Adds unit tests for the check_access function
* Changes the can_access check
* Always check for dataset access
2022-01-20 16:27:57 -03:00
Erik Ritter
14b9298ef7
fix: revert #17654 to fix subselect table name parsing ( #18017 )
2022-01-12 21:28:23 -08:00