Skip to main content

mb.set_snowflake_mock_return_value(deployment_name, mock_return_value, ...)

Changes the Snowflake mock return value of a deployment and deploys a new version.

Parameters

  • deployment_name: str The name of the deployment to get the mock value from.
  • mock_return_value: Any The new value to use for the Snowflake mock return value. Use None to remove the mock return value.
  • branch: Optional[str] The branch of the deployment. If unspecified the current branch is used and that default is main.

Returns

No value is returned. A success message is printed if the update succeeds. And exception is raised if the deployment is not found or the branch is protected.

Examples

Setting the mock return value

new_mock_value = [
{"key1": "value1", "key2": "value2"},
{"key1": "value1", "key2": "value2"},
]

mb.set_snowflake_mock_return_value("my_deployment", mock_return_value=new_mock_value)

Removing the mock return value from a deployment

mb.set_snowflake_mock_return_value("my_deployment", mock_return_value=None)

See also