Help Desk

Submit a ticket My Tickets
Welcome
Login

Load Data from a Flat File

Loading data to Anaplan from a text file is very common. This tutorial shows how to create a Chain that loads data from a sample flat file into Anaplan and stage it as an Import Data Source.

Once the upload is complete, this tutorial will show you the OneCloud tabular transformation capabilities since data often needs to transformed prior to being uploaded to Anaplan.

Step 1: Create an HTTP Connection

The sample data for this exercise is stored on a web server hosted by Amazon Web Services. In order to fetch the data, we will need to create a OneCloud HTTP Connection.

  1. Navigate to the OneCloud Connection Manager.
  2. Add a Connection.
  3. Select HTTP Request.
  4. Confirm that the connection is enabled for DEV and PROD environments.
  5. Save the Connection.

Step 2: Create a OneCloud Chain

  1. From OneCloud Workspaces select the DEV environment.
  2. Add a new Chain and name it "Upload Text File to Anaplan".
    Note: You will only see the centered button "Add a New Chain" if this is the first Chain
  3. Save the Chain.

Step 3: Add a command to fetch a sample data file

  1. Add the first Command and select HTTP-->GET operation.
    (Hint: use the Find tool to search for "HTTP" and then search for "GET".)
  2. Add the Command GET by dragging on to the pallet.
  3. 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.
  4. Name the Command "Get Data".
  5. Copy the following URL to the URL parameter in the HTTP Command.
  • SIMPLE_FACT.csv
    https://s3.amazonaws.com/onecloud-demo/simple/SIMPLE_FACT.csv

Step 4: Add a command to upload the data to Anaplan

  1. Add a second command to the Chain.
  2. Select the Anaplan Upload Command.
    (Hint: use the Find tool to search for "Anaplan" and then search for "Upload File").
  3. Connect the "Get Data" Command to the "Upload Command".

Step 5: Add a command to upload the data to Anaplan

  1. Double click on the command Upload File to edit.
  2. Set the Workspace parameter to the variable "anaplan-workspace".
  3. Set the Model parameter to the variable "anaplan-model".
  4. Set the Server file parameter to "SIMPLE_FACT.csv".
  5. Set the Source file parameter to the Response from the Get Data output.
  6. Set the Header records to "1".

Step 6: Publish the Chain

Before the chain can be run, it needs to be published. Publishing is an import feature in OneCloud so chains to be edited and will only run and executed the commands when they are ready and published. Every time you edit a chain or a command within a chain, you will need to republish the Chain.

  1. To publish a chain, simply click the publish icon in the Chain editor.
  2. Optionally add a Publish Chain Comment*.
  3. Learn more about publishing a Chain.

Step 7: Run the Chain

  1. Navigate to the Monitor area of OneCloud by clicking on the airplane icon in the lower right corner.
  2. Run the Chain.
  3. View the interactive outputs.

Step 8: Confirm the data in Anaplan

  1. Login to Anaplan and find the Import Data Source "SIMPLE_FACT.csv".


What's Next?

> Simple Flat File Transformation

B
Brian is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.