Adding type definitions

Use this procedure to manually add type definitions to the mapping.types.default property in the mapper.properties file. See Mapper properties concepts.

Added types definitions through the mapper.properties file are applicable for Mapper as a whole. You can add one or more types definitions using comma as delimiter.

In this example procedure, we will add two type definitions: MECDataTranslator and Object. These data types are necessary for using the MECDataTranslator class in a mapping.

  1. Edit the mapper.properties file.

    You can use an external editor, for example, Notepad.

  2. Edit the mapping.types.default property to add types.

    For new mapper.properties, add this line:

    mapping.types.default=MECDataTranslator,Object

    If this line already exists, add only the type definitions that you need. For multiple type definitions, use comma as delimiter.

    For example:

    
     # ======================================
     # Custom default types
     # ======================================
     mapping.types.default=MECDataTranslator,Object
    
    

    This line automatically adds the MECDataTranslator and Object type definitions for Mapper. The description is "Custom Default Type". You can manually change this description in Window > Preferences > Mapper > Type Definitions.

    Note: To remove a type definition from the mapper.properties file you must edit the file. Then remove the definition from the the type definitions preferences and refresh the Mapper type definition. If the user-defined default type is used in a mapping, the type definition will be automatically (re)created when opening the mapping. For the (re)created type definition, the description is "Please describe me". You can change this description.
  3. Save the edited file.
  4. To add another default data type, for example, Double, append the data type to your existing mapping.types.default property.

    For example: mapping.types.default=MECDataTranslator,Object,Double

    This line automatically adds the Double default data type definition when Mapper is restarted.

  5. Start, restart, or refresh the Mapper for changes to take effect.
  6. Optionally, open the Mapper Type Definition preferences and verify that the added type is now present.

    Click OK to close the Preferences window.

You can use the user-defined default types in a mapping directly after Mapper is (re)started.