Add a column to a table

As part of creating or modifying a discovery pattern, you can use the Transform table operation to add one or more computed columns to an existing table and place the results in a target table. The target table can be the source table.

Before you begin

Navigate to the relevant pattern step:

  1. On the pattern form, select the relevant identification section for Discovery.

    Alternatively, select the relevant identification or connection section for Service Mapping.

  2. Select the relevant pattern step or click to add a step.

Basic knowledge of programming is desirable.

Role required: pd_admin

Procedure

  1. Select Transform table from the Operation.
  2. Fill in the fields, as appropriate.
    Field Description
    Source table Specify the name of the source table.
    Target table Specify the name of the target table. The target table can be the same as the source table.
  3. Click the plus icon to add each target field and fill in the fields, as appropriate.
    Field Description
    Target Field Name Specify a name for the column. It can be an existing column or a new one.
    Value Specify the operation expression that determines the values added to the column. You can use variables including values from tabular variables as described in Enter values and variables in patterns.
  4. If in Debug mode, test the step by clicking Test and checking that the operation brings the result you expected.

Example

Identity Integration Feature Pack

This operation is used in This item
Hierarchy Applications > Web Servers
CI Type Load Balancer Service [cmdb_ci_lb_service]
Pattern F5 BigIP LTM
Section Identification for all entry point types
Step number and Name 9. Fix ip

For F5 load balancer, you want to translate IP addresses in the default hexadecimal format into decimal format. You use the Javascript that performs this translation in the value field. You add the "clean_ip" column containing IP addresses in decimal format to the existing (source) table.


Example of Transform Table usage

What to do next