Marley227 / Snowfakery-Recipe-Templates

Repo for all contributed Snowfakery recipes, maintained by Data Gen Toolkit team.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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, you may want to install NPSP or EDA as well.

  • Run cci org scratch dev dev --default to create a new scratch org and set it as a default
  • Install EDA Run cci flow run eda:trial_org --org dev
  • Optional for EDA orgs: Install Advisor Link Run cci flow run sal:install_base --org dev
  • Install NPSP Run cci flow run npsp:install_prod --org dev

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

About

Repo for all contributed Snowfakery recipes, maintained by Data Gen Toolkit team.

License:BSD 3-Clause "New" or "Revised" License