private void handleDirtyData(Object dirtyData, DirtyType dirtyType, Exception e) {
        errorNum.incrementAndGet();

        if (multipleSink) {
            if (dirtyType == DirtyType.DESERIALIZE_ERROR) {
                LOG.error("database and table can't be identified, will use default ${database}${table}");
            } else {
                try {
                    handleMultipleDirtyData(dirtyData, dirtyType, e);
                } catch (Exception ex) {
                    throw new RuntimeException(ex);
                }
                return;
            }
        }

        DirtyOptions dirtyOptions = dirtySinkHelper.getDirtyOptions();
        if (dirtyOptions.ignoreDirty()) {
            dirtySinkHelper.invoke(dirtyData, dirtyType, dirtyOptions.getLabels(), dirtyOptions.getLogTag(),
                    dirtyOptions.getIdentifier(), e);
        }

        metricData.invokeDirty(1, dirtyData.toString().getBytes(StandardCharsets.UTF_8).length);
    }
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