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.
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.
-
From the Main menu, go to , go to the Connections section, and click Create Connection.
-
From the Create Connection page, in the Configuration section, select a Source and Destination.
-
Select .
-
Select a Format that is compatible with this source and destination.
-
In the Value Escape Regex field, enter a regular expression escape statement.
-
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.
-
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.
|
Goal |
Value Escape Regex |
Value Escape Replace |
Input value |
Output value |
|---|---|---|---|---|
|
Escape commas before sending CSV data |
|
|
|
|
|
Replace line breaks with a single space |
|
A space character |
A multiple line value |
A single line value |
|
Mask digits in a value |
|
|
|
|
|
Redact a Social Security number format |
|
|
|
|
|
Remove double quotes from a value |
|
Leave the field empty |
|
|
|
Reorder a date using capture groups |
|
|
|
|
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.
-
From the Main menu, go to . Go to the Connections section and click Create Connection.
-
From the Create Connection page, in the Configuration section, select a Source and Destination.
-
Select .
-
Click + Add Column.
-
Enter a Source Column Name.
-
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/YYYY01/03/2000- January 3, 2000ISO 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 UTC2000-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 UTC2000-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.
-
-
Click Save.
Customize the source columns sent to the destination
-
From the Main menu, go to , scroll to the Connections section, and click Create Connection.
-
From the Create Connection page, in the Configuration section, select a Source and Destination.
-
Select .
-
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.
-
Update a column name. Enter a Destination Label, or select one from the dropdown list if you selected the CEF output format.
-
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.
-
-
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.
-
Click Save.