CKafka Connector supports data transformation in multiple ways during data processing as described below:
Data transformation
Enter the raw data. Below is an example.
{
"@timestamp": "2022-02-26T22:25:33.210Z",
"beat": {
"hostname": "test-server",
"ip": "6.6.6.6",
"version": "5.6.9"
},
"input_type": "log",
"message": "{\\"userId\\":888,\\"userName\\":\\"testUser\\"}",
"offset": 3030131
}
CKafka Connector processes the data in the following ways:
Option 1: Quickly define a rule by selecting the corresponding Process Value option.
Option 2: Quickly change the data type of a field by selecting the target data format.
Option 3: Implement the join feature through the JSONPath syntax.
For example, you can use the $.concat($.data.Response.SubnetSet[0].VpcId,"#",$.data.Response.SubnetSet[0].SubnetId,"#",$.data.Response.SubnetSet[0].CidrBlock))
syntax to concatenate the attributes of VPC and subnet and separate them by #
.
Was this page helpful?