Skip to content

Instantly share code, notes, and snippets.

@Kilo59
Created March 29, 2024 14:16
Show Gist options
  • Save Kilo59/405de7f0fa08ce8c46e416dfb8cd46b0 to your computer and use it in GitHub Desktop.
Save Kilo59/405de7f0fa08ce8c46e416dfb8cd46b0 to your computer and use it in GitHub Desktop.
GX Update a Datasource
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