Professional > Data management scripting > Transferring data using a DMS file > Reading data > Reading metadata > Using an .mdd file
 
Using an .mdd file
You specify a Metadata Document (.mdd) file in the connection string in the InputDataSource section as follows:
If you are setting up the connection string using the Data Link Properties dialog box, choose the Connection tab and from the Metadata Type list, select UNICOM Intelligence Metadata Document. Then enter the Metadata Location, either by typing the name and location of the .mdd file into the text box, or by clicking Browse and selecting it in the Open dialog box. Make sure you select Open metadata read/write.
If you are setting up the connection string manually, set the Initial Catalog connection property to the name and location of the .mdd file:
InputDatasource(myInputDataSource, "My input data source")
  ConnectionString = "Provider=mrOleDB.Provider.2; _
    Data Source=<Name of CDSC>; _
    Initial Catalog=<Name and location of .mdd file>; _
    Location=<Name and location of case data>"
End InputDatasource
If the .mdd file has more than one version, the most recent version will be used by default. However, you can select an earlier version by using the MR Init MDM Version connection property. For more information, see Selecting a specific version. You can also select multiple versions to use for the export: see Selecting multiple versions.
The .mdd file itself must be writable. If it is read‑only, an error occurs.
Name and location of case data
When you are using an .mdd file, you do not need to specify the name and location of the case data to be transferred if the following statements are both true:
The .mdd file already contains a DataSource object that is the same type as that specified in the connection string.
That DataSource object refers to the case data that you want to transfer.
In addition, if the Datasource object is the default data source in the .mdd file, you do not need to specify the name of the CDSC in the InputDataSource section.
For example, if you are transferring UNICOM Intelligence Interviewer - Server data using the .mdd file in the FMRoot\Shared folder on the File Management server, you generally do not need to specify the name and location of the case data, or the name of the CDSC, because those details will already be stored in the default DataSource object in the .mdd file.
Be careful when the DataSource object refers to case data that is stored in a file (such as a .sav file), and the path stored in the DataSource object is a relative path. In that situation, the path will be treated as if it relative to the location of the .mdd file. In contrast, in the InputDataSource section, if you specify the name and location of the case data using a relative path, the path will be treated as if it relative to the location of the DMS file being run.
See also
Reading metadata