Skip to main content

Using mock deployments in Snowflake

If you're integrating Modelbit Deployments into your data pipeline or dbt jobs, sometimes you may want to skip calling the model during tests or development. Modelbit provides mock functions for these situations.

Use session variables to tell Modelbit whether to call the predictive model or to return static data instead. Setting MODELBIT_MOCK to 'MOCK' tells Modelbit to skip calling the API during this session:

select ext_example_func_123(...); -- won't call predictive model

If you don't set MODELBIT_MOCK, or unset it, Modelbit will follow the default behavior and call the predictive model:

select ext_example_func_123(...); -- will call predictive model