Commit Graph

116 Commits

Author SHA1 Message Date
Beto Dealmeida
d01fdad1d8 feat: add export_related flag (#19215)
* feat: add export_related flag

* Fix lint
2022-03-16 16:03:06 -07: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
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
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
Beto Dealmeida
30c0459808 fix: extra column in metrics (#17784) 2021-12-22 10:39:29 -08:00
Beto Dealmeida
c49545aec1 fix: dataset extra import/export (#17740)
* fix: dataset extra import/export

* Update superset/datasets/commands/importers/v1/utils.py
2021-12-22 09:41:31 -08:00
Beto Dealmeida
37cc2c4d15 fix: column extra in import/export (#17738) 2021-12-14 18:33:52 -08:00
cccs-joel
e6db62c469 fix: Change datatype of column type in BaseColumn to allow larger datatype names for complexed columns (#17360)
* Change datatype of column type in BaseColumn to allow larger datatype names for complexed columns

* Fixed formatting

* Added an entry in the UPDATING.md file as a potential downtime

* Update UPDATING.md

Accept proposed changes.

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

* Updated down revision number to reflect new head

Co-authored-by: cccs-joel <cccs-joel@users.noreply.github.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-12-13 14:28:21 -08:00
Ville Brofeldt
0544bee74e fix(api): incorrect api schema definitions (#17620) 2021-12-01 21:47:22 +02:00
Hugh A. Miles II
a1961cfc6f fix: Users being able to update datasets across DBs (#17348)
* add database id back

* add condition to verify dataset is being changed

* Update superset/datasets/dao.py

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

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-11-10 19:45:48 -05:00
Beto Dealmeida
1fbce88a46 fix: set correct schema on config import (#16041)
* fix: set correct schema on config import

* Fix lint

* Fix test

* Fix tests

* Fix another test

* Fix another test

* Fix base test

* Add helper function

* Fix examples

* Fix test

* Fix test

* Fixing more tests
2021-11-04 11:09:08 -07:00
ofekisr
0d0c759cfe refactor: sql lab command: separate concerns into different modules (#16917)
* chore move sql_execution_context to sqllab package

* add new helper methods into base Dao

* refactor separate get existing query concern from command

* refactor separate query access validation concern

* refactor separate get query's database concern from command

* refactor separate get query rendering concern from command

* refactor sqllab_execution_context

* refactor separate creating payload for view

* chore decouple command from superset app

* fix pylint issues

* fix failed tests

* fix pylint issues

* fix failed test

* fix failed black

* fix failed black

* fix failed test
2021-10-03 11:15:46 +03:00
Hugh A. Miles II
331de0c4ae fix: Fix Uniqueness check before update for Sqllab Overwrites (#16859)
* add condition to make sure columns are available before throwing

* fix

* remove database_id from history changed

* refactor update call to datasets

* cleanup

* oops

* prettier
2021-09-29 13:38:29 -04:00
Phillip Kelley-Dotson
a198dbb19b feat: add certifiedby & certification details fields to the edit dataset columns fields (#16454)
* add migration

* add backend and frontend for certified

* update migration with batch

* fix integration test and update Updating.md

* Update superset-frontend/src/datasource/DatasourceEditor.jsx

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>

* Update superset-frontend/src/datasource/DatasourceEditor.jsx

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>

* Update superset-frontend/src/datasource/DatasourceEditor.jsx

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>

* change method name

* add tooltip info

* add mixin

* merge heads

* address comments

* fix select label styles

* add extra field

* fix test?

* add extra field to put schema

Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
2021-09-22 15:09:30 -07:00
Michael S. Molina
596e1cdf9b refactor: Changes the DatabaseSelector and TableSelector to use the new Select component (#16483) 2021-09-22 07:43:46 -03:00
Beto Dealmeida
493e804320 chore: log URI before downloading data on import (#16762) 2021-09-21 14:22:37 -07:00
Beto Dealmeida
092ef5bdfc fix: set importer as owner (#16656)
* fix: set importer as owner

* Fix tests
2021-09-15 12:27:02 -07:00
Erik Ritter
8adc31d14c Revert "chore: Changes the DatabaseSelector to use the new Select component (#16334)" (#16478)
This reverts commit c768941f2f.
2021-08-26 22:28:04 -03:00
Ville Brofeldt
ac1d779a30 chore(ci): bump pylint to 2.10.2 (#16463) 2021-08-26 20:30:41 +03:00
Michael S. Molina
c768941f2f chore: Changes the DatabaseSelector to use the new Select component (#16334) 2021-08-23 15:41:03 -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
b5c7ed9f18 chore(pylint): Reenable too-many-locals check (#16268)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 04:23:40 +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
Michael S. Molina
720e5b111a chore: Shows the dataset description in the gallery dropdown (#16200)
* chore: Shows the dataset description in the gallery dropdown

* chore: Adjusts the tooltip positioning, fixes the search and removes unnecessary bootstrap data
2021-08-13 15:08:12 -03:00
Ville Brofeldt
d6f9c48aa1 feat(dao): admin can remove self from object owners (#15149) 2021-08-13 12:42:48 +03:00
Beto Dealmeida
7de54d016e feat: import configuration from directory (#15686)
* feat: command to import configuration from a directory

This allows us to keep Superset updated from a repo:

```bash
$ superset import-directory /path/to/configs/
```

For example, I created a simple dashboard with a single chart:

PLACEHOLDER

I then exported it to a file `dashboard_export_20210714T104600.zip` and
unzipped it. After deleting the dashboard, chart, dataset, and database
I imported everything back with:

```bash
$ superset import-directory ~/Downloads/dashboard_export_20210714T104600/
```

I then changed the chart title in `~/Downloads/dashboard_export_20210714T104600/charts/Cnt_per_country_1.yaml` and ran the command again. The chart was succesfully updated:

PLACEHOLDER

* Small fixes
2021-08-11 18:42:50 -07:00
John Bodley
32a5680510 chore: pylint reenable bad-option-value (#15775)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-07-22 04:34:08 +12:00
Kamil Gabryjelski
09c44d05fd feat(native-filters): Hide non-numeric columns in numeric range filter (#15385)
* feat(native-filters): Hide non-numeric columns in numeric range filter

* Return true if type_generic undefined

* Code review comments

* Replace any with string

* fix tests

* add missing columns to select

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-06-27 07:35:17 +03: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
Beto Dealmeida
42cb5266fa fix: import metrics with extra (#15047)
* fix: import metrics with extra

* Fix test
2021-06-08 18:56:55 -07: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
f1ea1d74a7 fix: OpenAPI boolean type (#14827) 2021-05-25 14:46:41 -07: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
Ville Brofeldt
4ac90ddaee refactor(utils): replace strtobool with parse_boolean_string (#14494) 2021-05-06 15:57:02 +03:00
Sam Faber-Manning
11260b3117 chore: add stack trace to all calls of logger.error (#14382) 2021-04-30 09:22:05 -07:00
Beto Dealmeida
ffcacc3393 fix: new import/export CLI (#13921)
* fix: CLI for import/export

* Add tests

* Remove debug
2021-04-23 10:50:49 -07:00
John Bodley
a3b41e2bac fix: Issue 13956 (#13980)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-04-09 15:21:58 +12:00
Beto Dealmeida
3b11654c5a fix: import dataset/dashboard empty keys (#13979) 2021-04-06 20:55:15 -07:00
Hugh A. Miles II
f291ba05c6 fix: SQL -> Explore Overwrite flow (#13946) 2021-04-05 14:52:04 -04:00
Beto Dealmeida
7c23dfc195 fix: bad copy-and-paste in API spec (#13790) 2021-03-25 13:27:39 -07:00
AAfghahi
6137a200a3 test: changing logger.exception to logger.errors in databases api (#13751) 2021-03-24 13:13:10 -04:00
ʈᵃᵢ
3e646799a1 fix(datasets): log create exceptions as warning (#13652) 2021-03-22 14:46:18 -07:00
Daniel Vaz Gaspar
d1e93078f4 fix: delete dataset columns and metrics on the REST API (#13389)
* feat: delete dataset columns and metrics on the REST API

* fix openapi spec

* change delete comparison to id

* delete columns and metrics on their namespace

* add missing licenses

* add failed test

* address comment
2021-03-15 18:14:26 +00:00
Beto Dealmeida
9fc03f0424 fix: API to allow importing old exports (JSON/YAML) (#13444)
* fix: fix API to allow importing old exports (JSON/YAML)

* Fix test

* Fix lint

* Add description to API schema
2021-03-04 17:18:27 -08:00
Jesse Yang
55c8f9ba60 feat(explore): allow opening charts with missing dataset (#12705) 2021-01-25 15:09:03 -08:00
Beto Dealmeida
9a159b30c4 fix(load_examples): better fix for load_data (#12702)
* fix(load_examples): better fix for load_data

* Address changes
2021-01-22 16:32:39 -08:00
Beto Dealmeida
7bef5ab4d2 fix: ignore system files on import (#12526) 2021-01-15 15:53:55 -08:00
Beto Dealmeida
8f83afcf49 feat: new Slack dashboard (#12415)
* feat: new Slack dashboard

* Add ASL license

* Fix test
2021-01-12 15:24:44 -08:00