This section describes the procedure of editing an Enrichment stream.
Procedure
- Navigate to Administration > Configuration > Enrichment.
- Select the Enrichment, and click Edit in the action menu.
The Enrichment configuration wizard displays and allows you to edit an Enrichment. You can follow the Enrichment configuration as described in the previous section to edit the Enrichment configuration.
- You can also upload reference data
.csv
file using an external API by executing the following command.sh refdata_upload_api.sh <tcsa_url> <username> <password> <definition_json_file_location> <reference_csv_file_location>The following is the
refdata_upload_api.sh
file content.#!/bin/bash if [[ "$OSTYPE" == "darwin"* ]]; then export SED="sed" else export SED="sed -i" fi export URL=$1 export USERNAME=$2 export PASSWORD=$3 enrichmentDefinationJson=$4 referancefile=$5 export ACCESS_TOKEN=$(curl -k --location --request POST $URL'/auth/realms/NGINX/protocol/openid-connect/token' --header 'Accept: application/json' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=password' --data-urlencode 'client_id=operation-ui' --data-urlencode "username=$USERNAME" --data-urlencode "password=$PASSWORD" | jq -r .access_token) sleep 2 curl -k -s --show-error --stderr -H "Content-Type: multipart/form-data" -H "tenant: Default" -X PUT -F "refDataConfig=@$enrichmentDefinationJson;type=application/json" -F "refDataFile=@$referancefile" $URL/enrichment/v2/reference-data -H "Authorization: Bearer $ACCESS_TOKEN"|jq .The following is the
definition_json_file
file content.{ "enrichmentDefinitionName": "simple", "enrichmentName": "enricher-0", "csvDelimiter": "semicolon" }Note: The reference data file size should not be more than 10 MB.
To add multiple Enrichment Definition, click Add Enrichment Definition Set. The following screenshot is an example of default Enrichment stream for where multiple Enrichment definitions are added.
Note:- The Reference Data File and its details such as Enricher Name, Enrichment Key, and Reference Topic are visible in the Details section of the Enrichment only if you upload the reference data CSV file as mentioned in step 6 of the Add an Enrichment section.
- You can download the Reference Data File by clicking the
.csv
file from the Details section.
- You can also upload reference data