Crunch Automation is only available for users who have the correct permissions in Crunch:
- Dataset scripts are applied to a single dataset and require users to have Editor permission on the folder where the dataset is saved.
- System scripts are applied to a folder or account. Users must have Editor permission on a folder to run a script on the folder. Only admins can run system scripts at the account level.
Crunch Automation allows you to easily, quickly, and reliably automate repetitive data processing tasks without requiring R or Python.
If you have a series of data processing tasks (such as recodes, transformations, metadata editing, and so on), Crunch Automation can perform these tasks automatically through either the Crunch user interface or by sending commands through the Crunch API.
Using the web app (dataset and system scripts)
The following describes how to use Crunch Automation for dataset and system scripts through the user web app. To find and use Crunch Automation:
- Sign in to Crunch.
- Open one of the following (either a folder or dataset):
- Folder — Folders are located in the left nav bar. Account level scripts can be run on any folder in your account.
- Dataset — Datasets appear within folders. You must have editing permissions for the dataset in order to use Crunch Automation.
- Click the small caret symbol next to the name of the dataset or folder.
- Select Automation from the drop-down menu that appears.
The Crunch Automation page opens for either a folder or dataset (the following shows the Crunch Automation dialog box for a dataset):
- Paste a script into the text box. You can also upload a file.
- Click the Apply script button when finished.
- After your Automation script successfully runs, the Crunch Automation panel closes.
Adjusting your script
You can adjust your script in various ways, such as making adjustments to your variables, fixing errors, and clearing and reverting previous Automation runs.
List Variables (dataset scripts)
You can list all of your variables for a dataset (and either copy/paste it or download it as a .txt file) by clicking the the 'List Variables' tab.
All of the variables are listed as "commented" characters, so you can insert them in your script file for easily handling.
Fix Errors
If an error occurs after you run a script, an error message appears in the Crunch Automation Errors box.
After you review and fix the errors in your script, click the Back button to return to the main Crunch Automation page.
Clear a script
A message appears at the top after you copy/paste or upload a script.
If you wish to make changes or use a different script, simply click the Clear button to start over.
Revert a script (dataset scripts)
You can revert a previously-run script at any time. Crunch Automation will restore your dataset to the point directly before you ran the original script.
To revert a script:
- Open the Crunch Automation dataset.
- Click the Automation option in the dataset menu.
The Crunch Automation box opens, which displays the script that ran on your dataset and several options below it.
- Click the Revert Dataset button to clear the script and return the dataset to the state it was in just before the script ran. Alternatively, you can click Copy to Clipboard to copy the script, Download to download the script as a .txt. file, or Cancel to cancel and return to your dataset.
- When ready, click the Revert button to return to the point just before the script ran.