Created
March 29, 2024 14:16
-
-
Save Kilo59/405de7f0fa08ce8c46e416dfb8cd46b0 to your computer and use it in GitHub Desktop.
GX Update a Datasource
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
import great_expectations as gx | |
context = gx.get_context() | |
my_datasource = context.get_datasource("my_datasource") | |
print(f"{my_datasource!r}") | |
# update the connection string (or any other property) | |
my_datasource.connection_string = "my_protocol://user:password@host/db" | |
# to persist the changes we need to call context.update_datasource | |
context.update_datasource(my_datasource) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment