How to create custom data classes

Article:HOWTO83473  |  Created: 2013-01-25  |  Updated: 2013-09-24  |  Article URL http://www.symantec.com/docs/HOWTO83473
Article Type
How To



How to Create a Custom Data Class

Custom data classes can be created by using CMDB Solution. These can be assigned to out of box resources or to custom resources to add new fields for data.

The following instructions describe how to create custom data classes. Other related articles are also referenced, as the user may also need to create custom resources, Data Connector Import Rules and custom reports.
 

  1. In a Symantec Management Platform Console, click on the Settings button > All Settings.
  2. Click to open the folders Service and Asset Management > Resource and Data Class Settings > Data Classes.
  3. On the folder to create a custom data class under, right click and choose New > Editable Data Class.
  4. In data class name field, enter a name for the custom data class. For example, Camera Details.
  5. In the Multi Rows field, click to uncheck this. If this is left checked, the custom data class will have a one-to-many relationship. By unchecking this, the custom data class will have a single field for its single value.
  6. Click on the "Add new attribute" button.
  7. In the Name field, enter the attribute's name. For example, Megapixel Size.
  8. Enter remaining attribute details. For example, Type can be Static List, with items that are 5 MP, 8 MP, 10 MP, 12 MP, None.
  9. Click on the OK button when finished editing the attribute details.
  10. Click on the "Add new attribute" to add any additional ones.
  11. Click on the "Save changes" button. Note: Many items in attributes are no longer able to be edited and changed after the data class is first saved. Ensure that this is set up correctly before doing so, otherwise it becomes difficult later, after data is entered into the custom data class, to change this to attributes that are different. Information on how to do this can be found here:

    How to change custom data class attributes after they have been saved
    http://www.symantec.com/business/support/index?page=content&id=HOWTO82340
     
  12. Add the custom data class to a custom resource or out of box resource.

    a. In a Symantec Management Platform Console, under Resource and Data Class Settings (steps 1 and partially 2), click to open the Resource Types folder.
    b. Find and click on the resource (whether this is out of box or custom) to add the custom data classes to.
    c. Click on the "Add data classes" button.
    d. In the Items Selector window, click to select any custom data classes to add.
    e. Click on the Save Changes button.
     
  13. Click on the resource's "Save changes" button.


How Custom Data Classes Work with Assets and in SQL

Custom data classes will create tables of the same name. These appear as "Inv_<custom data class name). For example, if the name of a custom data class is "Camera Details", this then appears as "Inv_Camera_Details", with underscore characters in-between each word. All attributes (columns) in the data class will appear in the table too.

In the database, this appears as the table Inv_Camera_Details. Its _ResourceGuid column will contain the GUID of the asset record it's related to. The following example SQL script could be used to view an asset and its custom data class:

USE Symantec_CMDB
SELECT *
FROM vCellphone vc
LEFT JOIN Inv_Camera_Details icd
ON icd._ResourceGuid = vc._ResourceGuid

Related Articles

How to create a custom resource
http://www.symantec.com/business/support/index?page=content&id=HOWTO83472

How to create a custom report that uses a custom resource and custom data classes
http://www.symantec.com/business/support/index?page=content&id=HOWTO83493

How to import data into a custom resource or custom data class using a Data Connector Import Rule
http://www.symantec.com/business/support/index?page=content&id=HOWTO83495

Resources are unable to be saved after using SQL to change a custom data class
http://www.symantec.com/business/support/index?page=content&id=TECH198194

Unable to create a custom data class string attribute that is larger than 4000 characters in size
http://www.symantec.com/business/support/index?page=content&id=TECH176533

Related Legacy Article


How to create custom data classes using CMDB Solution 6.5
http://www.symantec.com/business/support/index?page=content&id=HOWTO83499




Article URL http://www.symantec.com/docs/HOWTO83473


Terms of use for this information are found in Legal Notices