W-16337942: Allow users to update functions that are already deployed #646
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.
This change allows users to update existing functions without having to redefine them. Currently in order to make updates, users must redeploy, which require the function to have been defined locally. This change will allow users to update functions knowing only their name.
Example use:
Assuming you have an existing function deployed called detectLanguage, this will update its description, and ensure the is_public is set to False.
If your server is configured with auth, you will need to set credentials before being able to use this functionality
client.update('detectLanguage', description= "Updated Description", is_public = False)
Optional fields to update:
is_public
,schema
,description
If no function with the given name exists, run time error will be thrown.
Calling update will update the function and bump its version.
I have tested this locally and with tableau and the custom functions explorer. Functions that have been updated are shown based on is_public, and have their descriptions and schemas updated correctly