Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra column to SavedQuery #6687

Merged
merged 3 commits into from
Jan 18, 2019
Merged

Add extra column to SavedQuery #6687

merged 3 commits into from
Jan 18, 2019

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Jan 15, 2019

Similar to #6112, this PR adds an extra column to SavedQuery.

Note that this PR depends on #6686, so the extra columns in the API are being shown here.

@betodealmeida betodealmeida added easy-review risk:db-migration PRs that require a DB migration labels Jan 15, 2019
@@ -75,6 +75,9 @@ def pre_update(self, obj):


class SavedQueryViewApi(SavedQueryView):
list_columns = [
'label', 'sqlalchemy_uri', 'user_email', 'schema', 'description',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need sqlalchemy_uri and user_email in the list view, how about the database name and user name in instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. The reason I'm exposing this is for Airflow, so it can schedule queries. In that case, having the email is better, since the username in our case comes from the Google auth. The SQLAlchemy URI also gives more info than just the DB name. But if you think it makes sense to return username and database name I can do the mapping in Airflow instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually I didn't realized this is SavedQueryViewApi and not just SavedQueryView, it's totally good/fine to add it here. I thought this would affect the list view that users see...

@kristw kristw added the need:rebase Requires rebasing on top of current master label Jan 15, 2019
@codecov-io
Copy link

Codecov Report

Merging #6687 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6687      +/-   ##
==========================================
- Coverage   56.22%   56.19%   -0.03%     
==========================================
  Files         519      520       +1     
  Lines       23098    23186      +88     
  Branches     2759     2765       +6     
==========================================
+ Hits        12986    13030      +44     
- Misses       9702     9746      +44     
  Partials      410      410
Impacted Files Coverage Δ
superset/views/sql_lab.py 93.75% <ø> (+0.13%) ⬆️
superset/models/sql_lab.py 95.65% <100%> (-2.81%) ⬇️
.../assets/src/SqlLab/components/SqlEditorLeftBar.jsx 36.53% <0%> (-52.58%) ⬇️
.../explore/components/controls/DatasourceControl.jsx 54.16% <0%> (-2.5%) ⬇️
...uperset/assets/src/datasource/DatasourceEditor.jsx 61.58% <0%> (-0.74%) ⬇️
superset/assets/src/components/Checkbox.jsx 100% <0%> (ø) ⬆️
...ations/deckgl/layers/Polygon/PolygonChartPlugin.js 0% <0%> (ø) ⬆️
superset/data/bart_lines.py 38.46% <0%> (ø) ⬆️
...ets/src/dashboard/components/dnd/DragDroppable.jsx 97.14% <0%> (ø) ⬆️
... and 500 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 207d952...5cdba63. Read the comment docs.

@kristw kristw added enhancement:request Enhancement request submitted by anyone from the community and removed easy-review labels Jan 16, 2019
@betodealmeida betodealmeida merged commit 31ea681 into apache:master Jan 18, 2019
@betodealmeida betodealmeida added change:backend Requires changing the backend v0.31 and removed need:rebase Requires rebasing on top of current master labels Jan 22, 2019
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header

(cherry picked from commit 31ea681)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header

(cherry picked from commit 31ea681)
(cherry picked from commit 31c1014)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header

(cherry picked from commit 31ea681)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header

(cherry picked from commit 31ea681)
(cherry picked from commit 9c87efd)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header

(cherry picked from commit 31ea681)
(cherry picked from commit 9c87efd)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header

(cherry picked from commit 31ea681)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header

(cherry picked from commit 31ea681)
(cherry picked from commit 8667b07)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Jan 31, 2019
* Expose more columns in saved queries API

* Add extra column to SavedQuery

* Add ASF header

(cherry picked from commit 31ea681)
(cherry picked from commit 764becaad6cf4d157c6fcba43a681d9768cf266b)
@mistercrunch mistercrunch added the 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels change:backend Requires changing the backend enhancement:request Enhancement request submitted by anyone from the community risk:db-migration PRs that require a DB migration v0.31 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants