File Upload
The File Upload widget enables you to create or append a WhatIf scenario by uploading CSV files into the cube.
Configuring the widget
To turn on the File Upload widget, provide this code in the settings you register:
"accelerator_file-upload.server.whitelist": ["MRA"],
To configure the widget, use the following settings:
"accelerator_file-upload.server.params": {
MRA: {
groupSelectorEnabled: true,
getFilePathsRestEndpoint:
"/services/rest/whatif/fileUpload/retrieveStagedFile",
sendFilePathsRestEndpoint: "/services/rest/whatif/fileUpload/upload/",
successMessage: "What-if successfully triggered",
initialPrompt:
"Please select the topic you wish to contribute to your What-if",
fileSelectorPlaceholder: "Select a File",
uploadNamePlaceholder: "What-if Branch Name",
stagingDirectoryName: "stage",
filePathSpliterator: "\\",
selectableDirectories: true,
},
},
Using the widget
To use File Upload:
-
Add the files you want to upload into the relevant directory in the stage folder. It is located in
mr-application/src/test/resources/data/
. The files you add here are then displayed in the File Upload widget. -
Start by adding the File Upload widget into the view by dragging its icon from the top bar.
- Click the dropdown to select from a list of topics which are configured and have available data. For details on how to configure the topics, see Configuring the widget.
- Next, select a file. Below the topic selector you can expand a directory structure containing the files available for the upload associated with the selected topic.
- Once you’ve selected the required files, enter a name for your branch in the What-if Branch Name field, then click Click to Upload.
note
You can only create or modify a branch if you have the required permissions. By default, only the creator of the branch can modify it.
This creates a branch with the given name or updates the existing branch with data from the uploaded files.
You can check and delete your branch in the WhatIf Manager:
For more information on using the WhatIf Manager, see WhatIf Manager.