@Override
    public List<LogItem> parse(ClsSinkContext context, ProfileEvent event) {
        String uid = event.getUid();
        ClsIdConfig idConfig = context.getIdConfig(uid);
        if (idConfig == null) {
            LOG.error("There is no cls id config for uid {}, discard it", uid);
            context.addSendResultMetric(event, context.getTaskName(), false, System.currentTimeMillis());
            return null;
        }

        // prepare values
        String stringValues = this.getStringValues(event, idConfig);
        List<String> listValues = null;
        if (idConfig.getDataTypeConfig() == null) {
            char delimiter = idConfig.getSeparator().charAt(0);
            listValues = UnescapeHelper.toFiledList(stringValues, delimiter);
        } else {
            DataTypeConfig dataTypeConfig = idConfig.getDataTypeConfig();
            if (dataTypeConfig instanceof CsvConfig) {
                CsvConfig csvConfig = (CsvConfig) dataTypeConfig;
                String[] csvArray = StringUtils.splitCsv(stringValues, csvConfig.getDelimiter(),
                        csvConfig.getEscapeChar(), null);
                listValues = Arrays.asList(csvArray);
            } else if (dataTypeConfig instanceof KvConfig) {
                KvConfig kvConfig = (KvConfig) dataTypeConfig;
                Map<String, String> kvMap = StringUtils.splitKv(stringValues, kvConfig.getEntrySplitter(),
                        kvConfig.getKvSplitter(), kvConfig.getEscapeChar(), null);
                List<String> listKeys = idConfig.getFieldList();
                final List<String> finalListValues = new ArrayList<>(listKeys.size());
                listKeys.forEach(v -> finalListValues.add(kvMap.get(v)));
                listValues = finalListValues;
            } else {
                char delimiter = idConfig.getSeparator().charAt(0);
                listValues = UnescapeHelper.toFiledList(stringValues, delimiter);
            }
        }
        listValues.forEach(value -> this.truncateSingleValue(value, context.getKeywordMaxLength()));
        // prepare keys
        List<String> listKeys = idConfig.getFieldList();
        // prepare offset
        int fieldOffset = idConfig.getFieldOffset();
        // convert to LogItem format
        LogItem item = this.parseToLogItem(listKeys, listValues, event.getRawLogTime(), fieldOffset);
        // add ftime
        String ftime = dateFormat.format(new Date(event.getRawLogTime()));
        item.PushBack("ftime", ftime);
        // add extinfo
        String extinfo = this.getExtInfo(event);
        item.PushBack("extinfo", extinfo);

        List<LogItem> itemList = new ArrayList<>();
        itemList.add(item);
        return itemList;
    }
Parse event to {@literal List<LogItem>} format.

@param context Context of CLS sink.
@param event Event to be pares to {@literal List<LogItem>}
@return Prepared data structure to send.
inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/sink/cls/DefaultEvent2LogItemHandler.java