private void outputMetrics(String tableIdentifier) throws NoSuchFieldException, IllegalAccessException {
        String[] fieldArray = tableIdentifier.split("\\.");
        // throw an exception if the executor is not enhanced
        JdbcExec executor = jdbcExecMap.get(tableIdentifier);
        Field subExecutor;
        if (executor instanceof TableBufferReducedStatementExecutor) {
            subExecutor = TableBufferReducedStatementExecutor.class.getDeclaredField("upsertExecutor");
            subExecutor.setAccessible(true);
            executor = (JdbcExec) subExecutor.get(executor);
        } else if (executor instanceof TableBufferedStatementExecutor) {
            subExecutor = TableBufferedStatementExecutor.class.getDeclaredField("statementExecutor");
            subExecutor.setAccessible(true);
            executor = (JdbcExec) subExecutor.get(executor);
        }
        Field metricField = TableMetricStatementExecutor.class.getDeclaredField("metric");
        long[] metrics = (long[]) metricField.get(executor);
        long cleanCount = metrics[0];
        long cleanSize = metrics[1];
        long dirtyCount = metrics[2];
        long dirtySize = metrics[3];

        if (fieldArray.length == 3) {
            sinkMetricData.outputDirtyMetrics(fieldArray[0], fieldArray[1], fieldArray[2],
                    dirtyCount, dirtySize);
            sinkMetricData.outputMetrics(fieldArray[0], fieldArray[1], fieldArray[2],
                    cleanCount, cleanSize);
        } else if (fieldArray.length == 2) {
            sinkMetricData.outputDirtyMetrics(fieldArray[0], null, fieldArray[1],
                    dirtyCount, dirtySize);
            sinkMetricData.outputMetrics(fieldArray[0], null, fieldArray[1],
                    cleanCount, cleanSize);
        }
        metricField.set(executor, new long[4]);
    }
Output metrics with estimate for pg or other type jdbc connectors.
tableIdentifier maybe: ${dbName}.${tbName} or ${dbName}.${schemaName}.${tbName}
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/internal/JdbcMultiBatchingOutputFormat.java