Help Desk

Submit a ticket My Tickets
Welcome
Login

Simple Flat File Transformation

This tutorial will showcase some simple transformations that can be performed on any tabular dataset as an inline operation to a OneCloud Chain.

Step 1: Edit Chain and add Transformations

  1. Edit the Chain "Upload Text file to Anaplan".
  2. Double click on the connector between and "Get Data" and "Upload File" and select delete from the popup menu.
  3. Using the BizApp selector on the left, select the following Commands from the Tabular TransformationBizApp:
    • Add row numbers
    • Column Filter
    • Filter Rows

Step 3: Connect Commands

  1. Connect the Commands.
  2. Organize the Chain.

Step 4: Tabular Transformation to Add Row IDs

  1. Select the Command Add Row Numbers.
  2. Set the Input File to the Response from the Get Data output (select from variable list).
  3. Leave Output file blank (only used when the output needs to be written to disk).
  4. Check the option to Preview results.
  5. Leave the default comma delimiter.
  6. Save the Command.

Step 5: Tabular Transformation to strip a column

In this step, we are going to strip the column "PKG_TYPE".

  1. Select the Command Column Filter.
  2. Set the Input File to Add Row Numbers Output* (select from variable list).
  3. Leave Output file blank (only used when the output needs to be written to disk).
  4. Check the option to Preview results.
  5. Leave the default comma delimiter.
  6. Set the Pattern Type to Exact.
  7. Leave Inverse unchecked.
  8. Set the Pattern to "PKG_TYPE".
  9. Save the Command.

Step 6: Tabular Transformation to filter rows

In this step, we are going to filter rows that contain the value "Profit %" or "Margin %".

  1. Select the Command Filter Rows.
  2. Set the Input File to Column Filter output (select from variable list).
  3. Leave Output file blank (only used when the output needs to be written to disk).
  4. Check the option to Preview results.
  5. Leave the default comma delimiter.
  6. Set the Find pattern to remove any record containing "Profit %" or "Margin %" (Hint: copy the string below).
  1. Set Match pattern type to Regular Expression.
  2. Set Search Columns to "2" (this represents the 3rd column, but is zero-based).
  3. Leave the remaining options blank or unchecked.
  4. Save the Command.

Step 7: Change data source for the Anaplan File Upload

  1. Edit the command "Upload File".
  2. Change the name of the command to "Upload Filtered Data".
  3. Change the Source file to Filter Row Output.
  4. Save the Command.

Step 8: Publish and Run the Chain

  1. Publish the Chain by clicking the publish icon in the Chain editor.
    Learn more about publishing a Chain.
  2. Run the Chain by selecting the airplane icon in the lower right corner or navigating to Monitor.

Step 9: View the new data output

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

What's Next?

> Upload Relational Data to Anaplan


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.