Reference: Variables
You can use variables when you create a connection. For some connection destinations and formats, you can use variables for configured fields that can be replaced with new values when the connection run starts.
Connection variables
Use connection variables with supported fields to customize the information that Connect sends to a destination. Enclose a connection variable in curly bracket characters: { and }. For example:
-
{fileextension} is replaced in the output field as
json. -
{computer group} is replaced in the output field as
Example computer group.
45ourc4co38put4rgroup.
|
Variable |
Supported fields |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 The source variable is interpreted as the data source name (for example, Client Status) for most data sources. For saved question and Tanium Data Service (TDS) data sources, the source variable is interpreted as the saved question name. If you configure the Syslog RFC 5424 format, you can select Send Question Source to add 2 The computer group and computergroup variables are available for only the saved question data source. No other data sources offer computer group filtering. 3 The file extension and fileextension variables are available only if you configure a CSV, HTML, or JSON format. |
|
Time stamp variables
Use time stamp variables with the File Name Time Stamp Format, File Name, AWS S3 S3 Bucket Name and Optional Path, and Elasticsearch URL fields to customize the time stamp that Connect appends. Enclose one or more time stamp variables in curly bracket characters: { and }. For example:
-
{%m/%d/%y} is replaced in the output field as
010124. -
{%A-%m/%d/%y-%l:%M:%S %p} is replaced in the output field as
Monday-010124-102030PM.
|
Variable combination1 |
Description |
Example |
|---|---|---|
| %m/%d/%y |
United States2: mm/dd/yy |
01/15/00 |
| %Y-%m-%d |
ISO 86013: yyyy-mm-dd |
2000-01-15 |
| %d-%m-%Y | dd-mm-yyyy |
15-01-2000 |
| %A, %B %e, %Y | DAY, MONTH dd, yyyy |
Saturday, January 15, 2000 |
| %b %e %a | mmm dd Day |
Jan 15 Sat |
| %H:%M | hh:mm |
15:45 |
| %I:%M %p | hh:mm p |
3:45 PM |
|
1Time stamp variable combinations with special characters might not work properly if used for a file name, file path, or URL. Special characters might change how a file is saved, prevent a file from saving properly, create a non-standard URL format, or change how a URL is parsed. 2MM-DD-YYYY is supported as a legacy variable. For the best results, use %m/%d/%y for improved support. 3YYYY-MM-DD is supported as a legacy variable. For the best results, use %Y-%m-%d for improved support. |
||
|
Variable |
Description |
Example |
|---|---|---|
| %v |
VMS: dd-mmm-yyyy |
01-Jan-2025 |
| %C |
Century number as two-digit integer |
20 (20th century) |
| %y |
Year as two-digit integer without century |
25 (the year 2025) |
| %Y |
Year as four-digit integer with century |
2025 |
| %m |
Month from 01 to 12 |
01 (January) |
| %b |
Month abbreviation |
Jan |
| %B |
Month |
January |
| %W |
Week of the current year two-digit number, assuming Monday first |
45 (45th week of the year) |
| %U |
Week of the current year two-digit number, assuming Sunday first |
21 (21st week of the year) |
| %a |
Weekday abbreviation |
Mon |
| %A |
Weekday |
Monday |
| %d |
Day from 01 to 31 |
05 |
| %e |
Day from 1 to 31 |
15 |
| %w |
Day from 0 to 6, with Sunday being 0 |
3 (Wednesday) |
| %j |
Day from 001 to 366 |
045 |
| %u |
Day from 1 to 7, with Monday being 1 |
4 (Wednesday) |
|
Variable |
Description |
Example |
|---|---|---|
| %H |
Hour from 00 to 23 |
01 |
| %I |
Hour from 01 to 12 |
01 |
| %k |
Hour from 0 to 23 |
1 |
| %l |
Hour from 0 to 12 |
1 |
| %M |
Minute |
23 |
| %S |
Second |
45 |
| %s |
Unix timestamp (seconds after January 1, 1970) |
1704999658 |
| %L |
Millisecond from 000 to 999 |
123 |
| %s%L |
Unix timestamp (milliseconds after January 1, 1970) |
1704999658390 |
| %p |
AM/PM |
AM |
| %P |
am/pm |
am |
|
%r %l:%M:%S %p |
12-hour time (seconds)1 |
012345 PM 01:23:45 PM |
|
%R %H:%M |
24-hour time (minutes)1 |
1530 15:30 |
|
%T %H:%M:%S |
24-hour time (seconds)1 |
153045 15:30:45 |
| %z |
Time zone hour offset from Greenwich Mean Time |
+0000 |
| %Z |
Time zone name abbreviation |
GMT |
|
1This variable might not work properly if used for a file name, file path, or URL. Special characters might change how a file is saved, prevent a file from saving properly, create a non-standard URL format, or change how a URL is parsed. |
||