24 lines
No EOL
711 B
Text
24 lines
No EOL
711 B
Text
# Example for transforming the output JSON in non-batch mode.
|
|
#
|
|
# Input:
|
|
# impression,flagname=F5,host=1cbbb3796fc2,key=12345,platform=Java,sdkver=4.9.1,value=false count_sum=5i 1653643420000000000
|
|
# expression,flagname=E42,host=klaus,key=67890,platform=Golang,sdkver=1.18.3,value=true count_sum=42i 1653646789000000000
|
|
|
|
json_transformation = '''
|
|
{
|
|
"sdkVersion": tags.sdkver,
|
|
"time": timestamp,
|
|
"platform": platform,
|
|
"key": tags.key,
|
|
"events": [
|
|
{
|
|
"time": timestamp,
|
|
"flag": tags.flagname,
|
|
"experimentVersion": 0,
|
|
"value": tags.value,
|
|
"type": $uppercase(name),
|
|
"count": fields.count_sum
|
|
}
|
|
]
|
|
}
|
|
''' |