-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix: save columns reference from sqllab save datasets flow #24248
Merged
Merged
Changes from 11 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
41a0312
fix save columns refernece
hughhhh 844fbe9
ok
hughhhh 02c01c2
allow schema to be null
hughhhh ef6cead
add support for legacy payload
hughhhh b257562
Merge branch 'master' into fix-save-ds-in-sqllab
hughhhh 8769d6e
set default
hughhhh f0e3734
fix expression
hughhhh 22223a7
ok
hughhhh 84e307b
remove core change
hughhhh 32920fd
update reference from API for column.column_name to match python column
hughhhh a107cee
ok
hughhhh fc741fa
ok
hughhhh 49e10d2
ok
hughhhh 29a224f
remove unneeded test
hughhhh 510cd29
refactor on removing columns being sent on ds creation
hughhhh e69c1a0
revert test
hughhhh f95da35
lets see
hughhhh 278bde6
lintint
hughhhh 8fa92fd
update test
hughhhh 51a0a38
ok
hughhhh 4d62632
added test to verify name change
hughhhh d866479
console
hughhhh 484c5f6
fix test
hughhhh dfc0b96
catch new sqllab endpoint
hughhhh 5732bc4
Merge branch 'master' into fix-save-ds-in-sqllab
hughhhh 7ab451a
oops
hughhhh bc60498
ok
hughhhh 53d7cce
ok
hughhhh 8506bb5
update another test
hughhhh f2b7040
ok
hughhhh 93e2569
lit
hughhhh 85f1e06
update inspector functions
hughhhh b7502f5
oops
hughhhh 45d23ff
1 more
hughhhh 7b17569
ok
hughhhh fe57567
fix integration config
hughhhh 34b1f17
fix integration config
hughhhh c73464d
ok
hughhhh 7317396
ok
hughhhh bb042b0
change name for column infor
hughhhh de8c023
preseto
hughhhh 657c7cf
more
hughhhh 4465785
1 more
hughhhh 3f82bab
fixing more test
hughhhh d00e204
presto fix
hughhhh d4175a0
update spec
hughhhh 78cd4e7
fix sync logic on the frontend
hughhhh bec68d0
fix merge conflict
hughhhh ed9728b
fix
hughhhh 0d47277
linting
hughhhh 8189c93
linting
hughhhh 8895cff
oops
hughhhh 4454cf3
1 more
hughhhh d96fbfd
fix more presto test
hughhhh bb8921a
ok
hughhhh cb6677d
ok fix
hughhhh 6d3d955
omg
hughhhh a15cead
reference grandparent
hughhhh eeec51f
make schema backwards compatible
hughhhh 743746e
Merge branch 'master' of https://github.com/preset-io/superset into f…
hughhhh 2a1f09e
change refernce
hughhhh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,8 @@ def update_saved_query_exec_info(query_id: int) -> None: | |
def save_metadata(query: Query, payload: Dict[str, Any]) -> None: | ||
# pull relevant data from payload and store in extra_json | ||
columns = payload.get("columns", {}) | ||
for col in columns: | ||
col["column_name"] = col.pop("name") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from the query execution the dict comes back |
||
db.session.add(query) | ||
query.set_extra_json_key("columns", columns) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've asked this before, but I don't remember the answer. Why can't we standardize this? This is definitely going to cause bugs in the future, having two possible options for the attribute name.
Can't we normalize the schema early, if they have to be stored differently, instead of normalizing it late here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking into this now @betodealmeida, i think it was just a difference between how sqllab consumes columns vs. explore