apache/seatunnel · warning

All fields in row are null, skipping

Error message

All fields in row are null, skipping

What it means

In DatabendSinkWriter.processTraditionalRow() (traditional/batch insert mode), the writer checks whether every field of the row is null. If so, it logs this warning and returns, skipping the row entirely instead of executing an INSERT of all-NULL values. This is a data-quality guard: Databend tables with NOT NULL constraints would reject such rows anyway.

Solutions

  1. Fix upstream schema mapping so fields are populated correctly
  2. Inspect a sample of the incoming rows (enable debug logging) to find which producer emits all-null rows
  3. Add explicit NOT NULL defaults upstream or filter such rows before the sink
  4. If all-null rows are legitimate, change the check to insert default values instead of skipping

Example fix

// before
if (allFieldsNull) {
    log.warn("All fields in row are null, skipping");
    return;
}
// after
if (allFieldsNull) {
    log.warn("All fields in row are null, skipping. Row type: {}", row.getRowType());
    allNullRowCounter.inc();
    return;
}
Defensive patterns

Strategy: validation

Validate before calling

// validate row content before pipeline reaches traditional sink path
boolean hasData(SeaTunnelRow row) {
    if (row == null || row.getFields() == null) return false;
    for (Object f : row.getFields()) { if (f != null) return true; }
    return false;
}

Type guard

Object firstNonNull(SeaTunnelRow row) {
    for (Object f : row.getFields()) { if (f != null) return f; }
    return null;
}

Try / catch

// not applicable: the writer logs a warning and returns; no exception is thrown

Prevention

When it happens

Trigger: A SeaTunnelRow whose fields array is non-empty but every element is null is processed in traditional (non-CDC) mode.

Common situations: CDC/op field extraction leaving only null values; misaligned schema mapping where all columns map to nonexistent keys; upstream data corruption.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/efb925ab31886a5f. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/sink/DatabendSinkWriter.java:442

            if (preparedStatement == null) {
                throw new DatabendConnectorException(
                        DatabendConnectorErrorCode.SQL_OPERATION_FAILED,
                        "Failed to initialize PreparedStatement.");
            }

            log.info("PreparedStatement initialized successfully");
        }

        boolean allFieldsNull = true;
        for (Object field : row.getFields()) {
            if (field != null) {
                allFieldsNull = false;
                break;
            }
        }

        if (allFieldsNull) {
            log.warn("All fields in row are null, skipping");
            return;
        }

        processRow(row);
    }

    private String mapRowKindToAction(RowKind rowKind) {
        switch (rowKind) {
            case INSERT:
                return "insert";
            case UPDATE_AFTER:
                return "update";
            case DELETE:
                return "delete";
        }
        return "update_before";
    }

View on GitHub (pinned to cf67b549a7)