cfxdm - dm:selectcolumns

Include or Exclude columns

dm:selectcolumns: This cfxdm tag allows the user to include or exclude columns using a regular expression format after retrieving the data from an extension's tag.

It is very useful when the user is dealing with many columns from an extension's tag and it simplifies columns select using either include or exclude or both options together

dm:selectcolumns syntax:

  • include (optional): Specify a column or columns in regular expression format to include matched columns.

  • exclude (optional): Specify a column or columns in regular expression format to exclude matched columns.

In the below example, for reference, we are going to use VMware vROps as an extension to query the data and ingest it into dm:selectcolumns to select specific columns using include/exclude or both together.

Enter the below command to select VMware vROps Alerts tag (@vrops:alerts). (In this example, vrops name is used as a label to identify VMware vROps extension and its tags. The label is defined while adding the extension in cfxdx configuration file or through UI)

tag @vrops:alerts

Example 1: Select matched columns using the include option

Get the data from VMware vROps Alerts tag (@vrops:alerts) and select any column that starts with alert and start (below are all available columns from vrops:alerts tab)

  • alertDefinitionId

  • alertDefinitionName

  • alertId

  • alertImpact

  • alertLevel

  • cancelTimeUTC

  • controlState

  • links

  • resourceId

  • startTimeUTC

  • status

  • subType

  • suspendUntilTimeUTC

  • type

  • updateTimeUTC

data --> @dm:selectcolumns include = 'alert.*|start.*' 

Example 2: Select matched columns using the include and exclude option

Get the data from VMware vROps Alerts tag (@vrops:alerts) and select any column that starts with alertDefinitionName or contains Time, but excludes alertImpact and suspendUntilTimeUTC columns using regular expression.

data --> @dm:selectcolumns include = 'alert.*.Name|.*Time.*' & exclude = 'suspend.*|.*Impact'

Last updated