With a OneCloud Workspace setup and connections in place, let's create a Chain.

Step 1: 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 by selecting the blue (+)

      • Set the variable name to "base-url" with the value: https://s3.amazonaws.com/onecloud-demo

    • Near the top of the window, click the message icon ✉️ to add an email Notification.

      📓 Integrated account platforms will be visible.

      • Select the desired method of contact. For this example, choose "Email".

      • Set the condition as "Success".

      • Add recipients by selecting from the drop-down list.
        📓 Only recipients who have access to the chain can be added.

  • Save the Chain.

  • As there is no Command, the Chain is invalid.

Step 2: Add a Command to Retrieve Data

  • Add the first Command and select HTTP ➡️ GET operation.
    💡 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 it.

  • Name the Command "Get Data".

  • Set the URL parameter:
    - From the left-side panel, under "Select a Variable", choose Chain, “base-url”.
    - Then, click back in the URL parameter box

    - Add the slash character “/” to separate the variables
    - Repeat the steps above to add the WORKSPACE Variable “data-type”.
    - Finally, type “SAMPLE_DAT.csv” to add the sample file.
    ⚠️ The filename and letter case must match exactly.

  • Save the Command.

📓 String Concatenation

To concatenate strings in a OneCloud field, be sure to have the field selected and simply add the characters or variables as required.

Step 3: Add a Command to Preview Data

  • Add a second command to the Chain.

  • Select the File Utilities ➡️ List File Content Command.
    💡 Use the Find tool to search for "File Utilities" and "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".

  • Scroll down to the "File Name" parameter.

  • From the left-side panel, choose "Get Data".

  • Then click "Response" to set the file name to "Response" from the Retrieve Data Command Output.

  • In the "Preview Lines" parameter below, set the value to "10".

  • Save the Command.

Step 4: Publish and Run the Chain

Before the Chain can be run, it needs to be Published.

  • Near the upper-right corner, click the "Publish" button.

  • A pop-up window opens. No comment is necessary. Click "Publish".

  • Near the upper-right corner, click the "Execute" button.

  • Near the upper-right corner, click the "Run Chain" button.

  • To review the output of the final command, double-click on the "Preview Data" Command and then select the "LOGS" tab to confirm the changes.


📚 Additional topics covered in this article:

Chain Variables
Chain Management

Notifications

HTTP Command References - Get

Workspace Configurations

File Utilities Command References - List File Content

Command Output

Publishing a Chain

Run the Chain


Did this answer your question?