Type mapping allows an existing column in the catalog table with a basic type to be mapped (cast) to a higher-level type. Let us consider a catalog table with a float type column named 'confidence' that stores the prediction confidence produced by an inference model. This column can be mapped to a new column of a higher-level type provided by Vision Copilot named 'AKD_ConfidenceScore'. The higher-level type enables a few additional capabilities, as follows:
- The query results are validated to fall within the range 0 to 1. 
- The type can be used to define higher-level types, such as 'boundingbox2dpred', which represent a prediction from an object detection model consisting of a bounding box, a prediction class, and a prediction confidence. 
Refer to the Create View page to initiate the view creation wizard.
In the Create View wizard, a type mapping is available as the second step.
In case you have mapped the column with the type of columns while importing the respective tables, the mapping will be displayed here by default, as in the sample image below:

You can also add a new type mapping as follows.
Add type mapping
.png)
- In the Create View wizard, click the Add Type Mapping button at the top right. 
- Select the Type to map from the drop-down list, as shown below.  
- In the Column Name drop-down list, select the column name that must be mapped to the target type. 
 Only the columns with an eligible type for the chosen target type are presented in the drop-down list. 
- Edit the Mapped Column Name, if needed. 
 This field is auto-filled with a unique name.
- Click the + (plus) button to add more type-mapped columns. 
- Click Next to go to the next step in the wizard on Virtual Columns. 
- Click Preview to preview a few entries from the view whose creation is in progress. 
 This screen displays an additional column with the 'Mapped Column Name' appended, as shown below. 
Available type mappings
| Type Mapping | Description | Usage | 
|---|---|---|
| Confidence Score | Maps a floating-point number column to a prediction confidence score type. Runs a validation of values to be between 0 and 1 when returning query results. | Used to construct composite types representing a prediction for classification, object detection, and segmentation types of tasks. | 
| Ground Truth Class | Maps a VARCHAR(string) column to a ground truth class label. | Used to construct composite types representing a ground truth for classification, object detection, and segmentation types of tasks. | 
| Prediction Class | Maps a VARCHAR(string) column to a prediction class label. | Used to construct composite types representing a prediction for classification, object detection, and segmentation types of tasks. | 
| File Path | Maps a VARCHAR(string) column type to a type that allows Vision Copilot to infer that the string is a path to an image file name. | Full file path | 
| File Name | Maps a VARCHAR(string) column type to a file name in a URL. | File name relative to the container base URL. | 
| Frame in File | Maps a number to identify the position of the frame in a video file. | Frame number in a file (relevant for video files). | 
| Image Height | Maps a number representing the height of the image. | Image/Video frame height in pixels. | 
| Image Width | Maps a number representing the width of the image. | Image/Video frame width in pixels. | 
| File Path Suffix | Maps a VARCHAR(string) column type to identify the file path in a URL based on the matching suffix. | A suffix in a full file path used to define a column matching the trailing parts of the full file path. |