Chalk home page
  1. Integrations
  2. Test Integrations Locally


Many resolvers generate features by connecting to external, production-like systems (e.g. databases and APIs). It can be challenging to validate these resolvers since they involve communication between several systems. This guide will help you execute resolvers that communicate with those external systems on your local environment.

Setup Environment Variables

Chalk’s datasource integrations operate by assuming certain environment variables exist which provide integration information (such as urls, passwords, etc.) to the python code. When executing these resolvers locally, you’ll need to replicate those environment variables. For the following guide lets assume a single Postgres datasource named “PG”.

  1. The first env var lists all your datasources by name.
  1. Then you should set environment variables for datasource. These environment variables should be pre-fixed with the datasource name. You should have a env var for each field in 

Exercise your resolvers

Once the environment variables are setup correctly, you can execute your resolver like any python code.
For example if the file chalkproject/ includes a resolver like get_transactions_from_snowflake, you can execute it any python environment.

$ source .venv/bin/activate
$ (.venv) python
>>> from chalkproject.resolvers import get_transactions_from_snowflake
>>> get_transactions_from_snowflake()