-
Notifications
You must be signed in to change notification settings - Fork 1
Resolving File Names
NFT will always try to resolve file names, from all
- Configuration files
- Operators
using the following strategy:
- From the current directory, is the file accessible? (e.g.
file://static_mapping.csv
) - If not, is the path an absolute path? Is it accessible? (e.g.
C:\Mappings\this_and_that.csv
) - If it's a relative path, append it to the path of the configuration file and try to access it?
Example: A configuration file for the Salesforce Reader is defined in the following source definition:
<Transformation>
...
<Source config="..\..\config\§env§\sfdc_config.xml">soql://select Id, FirstName, LastName from Contact</Source>
...
</Transformation>
NFT will recognize that it's a relative path, and, assuming the absolute path to the current configuration file is C:\Work\MyProject\entities\Contacts\read_contacts.xml
, NFT will search for the configuration file for Salesforce sfdc_config.xml
in the following location: C:\Work\MyProject\config\§env§\sfdc_config.xml
. Note the use of the parameter §env§
here; this is obviously optional, but having different configuration files for different environments (like Dev
, Test
and Prod
) is good practice.
This is when resolving for existing files; when creating files, e.g. using the FileTextWrite Operator or for the CSV Writer, the following strategy is used:
- If it is an absolute path, use that (e.g.
file://C:\Temp\output.xml
) - Otherwise, append the relative path to the path of the configuration file (e.g.
file://..\output\this_and_that.xml
).