apache/seatunnel · warning

The variable placeholder

Error message

The variable placeholder `${table_name}` has been marked as deprecated and will be removed soon, please use `${table}`

What it means

A WARN-level deprecation notice logged by DorisCatalogUtil.getCreateTableStatement when a table template still contains the `${table_name}` placeholder. SeaTunnel replaces it with the table name for backward compatibility, but the placeholder will be removed in a future release. Users must migrate to the `${table}` placeholder defined in SaveModePlaceHolder.

Solutions

  1. Replace `${table_name}` with `${table}` in the template (e.g. in the Doris catalog/table configuration).
  2. Search all config files (`sed -i 's/\${table_name}/\${table}/g'`) before upgrading to a release that removes the compatibility shim.
  3. Re-test table creation after the change to confirm the generated DDL still resolves the table name correctly.

Example fix

// before
template = "CREATE TABLE IF NOT EXISTS ${database}.${table_name} (...)";
// after
template = "CREATE TABLE IF NOT EXISTS ${database}.${table} (...)";
Defensive patterns

Strategy: validation

Validate before calling

if (template.contains("${table_name}")) {
    template = template.replace("${table_name}", "${table}"); // migrate before it breaks
}

Prevention

When it happens

Trigger: Calling getCreateTableStatement (directly or via Doris catalog create-table flows) while the configured create-table template string contains the literal `${table_name}` placeholder.

Common situations: Old Doris sink/catalog configs written before `${table}` was introduced; copy-pasted templates from outdated blog posts or docs; templates stored in config files that survived version upgrades.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/util/DorisCatalogUtil.java:218

                template.replaceAll(
                        SaveModePlaceHolder.ROWTYPE_DUPLICATE_KEY.getReplacePlaceHolder(), dupKey);
        Map<String, CreateTableParser.ColumnInfo> columnInTemplate =
                CreateTableParser.getColumnList(template);
        template = mergeColumnInTemplate(columnInTemplate, tableSchema, template, typeConverter);

        String rowTypeFields =
                tableSchema.getColumns().stream()
                        .filter(column -> !columnInTemplate.containsKey(column.getName()))
                        .map(x -> DorisCatalogUtil.columnToDorisType(x, typeConverter))
                        .collect(Collectors.joining(",\n"));

        if (template.contains(SaveModePlaceHolder.TABLE_NAME.getPlaceHolder())) {
            // TODO: Remove this compatibility config
            template =
                    template.replaceAll(
                            SaveModePlaceHolder.TABLE_NAME.getReplacePlaceHolder(),
                            tablePath.getTableName());
            log.warn(
                    "The variable placeholder `${table_name}` has been marked as deprecated and will be removed soon, please use `${table}`");
        }

        return template.replaceAll(
                        SaveModePlaceHolder.DATABASE.getReplacePlaceHolder(),
                        tablePath.getDatabaseName())
                .replaceAll(
                        SaveModePlaceHolder.TABLE.getReplacePlaceHolder(), tablePath.getTableName())
                .replaceAll(
                        SaveModePlaceHolder.ROWTYPE_FIELDS.getReplacePlaceHolder(), rowTypeFields)
                .replaceAll(
                        SaveModePlaceHolder.COMMENT.getReplacePlaceHolder(),
                        Objects.isNull(catalogTable.getComment())
                                ? ""
                                : catalogTable
                                        .getComment()
                                        .replace("'", "''")
                                        .replace("\\", "\\\\"));

View on GitHub (pinned to cf67b549a7)