Help Center/ Log Tank Service/ Best Practices/ Log Jobs (Beta)/ Processing Log Data Using DSL Functions/ Scenario 2: Assigning Values to Empty Log Fields Using the e_set Function
Updated on 2026-05-12 GMT+08:00
Scenario 2: Assigning Values to Empty Log Fields Using the e_set Function
You can use the e_set function to assign values to empty fields in logs.
- Sub-scenario 1: assigning a value to a field when the field does not exist or its current value is empty
e_set("result", "......value......", mode="fill")Example:
- Raw log
{ "name":"" } - Processing rule
e_set("name", "Apache 2.0", mode="fill") - Processing result
{ name:Apache 2.0 }
- Raw log
- Sub-scenario 2: assigning values to multiple fields
e_set("k1", "v1", "k2", "v2")Example:
- Raw log
{"source":"192.168.0.1", "topic":"", "tag":"", "id":7990, "content":"this is a log" } - Processing rule
e_set("topic","app","tag","stu") - Processing result
{topic: app source: 192.168.0.1 tag: stu id: 7990 content: this is a log }
- Raw log
Parent topic: Processing Log Data Using DSL Functions
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot