The Segment Builder service can create segments out of source files in the following formats:
.txt
.csv
.zip
, which contains content in.txt
or.csv
format
Query options
If desired, you can specify the import settings for the queries in the session file. Otherwise, the default settings are applied.
The following is an example query, as it would appear in a text file. In this example below, the search field that is queried is ordernum
for the values A123
, B456
, or C789
.
In the file, each query must be listed on a single, separate line:
#Options
#!MD5=N
#!DATA_COLUMN=0
#!DELIMITER=|
#!ID_PREFIX=NOTHING
#!SEGMENT_NAME=Order Number Search
#!DATE_SPAN=3
#!SEARCH_TERM=ordernum
#!SEGMENT_OWNER=admin
#!ID_PREFIX_USE=N
#!SHARE_SEGMENT=N
A123
B456
C789
Option | Description |
---|---|
MD5 |
If set to Y , an MD5 hash is applied to the query string to normalize it. |
DATA_COLUMN |
The column in the data file that contains the search term values. If each line is a single value, then set this value to 0. |
DELIMITER |
The column delimiter in the query file. The following values are supported:
|
ID_PREFIX |
The integration ID prefix that is used to identify search terms. If no integration ID prefix is used (ID_PREFIX_USE=N ), set this value to NOTHING . |
SEGMENT_NAME |
The name of the segment as it appears in the Portal after a successful import. |
DATE_SPAN |
The number of days preceding the current date that are searched for matching data. |
SEARCH_TERM |
The variable name in the request data for which to search for matching values. |
SEGMENT_OWNER |
After import, this value identifies the owner of the segment among Tealeaf users. |
ID_PREFIX_USE |
Set this value to Y to use an integration ID prefix to mark the beginning of fields in the data.
|
SHARE_SEGMENT |
To share this segment with all Tealeaf users after it is successfully imported, set this value to Y . |
values | You can specify values for which to search the field in SEARCH_TERM as individual lines for each value. |
Query format
Each line in a segment file represents a different query of the Tealeaf database.
The following options and settings dictate format:
Formatting options | Description |
---|---|
MD5=N |
Data in text file for the search query is used. The MD5 hash is not applied before the search begins. |
DATA_COLUMN=0 |
When this value is set to 0 , the resulting file is expected to be a single column of values. |
DATE_SPAN=20 |
The query is created to search the preceding 20 days of data. |
SEARCH_TERM |
This value indicates the request variable field for which to search for values matching the column of data. |
ID_PREFIX=N |
No integration ID prefix is in use. The column of data just contains clear-text values. |
The following options and settings are not relevant to this query:
DELIMITER
ID_PREFIX=NOTHING
After the query has executed and returned some sessions, the following settings are applied to the generated segment:
Option | Description |
---|---|
SEGMENT_NAME |
The user-readable name (Testing only in the above example) appears in the Managing Session Segments page. |
SEGMENT_OWNER |
The Tealeaf user ID of the owner of the generated segment: joeuser . |
SHARE_SEGMENT |
Since this value is set to N , the segment is a private segment visible only to joeuser and Tealeaf administrators. |