Designing to Use Additional Files
Additional Files are only available during execution on the DataCloud. During the on-premise design phase, use a local repository to store the files required for integration and create a macro containing the path to the local repository.
After you package and deploy your project to the DataCloud, the EXECUTION_PATH_HOME macro in your project accesses files in the Additional Files location for your configuration.
Tip... The EXECUTION_PATH_HOME macro is system-generated and is available without any further action.
Example
In a Script step, you can use the following code to read in a text file from Additional Files. The script determines whether you are executing during design or after deployment to DataCloud by checking for the EXECUTION_PATH_HOME.
If MacroValue("EXECUTION_PATH_HOME") <> "" Then
myFile = FileRead(MacroExpand("$(EXECUTION_PATH_HOME)/lookupFile.txt"))
Else
myFile = FileRead(MacroExpand("$(LOCAL_REPO)/lookupFile.txt"))
End If
You can also use your local repository macro during design and then change the macro to EXECUTION_PATH_HOME before you package and deploy your project.
After you have packaged and deployed your project, add the lookupFile.txt file to the Additional Files for the integration or configuration.
Last modified date: 12/17/2021