Now that we have a OneCloud Workspace setup, let's create a Chain.
- From the OneCloud Workspaces, select the DEV environment.
- Add a new Chain by selecting the green (+) button.
- Name the Chain "Simple Extract Chain".
- Add a Chain Variable "base-url" with the value:
- Add an email notification by clicking the message icon.
- Select the condition as Success.
- Add recipients by selecting from the drop-down list. Note only receipts who have access to the chain can be added.
- Save the Chain.
- Add the first Command and select HTTP -> GET operation.
(Hint: use the Find tool to search for "HTTP" and then search for "GET".)
Add the Command GET by dragging on to the pallet.
Select the new Command and drag it to the Start. The Chain Start will show a plus icon indicating that you can use that command as the start of the Chain.
Edit the Command by double-clicking on the Command
Name the Command "Get Data".
- Set the URL parameter by:
(a) Use the variable selector and choose the Chain variable “base-url” by clicking on the icon (< >).
(b) Add the character “/”.
(c) Next use the variable selector again and add the Workspace Variable “data-type”.
(d) Finally, add the filename “SAMPLE_DAT.csv”
(carefully type the filename and use the same case)
- Save the Command.
To concatenate strings in a OneCloud field, be sure to have the field selected and simply add the characters or variables as required.
- Add a second command to the Chain.
- Select the File Utilities -> List File Content Command.
(Hint: use the Find tool to search for "File Utilities" and then search for "List File Content").
Connect the "Get Data" Command to the "List File Content" Command.
- Edit the "List File Content" Command.
- Name the Command: "Preview Data".
- Set the Preview Lines parameter to 10.
- Set the File Name to the Response from the Retrieve Data Command Output.
- Save the Command.
Before the Chain can be run, it needs to be published.
- Publish the Chain, by clicking the PUBLISH button on the upper bar.
- Navigate to the Execute area of OneCloud by clicking on the EXECUTE button on the upper bar.
- Run the Chain.
- Confirm your changes have been made by looking at the output in the final command.
(Click on the "Preview Data" Command and then select the LOGS tab)