private void handleMultipleDirtyData(Object dirtyData, DirtyType dirtyType, Exception e)
            throws JsonProcessingException {
        Map<String, String> rawData;
        if (dirtyData instanceof Map) {
            rawData = (Map) dirtyData;
        } else {
            rawData = OBJECT_MAPPER.readValue(OBJECT_MAPPER.writeValueAsString(dirtyData), Map.class);
        }
        String label = rawData.remove(DIRTY_LABEL);
        String logTag = rawData.remove(DIRTY_LOG_TAG);
        String identifier = rawData.remove(DIRTY_IDENTIFIER);
        String database = rawData.remove(DATABASE);
        String table = rawData.remove(TABLE);
        String content = OBJECT_MAPPER.writeValueAsString(rawData);

        if (dirtySinkHelper.getDirtyOptions().ignoreDirty()) {
            dirtySinkHelper.invoke(OBJECT_MAPPER.readTree(content), dirtyType, label, logTag, identifier, e);
        }

        try {
            metricData.outputDirtyMetricsWithEstimate(database, table, 1,
                    CalculateObjectSizeUtils.getDataSize(content));
        } catch (Exception ex) {
            metricData.invokeDirtyWithEstimate(dirtyData);
        }
    }
A builder used to set parameters to the output format's configuration in a fluent way.

@return builder
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/doris/src/main/java/org/apache/inlong/sort/doris/table/DorisDynamicSchemaOutputFormat.java