Add a new column to asset select query

When you add a new column to the asset select query, it is necessary to do some additional steps in order to have the new column available in the system.

About this task

Once a new column, such as column_foo has been added, you need to augment the data stream action that imports data into the staging table.

Procedure

  1. To open Flow Designer, go to All > Flow Designer.
    A new page opens.
  2. Select Actions.
  3. In the Search field, search for the term Get Nozomi Assets.
  4. Open the action and enter the Script Parser step.

    Figure 1. Script Parser step

    Script Parser step

    This is where the script that parses the response live.
  5. Immediately after outputs.targetObject.custom_fields = tmpArray; around line 180, add this code:
    if (item.column_foo) {
        outputs.targetObject.column_foo = item.column_foo;
    }
    Note:
    Where column_foo is the name of the new column. For each new column you will need to add similar code to that shown above.
  6. To map our new data field into ServiceNow Configuration Management Database (CMDB) tables, open the IntegrationHub ETL.

    Depending on where you want to map the new data, you might need to change existing classes, such as Computer, or add new ones.
  7. For example, to add new data to Computer, in the right of the Computer section, select View Mapping.
    A new page opens.
  8. On the left, available attributes for the selected class show. On the right, all the data fields available for the specific data source show.

    Note:
    Some attributes might be missing. You can select Add attribute to add them.
  9. For more details on IntegrationHub ETL and its possible customizations, see the ServiceNow documentation.