Skip to content

Latest commit

 

History

History
126 lines (91 loc) · 7.76 KB

README.md

File metadata and controls

126 lines (91 loc) · 7.76 KB

Snowfakery Recipe Templates

Snowfakery Recipe Templates repository showcases all contributed Snowfakery recipes by volunteers from numerous SFDC Community Sprints. All the recipes are under the BSD 3-Clause License and are maintained by Data Gen Toolkit team.

Snowfakery Use Cases

  1. You can use Snowfakery to seed synthetic data into a sandbox or a scratch org.
  2. You can generate synthetic data for standard objects, custom objects and custom objects for managed packages.
  3. You can generate synthetic data and output as SQL or CSV file or load directly to a target Salesforce org using CCI.
  4. Snowfakery also supports seeding files as ContentVersions using standard plugins.
  5. You can query existing Salesforce data and relate to snowfakery recipe.
  6. The usage of Snowfakery is not limited to NPSP nor EDA; however, Data Gen Toolkit team develops resources to advocate nonprofits and education community.

Tooling

Tools for Participating

Most people who participate in this project have access to VS Code.

This project is not installable.

We have orgs ready for you to use during a sprint. You can request access in Slack in the snowfakery-recipe-makers channel.

We keep track of next steps in GitHub in the Issues tab

Tools for Contributing

The items checked below are needed to actively contribute to the project. Find more details about these tools

  • GitHub
  • Metecho
  • CumulusCI
  • Google Drive (not needed, but we do have a folder. Ask for access in Slack in the snowfakery-recipe-makers channel.)

Development

Multiple steps are required to set up a development-ready environment in your local machine. After completing the initial setup, the snowfakery recipes in the repository can be utilized for loading data to a scratch org.

Installation

  1. Install Visual Studio Code
  2. Install SFDX extension for VSC
  3. Install Git
  4. Install CumulusCI
  5. (optional) CumulusCI extension for VSC

Setup

Salesforce Environment

CumulusCI

  • Clone this repository into your local directory
$ git clone https://github.com/SFDO-Community-Sprints/Snowfakery-Recipe-Templates.git
  • Set up CumulusCI : this repository includes a project initialization in cumulusci.yml file. You can skip the project initialization cci project init

Set up the right flavor of scratch org

If you want to use a scratch org to play with Snowfakery recipes in this repository, you may want to install NPSP, EDA, Outbound Funds (OBF), or Program Management Module (PMM) as well.

  • For EDA recipes, run cci org scratch eda eda --default to create a new scratch org and set it as a default
    • Install EDA Run cci flow run eda_scratch --org eda
      • Optional for EDA orgs: Install Advisor Link Run cci flow run sal_eda_scratch --org eda
  • For NPSP, OBF, or PMM recipes, run cci org scratch dev dev --default to create a new scratch org and set it as a default
    • Install NPSP Run cci flow run npsp:install_prod --org dev
    • Install OBF Run cci flow run obf_scratch --org dev
      • Optional for OBF orgs: Install NPSP Run cci flow run obf_npsp_scratch --org dev
    • Install PMM Run cci flow run pmm_scratch --org dev
      • Optional for PMM orgs: Install NPSP Run cci flow run npsp_scratch --org dev
  • For Nonprofit Cloud scratch orgs run cci org scratch npc npc --default; cci org browser to create a new scratch org and set it as a default. No further packages are required.
  • For Education Cloud recipes, run cci org scratch edc edc --default; cci org browser to create a new scratch org, set it as default, and open it. No further installs are required, but education cloud may require additional setup.

Instructions for the Collaborators

There are several open issues suggesting new recipes we need and fixes to existing recipes. We also welcome contributions of new recipes we haven't though of yet.

  • Please test your contribution carefully.
  • Follow the project naming conventions when adding your file(s).
  • Create a pull request that explains what recipe you are adding/changing, and include any special testing instructions we should know about.

Snowfakery CLI

Most of our work in this repo is around creating recipes for use directly within Salesforce, so the final work should make sense within a Salesforce context. That said, Snowfakery has its own CLI that can output a file of data instead of adding it to Salesforce.

# To view the list of options for running a snowfakery recipe file
# https://snowfakery.readthedocs.io/en/docs/#command-line-interface

$ snowfakery --help
  • Output as a comma-separated csv file.
# snowfakery
# --output-format [png|svg|svgz|jpeg|jpg|ps|dot|json|txt|csv|sql]
# --output-file <fileName.extension>
# <Relative path to a recipe yml file>

$ snowfakery --output-format json --output-file src/foo.json snowfakery_samples/npsp/RD_npsp.recipe.yml
  • Snowfakery Cheatsheet (link coming soon)

Additional Useful References