This article has expired. Please visit the OneCloud Knowledge Base for the latest documentation.
In addition to tabular flat files, it is also common to load data to Anaplan from relational databases. This tutorial will demonstrate how to create a Chain to query a live sample relational database via a SQL query and load the data to Anaplan as an Import Data Source.
- From OneCloud Home select the DEV environment.
- Add a new Chain and name it "Upload SQL Query to Anaplan".
- Save the Chain.
- Depending on the connection created in the previous tutorial, use the BizApp selector on the left to select either the Microsoft SQL Server or Oracle RDBMS | ADW BizApp and then select Execute Query.
(Hint: use the Find tool to search for the BizApp and then search for "Execute Query".)
- Add the Command Execute Query 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 and depending on the relational connection created, add one of the following SQL statements:
Use the copy command for the following syntax and only select one query depending on your selected relational connection.
select * from SAMPLE_DB.SIMPLE_FACT where ROWNUM <= 10
select top 10 * from SAMPLE_DB.dbo.SIMPLE_FACT
- Select Preview Results.
- Save the Command.
- Add a second command to the Chain.
- Select the Anaplan Upload Command.
(Hint: use the Find tool to search for "Anaplan" and then search for "Upload File".)
- Connect the "Execute Query" Command to the "Upload File".
- Edit the Command "Upload File".
- Name the Command "Upload to Anaplan"
- Set the Workspace parameter to the variable "anaplan-workspace". (select from variable list)
- Set the Model parameter to the variable "anaplan-model". (select from variable list)
- Set the Server file parameter to "Sample SQL Query".
- Set the Source file parameter to the Response from the "Execute Query" Command "Result Set (CSV)". (select from variable list)
- Set the Header records to "1".
- Save the Command.
Before the Chain can be run, it needs to be published. Publishing is an import feature in OneCloud that enables Chains to be edited and only when they are ready are they actually published to run the commands.
- Publish the chain and then click Execute to run the Chain.
Learn more about publishing a Chain.
- View the interactive outputs.
- Login to Anaplan and find the Import Data Source "Sample SQL Query".
Updated 9 months ago
|Upload Relational Data to Anaplan|