apache/seatunnel · warning

Received empty or null config from MetadataProvider for…

Error message

Received empty or null config from MetadataProvider for metadata_datasource_id: {}

What it means

MetadataProviderManager.resolveConnectorConfig fetches a datasource's connection config from the configured MetadataProvider and merges it into the connector config. If the provider returns null or an empty map for the given metadata_datasource_id, the merge is skipped with this warning and the original connectorConfig is returned unchanged.

Solutions

  1. Verify metadata_datasource_id in the job config matches an existing datasource in the metadata service.
  2. Check the metadata service UI/API to confirm the datasource exists and has connection settings filled in.
  3. Check permissions/authentication of the metadata service account used by the provider.
  4. If intentional fallback to inline config is desired, ignore the warning; otherwise populate the datasource record.

Example fix

// before (job config)
metadata_datasource_id = "12345" // missing in metadata service
// after
metadata_datasource_id = "1001" // existing datasource id
// or remove the key and supply inline connection config:
url = "jdbc:mysql://localhost:3306/db"
Defensive patterns

Strategy: validation

Validate before calling

// confirm datasource exists before job submit
Map<String,Object> ds = metadataService.getDatasource(datasourceId);
if (ds == null || ds.isEmpty()) throw new IllegalArgumentException("unknown metadata_datasource_id: " + datasourceId);

Type guard

if (datasourceConfig == null || datasourceConfig.isEmpty()) { /* fallback to inline config */ }

Try / catch

// merge is skipped gracefully; validate ids pre-submit instead of catching

Prevention

When it happens

Trigger: Calling resolveConnectorConfig with a connector config containing a metadata_datasource_id that the metadata service has no (or an empty) datasource record for.

Common situations: Typo or stale datasource id in the job config; the datasource was deleted from the metadata service; metadata service permissions hide the datasource; metadata service returns empty on failure instead of erroring.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/metadata/MetadataProviderManager.java:206

            return connectorConfig;
        }

        String datasourceId = datasourceIdOptional.get();
        String connectorIdentifier = getConnectorIdentifier(connectorConfig);

        log.info(
                "Resolving datasource config for connector: {}, metadata_datasource_id: {}, provider: {}",
                connectorIdentifier,
                datasourceId,
                providerKind);

        try {
            // Fetch connection config from metadata service via provider
            Map<String, Object> datasourceConfig =
                    provider.datasourceMap(connectorIdentifier, datasourceId);

            if (datasourceConfig == null || datasourceConfig.isEmpty()) {
                log.warn(
                        "Received empty or null config from MetadataProvider for metadata_datasource_id: {}",
                        datasourceId);
                return connectorConfig;
            }

            // Merge the fetched config into the original config
            return mergeConfig(connectorConfig, datasourceConfig, datasourceId);

        } catch (MetadataProviderException e) {
            throw e;
        } catch (Exception e) {
            throw new MetadataProviderException(
                    String.format(
                            "Failed to resolve datasource config for connector: %s, metadata_datasource_id: %s, provider: %s",
                            connectorIdentifier, datasourceId, providerKind),
                    e);
        }
    }

View on GitHub (pinned to cf67b549a7)