Repo for all contributed Snowfakery recipes, maintained by Data Gen Toolkit team.
These instructions explain how to create sample data using for EDA objects using the sample files in the snowfakery_samples directory.
Install Python. Python is usually pre-installed on MacOS. See CumulusCI installation instructions for installing on Windows
Install pipx
pip3 install pipx
# add pipx to your path and restart your terminal if necessary
Install snowfakery
pipx install snowfakery
# test the installation
snowfakery --version
Generate sample data locally. Run Snowfakery with the eda_objects.yml
file to generate output on your local machine.
snowfakery snowfakery_samples/EDA/eda_objects.yml
Note that the eda_objects.yml
recipe is dependent on the eda_macros.yml
file in the same directory. Be sure to copy both and save in the same directory if copying to a new project.
To load snowfakery data into a Salesforce org, you also need to install the Salesforce CLI and CumulusCI and connect to a Salesforce Dev Hub org. Follow this Trailhead module to get set up.
Navigate to the root folder of the project that is organized with source format.
Initialize CumulusCI configuration in the project
cci project init
Make sure you enter sfdx
for the source format and indicate that you are extending EDA as part of the setup wizard.
Add a snowfakery recipe to the datasets directory
cci flow run dev_org --org dev
Assign account record types to Admin profile The sample recipe in this repo creates account records using record types that are common in a unversity context. The admin profile does not have access to these record types by default in the scratch org. Navigate to the System Admininistrator profile and assign all of the Account object record types to the profile.
# example below assumes the snowfakery recipe is located datasets/eda_objects.yml
cci task run generate_and_load_from_yaml -o generator_yaml datasets/eda_objects.yml --org dev
cci org browser dev
Navigate to the project folder
Initialize CumulusCI configuration in the project
cci project init
Add a snowfakery recipe to the datasets directory
cci org connect <sandbox_name> --sandbox
# example below assumes the snowfakery recipe is located datasets/eda_objects.yml
cci task run generate_and_load_from_yaml -o generator_yaml datasets/eda_objects.yml --org <sandbox_name>
cci org browser <sandbox_name>