Merged
Conversation
JonathanZhu11
commented
Mar 13, 2020
mmn599
reviewed
Mar 16, 2020
JonathanZhu11
commented
Mar 16, 2020
JonathanZhu11
commented
Mar 16, 2020
JonathanZhu11
commented
Mar 20, 2020
mmn599
approved these changes
Mar 20, 2020
ivannp
reviewed
Mar 23, 2020
ivannp
reviewed
Mar 23, 2020
ivannp
reviewed
Mar 23, 2020
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Support of pymssql officially stopped in November 2019 in favor of pyODBC. This change updates sqlmlutils to use pyODBC instead, and changes the version from 0.7.2 -> 0.8.0.
This change brings a few other changes as well:
pymssql allows us to capture the informational messages that come from SQL Server, but pyODBC does not (see here). This means that any output from sp_execute_external_script cannot be captured in a convenient way when using pyODBC. Instead, we capture the output inside python and send it to the caller using output parameters.
pyODBC allows us to easily implement output parameters, and since we need them for the above stdout problem, we have added them here. As part of this change, stored procedure execution now return a tuple of type (DataFrame, dictionary) where the first element is the OutputDataSet and the second is a dictionary of output parameters.
pyODBC allows us to parameterize the sql queries instead of using concatenated strings. This also allows us to transfer larger binaries, which is useful for package management.
Some code refactoring, including using f-strings for code reading ease instead of .format in a number of places.
Export Scope as well so the user doesn't have to dig for the correct module to find Scope for package management.
Changed a number of tests that were using old package versions so that they are up to date, and to speed up testing.