strcat function concatenates between 1 and 64 string arguments into a single string. Use this function to combine multiple fields, build composite identifiers, or construct formatted messages from log data.
For users of other query languages
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.Splunk SPL users
Splunk SPL users
In Splunk SPL, you concatenate strings using the
. operator or the concat function. APL’s strcat provides similar functionality.ANSI SQL users
ANSI SQL users
In ANSI SQL, you use
CONCAT to join strings. APL’s strcat provides the same functionality.Usage
Syntax
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| arg1, arg2, …, argN | any | Yes | Between 1 and 64 expressions to concatenate. Non-string values are converted to strings. |
Returns
Returns all arguments concatenated into a single string.Use case examples
- Log analysis
- OpenTelemetry traces
- Security logs
Build composite keys from multiple fields for unique request identification.QueryRun in PlaygroundOutput
This query concatenates HTTP method, status, and country to create composite keys for analyzing request patterns by multiple dimensions.
| request_key | request_count |
|---|---|
| GET-200-United States | 3456 |
| POST-201-United States | 2341 |
| GET-404-Unknown | 1987 |
List of related functions
- strcat_delim: Concatenates strings with a delimiter. Use this when you want consistent separators between all arguments.
- split: Splits strings into arrays. Use this to reverse concatenation operations.
- replace_string: Replaces parts of strings. Use this when you need to modify concatenated strings.
- format_url: Formats URL components. Use this specifically for URL construction rather than general concatenation.