Salesforce-Data-TreecipeSalesforce-Data-Treecipe is a Visual Studio Code extension designed to streamline the process of generating production-like data during development in order to support building Quality in. This extension auto-generates a recipe yaml file based on what is already in the source object metadata xml of your project. PrerequisitesVS Code Extension Installation
Get started by walking through the below commands (see corresponding video for each step):Note: press
1. Salesforce Treecipe: Initiate Configuration FileThis command initiates the creation of a configuration file that is required before using other features of the extension. The command creates a root directory folder called "treecipe" and within it a configuration file called "treecipe.config.json". This file is auto generated based on the selection made from the prompted "Select objects directory". The end result treecipe.config.json file is expected to look like the below:
How It Works:
Once the configuration file is generated, you can begin using the Generate Treecipe command. Corresponding Video:2. Salesforce Treecipe: Generate TreecipeThis command generates a Treecipe, a structured representation of your Salesforce data, based on your configuration. It parses the "salesforceObjectsPath" directory path that was provided when running the "Initiate Configuration File" command above, and then generates a yaml file of objects and associated fields found in that directory. As part of this yaml file generation there are some items to be aware of:
NOTE: If this command is ran before "Initiate Configuration File" command, an exception will be handled and you a VSCode warning box will render showing an option to run the "Initiate Configuration File" command. There is also an option to "Report a Bug" if the initiation command has already been completed. Prerequisite:
Once your configuration file and objects directory are set up, running this command will generate a custom tree structure to assist in your Salesforce development and data handling. Corresponding Video:3. Salesforce Treecipe: Run Snowfakery by Recipe(Treecipe) to create FakeDataSetThis command prompts the user to select an existing recipe(Treecipe) file to generate fake data from. With the selection made, the snowfakery CLI will execute against they yaml file and produce json structured, production-like data which is then converted for usage with Salesforce Collection Api Corresponding Video:4. Salesforce Treecipe: Insert Data Set by DirectoryThis command prompts the user for the following items:
VIDEO WALKTHROUGHS:Initiate Treecipe Configuration with expected Objects directoryhttps://github.com/user-attachments/assets/f8401f28-a04c-4abc-a56f-c860cce96dee Generate Treecipe based on treecipe.config.jcon ( keep an eye out for OOTB fields and "REMOVE ME" lines )https://github.com/user-attachments/assets/fd127b55-d434-4a73-9d65-cf4172fbce6f Run Snowfakery by existing recipe yaml filehttps://github.com/user-attachments/assets/d7dfcf70-70f8-4ce3-b254-280e2bbb0b7d Insert Data Set by Directoryhttps://github.com/user-attachments/assets/a0491f86-9360-4450-afae-f71fe07dbc21 Troubleshooting, Exception Handling, and Reporting BugsSee below for troubleshooting when specific commands are not working:
NOTE: All extension commands are wrapped in a try-catch and will prompt a "Report a Bug" that will auto-generate a GitHub Issue template for a bug that includes the stack trace. This would support quick turn-around time for known issues. See below for a video walkthough: https://github.com/user-attachments/assets/dff4a3cb-e244-4959-9dec-dcf094f713c2 ContributingThis project and codebase will be open-sourced shortly :) LicenseThis extension is licensed under the MIT License. Install Snowfakery CLISnowfakery CLI Installation and UsageOverviewSnowfakery is a tool for generating synthetic data. This document provides instructions for installing and using the Snowfakery CLI on any operating system. Prerequisites
Installation1. Install Snowfakery via pipTo install Snowfakery globally, open your terminal or command prompt and run the following command:
2. Verify the InstallationAfter installation, verify that Snowfakery is installed by checking the version:
You should see the version number of Snowfakery printed in the terminal, confirming a successful installation. Usage (Withou Salesforce Data Treecipe Extension)Once installed, you can generate synthetic data by running Snowfakery from the command line:
For more information about writing Snowfakery recipes and using the tool, please refer to the official documentation: Uninstalling SnowfakeryIf you wish to uninstall Snowfakery, you can do so using pip:
|