The following procedure explains how to manually import data stored in an Excel spread sheet into Analytics:
If necessary, you can add fields later in Data Feed or Data Source; calculated fields can be added also in Datamart.
If the Data Feeds are not empty in the beginning and that data is already in your Datamart, you may want to delete it by running the 'truncate' job in the Data Loads tab.
Create a Data Source
The first step is creating a Data Source. The reason is that you have to create a data table with the correct structure to which you will import the data.
- Click the 'Add' icon to create a new Data Source.
- Copy the first 10 rows or so from the Excel file, including the header, into clipboard.
- Go back to your new Data Source and click the 'Add fields from data sample' icon.
- Paste the rows from the clipboard into the text area and click 'Apply'.
- Set each field's Data type if it was not set up correctly from the data sample.
- Mark at least one field as 'Key' in the 'Function' column.
- Define 'Measure' for Money and Number data types.
- When finished, click the 'Validate' icon to see if there are any errors in the setup.
- Click the 'Deploy' icon.
When you deploy a Data Source, a Data Feed and a Data Load are generated automatically.
Upload Data into Data Feed
A Data Feed is created for each deployed Data Source, with an auto-generated name, generic field names (attributeX), and a label, which is the name of the Data Source.
Upload your data into the Data Feed:
- Go to 'Data Manager' > 'Data Feeds'.
- Select the Data Feed generated for your Data Source (it has its name as a label).
Make sure the labels are there and exactly match the one used in the Data Source. - Switch to the Data tab and click 'Data Load Actions' > 'Upload'.
For the file requirements (format, size, delimiters etc.) see Data Feeds. - Browse for your Excel file and click 'OK'.
- Wait for the upload to complete. This might take a while depending on the size of your data.
Flush Data to Data Source
Loading into the source is actually loading into the staging table of that source – new records are not visible in the source until the staging table is flushed.
Flush the data from the Data Feed to the Data Source:
- Once the data is loaded into the Data Feed, go to 'Data Manager' > 'Data Loads'.
- Expand the node containing your Data Source.
- Select the Flush task (the task whose 'Type' has the value 'Flush').
(Optional) Go to the 'Calculation' step and select a logic to manipulate the data.
By clicking the 'Default Formula' button, you will create a new calculation logic containing all fields from the Data Feed as elements. Edit the logic as necessary.- Click the 'Run Now' icon at the top of the right pane.
- Wait for the flush to complete. This might take a while depending on the size of your data.
Create a Datamart
Create and deploy a new Datamart:
- Go to 'Data Manager' > 'Datamarts'.
- Click the 'Add' icon.
- Select the newly created Datamart so that the details are shown in the right pane.
- Set the 'Source' of the Datamart to be your Data Source.
- Select the reporting currencies. All transactions are converted (based on the currency Data Source) to the selected currencies.
For more details on currencies, see /wiki/spaces/KB/pages/22183992. - Pull in all the necessary fields from the Field Picker (drag & drop). All available fields are black. As soon as a key field from another data source is dropped into the Fields section, the related data source becomes available for selection and the fields get black in the Field Picker section.
- If you have Per-Unit fields in the Data Source, make sure you have a Per Unit Basis field function set.
- If you are using Date fields, make sure you have a Pricing Date field function set.
- If you are using Currency fields, make sure you have a Pricing Date field set and the Currency (ccy) data source populated.
- If you are using UoM fields, make sure you have the UoM (uom) data source populated.
- When finished, click the 'Validate' icon to see if there are any errors in the setup.
- Click the 'Deploy' icon.
Load the Data from Data Source to Datamart
If you are not using Date fields, you can omit the next five steps and refresh the Datamart immediately.
If you are using Date fields, do the following:
- Go to 'Data Manager' > 'Data Loads'.
- Expand the Calendar data source.
- Select the Calendar task (the task whose 'Type' has the value 'Calendar').
- Click the 'Run Now' icon at the top of the right pane.
- Wait for the Calendar task to finish. This will populate the Calendar data source with Year, Quarter, Month and Week data.
Now you can refresh the Datamart:
- Go to 'Data Manager' > 'Data Loads'.
- Expand the node containing your Datamart.
- (Optional) Add a Calculation task and select a calculation logic to manipulate the loaded data.
- Create a new Data Load by clicking the 'Add' icon and give it the same name as the target Datamart and set the type to 'Calculation'.
- Go to the 'Target' step and select the target Datamart from the drop-down list. You can filter the target's rows so that the logic is only run on certain rows.
- In the 'Source' step, you can filter the source's rows so that the logic is only run on certain rows.
- Go to the 'Calculation' step and select your logic from the drop-down list.
- To test the logic, select a Datamart row in the 'Target' tab and click 'Test Logic'. You will see the results in the 'Formula Outputs' and 'Row Result' columns. You can click the Save icon to store your filter on the Datamart and your logic.
- Select the Refresh task (the task whose 'Type' has the value 'Refresh').
- Click 'Run Now' icon at the top of the right pane.
- Wait for the Refresh task to finish. This might take a while depending on the size of your data and complexity of the setup.