Reference: Column customizations

Use column customizations to modify how data from your connection source is sent to the destination. You can do the following:

  • Use a regular expression to replace matching strings in the data

  • Send custom columns

  • Send a subset of the columns

  • Change the column name sent to the destination

  • Update the column value data type

  • Reorder the columns for supported formats (CSV, Delimiter Separated Values, LEEF, or Syslog RFC 5424)

Column customizations require a source and a destination, and apply only to the configured connection. You can modify one or more columns for the connection, and send the remaining data without changes.

Note: Column customizations consume additional resources for each connection run.
Note: For the best results, if you use any sensors with a TDS Registered Sensor label as a column customization, rather than updating an existing connection, create a new connection with these custom columns, then disable and delete your existing connection.

Replace data that matches a regular expression

Before data is sent to a destination, you can search the data for string values that match a regular expression escape statement, and replace matching strings with a data substitution value.

  1. From the Main menu, go to Modules > Connect > Overview, go to the Connections section, and click Create Connection.
  2. From the Create Connection page, in the Configuration section, select a Source and Destination.
  3. Select Configure Output > Format.
  4. Select a Format that is compatible with this source and destination.
  5. In the Value Escape Regex field, enter a regular expression escape statement.
  6. In the Value Escape Replace field, enter a data substitution value. Each string that matches the Value Escape Regex statement is replaced with this Value Escape Replace string.
  7. Click Save.

Regular expression syntax and behavior

The Value Escape Regex and Value Escape Replace fields work together to reformat sensitive or inconsistent data before it reaches the destination.

  • Value Escape Regex uses JavaScript regular expression syntax. Matching is case-sensitive. The statement replaces every match in a value, not just the first match. Connect applies the pattern to each column value individually and does not modify numeric or empty values.
  • Value Escape Replace contains the text that replaces each match. Leave the field empty to delete the matched text. Reference capture groups from the pattern with $1, $2, and so on, or use $& to reference the entire match. To include a literal dollar sign in the replacement text, use $$.
  • If the regular expression is not a valid statement, or if the pattern causes excessive processing such as nested repetition like (a+)+, the connection run fails with an error.
Table 1. Regular expression examples
Goal Value Escape Regex Value Escape Replace Input value Output value
Escape commas before sending CSV data , \, Smith, John Smith\, John
Replace line breaks with a single space \r?\n A space character A multiple line value A single line value
Mask digits in a value [0-9] * Card 4111 Card ****
Redact a Social Security number format \d{3}-\d{2}-\d{4} ***-**-**** 123-45-6789 ***-**-****
Remove double quotes from a value " Leave the field empty "C:\temp" C:\temp
Reorder a date using capture groups (\d{2})/(\d{2})/(\d{4}) $3-$1-$2 01/03/2000 2000-01-03

Send custom columns to the destination

You can send the following custom column values:

  • Connection Variable, which sends the Connection Name, Connection Run ID, or Source Name

  • Timestamp of when the data is sent

  • User Specified Value as a numeric, string, or unmodified value

You can add multiple custom columns for each connection.

  1. From the Main menu, go to Modules > Connect > Overview. Go to the Connections section and click Create Connection.
  2. From the Create Connection page, in the Configuration section, select a Source and Destination.
  3. Select Configure Output > Columns.
  4. Click + Add Column.
  5. Enter a Source Column Name.
  6. Select a Custom Column Type. You have the following options:
    • If you select Connection Variable, select a Value Type and Destination Value.

    • If you select Timestamp, select the Date/Time Value Type and a Date/Time Format:

      Table 2. Example outputs for date/time formats

      Date/Time format

      Output format

      Example

      MM/DD/YYYY MM/DD/YYYY

      01/03/2000 - January 3, 2000

      ISO 8601 with time zone (formerly RFC-3339 Timestamp)

      YYYY-MM-DDThh:mm:ss+hh:mm, with the time zone offset set to either the local time zone, or Coordinated Universal Time (UTC) if the column input or Tanium Server time zone is UTC

      2000-01-03T04:05:06-05:00 - January 3, 2000 at 04:05:06 in Eastern Standard Time (UTC-05:00)

      ISO 8601 UTC (Zulu)

      YYYY-MM-DDThh:mm:ssZ, with the timestamp set to UTC

      2000-01-03T04:05:06Z - January 3, 2000 at 04:05:06 in UTC

    • If you select User Specified Value, select a Value Type and enter a Destination Value.

  7. Click Save.

Customize the source columns sent to the destination

  1. From the Main menu, go to Modules > Connect > Overview, scroll to the Connections section, and click Create Connection.
  2. From the Create Connection page, in the Configuration section, select a Source and Destination.
  3. Select Configure Output > Columns.
  4. Select which source columns to send to the destination. Select a Source checkbox to send the column values, or clear a Source checkbox to not send the column values.
  5. Update a column name. Enter a Destination Label, or select one from the dropdown list if you selected the CEF output format.
  6. Update the data type of a column. Select a Value Type from the dropdown list, or select Unmodified if you do not want to change the data type. Note the following:
    • If you choose Numeric for the value, you can specify a default value that is used if the data cannot be coerced into a numeric value. You can specify any negative or positive number.
    • If you choose Date/Time for the value, specify the format that you want to use for the column.
  7. Reorder how the data values are sent to the destination if you select the CSV, Delimiter Separated Values, LEEF, or Syslog RFC 5424 output format. Click Reorder Columns. Drag the columns into the desired order, then click Confirm.
  8. Click Save.