All DSP releases prior to DSP 1.4.0 use Gravity, a Kubernetes orchestrator, which has been announced end-of-life. We have replaced Gravity with an alternative component in DSP 1.4.0. Therefore, we will no longer provide support for versions of DSP prior to DSP 1.4.0 after July 1, 2023. We advise all of our customers to upgrade to DSP 1.4.0 before July 1, 2023 in order to continue to receive full product support from Splunk.
This topic describes how to use the function in the .
Use the rename function to rename one or more fields. If you want to rename fields with similar names, you can use a wildcard character.
- Function Input
- This function takes in collections of records with schema R.
- Function Output
- This function outputs the same collection of records but with a different schema S.
The required syntax is in bold.
- <wc-source-field> AS <wc-target-field> ["," <wc-source-field> AS <wc-target-field>]...
- Syntax: <string>
- Description: The name of a field in your data to rename. You can use a wild card character in the field name. Names with anything other than a-z, A-Z, 0-9, or the underscore ( _ ) character must be enclosed in single-quotation marks. This includes the wildcard character ( * ).
- Syntax: AS <string>
- Description: The name you want to use as the replacement name for the field. You can use a wild card character in the field name. Names with anything other than a-z, A-Z, 0-9, or the underscore ( _ ) character must be enclosed in single-quotation marks. This includes the wildcard character ( * ).
When working in the SPL View, you can write the function by providing the arguments in this exact order.
The following example renames the time field to timestamp.
...|rename time AS timestamp |...;
This documentation applies to the following versions of Splunk® Data Stream Processor: 1.1.0, 1.2.0, 1.2.1-patch02, 1.2.1, 1.2.2-patch02, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.4.2