apache/seatunnel · error · SalesforceConnectorException

DUPLICATE_OBJECT

DUPLICATE_OBJECT

Error message

Duplicate object in tables_configs: " + tableId

What it means

Thrown by SalesforceSource.buildTableConfigs while expanding tables_configs entries when two entries resolve to the same tableId (SOQL/object identity). The connector refuses to build duplicate source tables.

Source

Thrown at seatunnel-connectors-v2/connector-salesforce/src/main/java/org/apache/seatunnel/connectors/seatunnel/salesforce/source/SalesforceSource.java:79

     * lifetime is scoped to this call (try-with-resources).
     */
    private List<SalesforceTableConfig> buildTableConfigs(
            SalesforceParameters params, ReadonlyConfig config) {
        try (SalesforceClient client = new SalesforceClient(params)) {
            client.authenticate();

            if (config.getOptional(ConnectorCommonOptions.TABLE_CONFIGS).isPresent()) {
                List<Map<String, Object>> tableConfigMaps =
                        config.get(ConnectorCommonOptions.TABLE_CONFIGS);
                List<SalesforceTableConfig> configs = new ArrayList<>();
                for (Map<String, Object> map : tableConfigMaps) {
                    ReadonlyConfig tableConfig = ReadonlyConfig.fromMap(map);
                    SalesforceTableConfig built = buildOneTableConfig(tableConfig, client);
                    String tableId = built.getTableId();
                    boolean duplicate =
                            configs.stream().anyMatch(c -> c.getTableId().equals(tableId));
                    if (duplicate) {
                        throw new SalesforceConnectorException(
                                SalesforceConnectorErrorCode.DUPLICATE_OBJECT,
                                "Duplicate object in tables_configs: " + tableId);
                    }
                    configs.add(built);
                }
                return configs;
            } else {
                String objectName = config.get(SalesforceSourceOptions.OBJECT_NAME);
                String soql = buildSoql(config, objectName);
                CatalogTable table = client.describeObject(PLUGIN_NAME, objectName);
                return Collections.singletonList(
                        new SalesforceTableConfig(soql, objectName, table));
            }
        } catch (SalesforceConnectorException e) {
            throw e;
        } catch (Exception e) {
            throw new SalesforceConnectorException(
                    SalesforceConnectorErrorCode.DESCRIBE_OBJECT_FAILED,

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Review tables_configs and remove or merge entries with duplicate table_path values
  2. Ensure each entry targets a distinct Salesforce object or uses a distinct SOQL when intentionally splitting a load
  3. Regenerate the config from a template check to avoid duplicated blocks

Example fix

// before
tables_configs = [{table_path="default.Account"}, {table_path="default.Account"}]
// after
tables_configs = [{table_path="default.Account"}, {table_path="default.Contact"}]
Defensive patterns

Strategy: validation

Validate before calling

// dedupe check before submitting the job config
Set<String> seen = new HashSet<>();
for (Map<String,Object> t : tablesConfigs) {
    if (!seen.add((String) t.get("table_path"))) {
        throw new IllegalArgumentException("Duplicate table_path: " + t.get("table_path"));
    }
}

Prevention

When it happens

Trigger: Configuring tables_configs with two entries whose table_path (or generated SOQL-derived table id) is identical, or entries that normalize to the same Salesforce object with the same query.

Common situations: Copy-pasting a table entry and forgetting to change the object/SOQL; listing the same object twice with slightly different formatting that normalizes to the same id; template-generated configs duplicating a table.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


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