File paths and URIs
Overview
In Data Management version 7 and later, all file paths are Universal Resource Identifiers (URIs). Data Management uses URIs to locate files anywhere they are used, including:
Data files read or written by projects.
Browsing for projects to load or save.
Arguments to the -project parameter in
rpdm_cmd
.
A URI is of the form scheme://host:port/path/path/.../filename
. Data Management uses URIs to represent files in any location.
URI reference | File location |
---|---|
| The file is in the Data Management server's file system on a Windows server, at the location |
| The file is on a Windows UNC path |
| The file is in the Data Management server's file system on a Linux server. |
| The file is stored in an object in the Data Management repository. |
| Used to refer to paths on the client-side file system. This is typically only seen by users when entering client-side file paths as the |
| Used mostly for file input/output tools, the file is at a location relative to the project file's folder. For example, if a project is stored at |
Data Management automatically converts non-URI file paths stored in projects or automations when those projects or automations are loaded. An absolute file path is converted to file:///...
and a relative file path is converted to relative:///...
.
Relative file paths
All of the file-based input and output tools (Flat File, CSV, DBF, DLD, XML) require that you specify the name of the file to be read or written. Generally, you select the browse button and browse the directory hierarchy, and then select the file you want to read or write. When you select input or output files using this method, you implicitly specify an absolute file path. Examples of absolute file paths are:
C:\MyData\Repository\Names.dbf
\\Server\GlobalData\Addresses.csv
Most of the time, absolute file paths are fine. However, there some situations where relative file paths are preferable. In these cases, Data Management interprets file paths relative to the current directory. For example:
You are building a Data Management project designed for command-line execution from a batch file. You want to apply this command-line project to many different data sets. Rather than specifying the file names each time you run the project on a different data set, you can tell Data Management just the name of the file, and have Data Management load that file relative to the directory in which the project executes.
You are building a Data Management project that has some data associated with it, and you would like to move that project and all of its data to a different location without reconfiguring the project. For example, all of Data Management's sample projects fall into this category, because we don't know ahead of time where you will install the program and its examples. In this case, you can tell Data Management just the name of the file, and have Data Management load that file relative to the directory containing the project file.
Path conversion
You can convert all file paths in a project from relative to absolute or vice versa with a single command:
Project>Path Conversion>Relative to Absolute or Absolute to Relative.