apache/beam · error · Exception
test_name not provided in config.
Error message
test_name not provided in config.
What it means
LoadTestPerfAnalysis.fetch_metric_data queries BigQuery for historical load-test metrics and needs a test_name config field formatted as 'test_name,pipeline_name'. If TestConfigContainer.test_name is empty/None, it raises Exception because the query cannot be built.
Solutions
- Add test_name to the test config in the format 'test_name,pipeline_name' (e.g. 'beam_WordCount_IT,PythonWordCount')
- Verify the config file/bean used by the analyzer actually loads the field before invoking the analysis
- Check for typos between the config schema key and what TestConfigContainer expects
Example fix
// before (config) metrics_dataset: beam_sample_data // test_name missing // after (config) test_name: load_test_beam_WordCount_IT,PythonWordCount metrics_dataset: beam_sample_data
Defensive patterns
Strategy: validation
Validate before calling
if not getattr(test_config, 'test_name', None):
raise ValueError('test_config.test_name must be set as "test_name,pipeline_name" before analysis')
if ',' not in test_config.test_name:
raise ValueError('test_name must contain test_name,pipeline_name separated by a comma') Try / catch
try:
metric_data = analyzer.fetch_metric_data(test_config=config)
except Exception as e:
if 'test_name not provided in config' in str(e):
logging.error('Add test_name ("name,pipeline") to the test config and rerun.')
else:
raise Prevention
- Validate the full test config (test_name, project, dataset, table) before starting the analysis
- Keep test_name in the canonical 'test,pipeline' comma format
- Add a config schema check at pipeline submission time
When it happens
Trigger: Running the analyzer (load_test_perf_analysis.py) with a test config that omits test_name, or provides it without the required 'test_name,pipeline_name' comma format, so the truthiness check `if test_config.test_name` fails.
Common situations: Missing or empty test_name in the metrics config passed to the change-point analysis step; YAML/JSON config where the field was renamed or left blank; running analysis outside the automated load-test pipeline where config is normally populated.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Bigquery dependencies are not installed.
- buffer_sec must be >= 0, got
- poll_interval_sec must be >= 15, got
- write_config must be provided with 'table' specified
- A BigQuery table or a query must be specified
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/0738c8322369732d.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/testing/analyzers/load_test_perf_analysis.py:43
try:
from google.cloud import bigquery
except ImportError:
bigquery = None # type: ignore
class LoadTestMetricsFetcher(perf_analysis_utils.MetricsFetcher):
"""
Metrics fetcher used to get metric data from a BigQuery table. The metrics
are fetched and returned as a dataclass containing lists of timestamps and
metric_values.
"""
def fetch_metric_data(
self, *, test_config: TestConfigContainer) -> MetricContainer:
if test_config.test_name:
test_name, pipeline_name = test_config.test_name.split(',')
else:
raise Exception("test_name not provided in config.")
query = f"""
SELECT timestamp, metric.value
FROM {test_config.project}.{test_config.metrics_dataset}.{test_config.metrics_table}
CROSS JOIN UNNEST(metrics) AS metric
WHERE test_name = "{test_name}" AND pipeline_name = "{pipeline_name}" AND metric.name = "{test_config.metric_name}"
ORDER BY timestamp DESC
LIMIT {constants._NUM_DATA_POINTS_TO_RUN_CHANGE_POINT_ANALYSIS}
"""
logging.debug("Running query: %s" % query)
if bigquery is None:
raise ImportError('Bigquery dependencies are not installed.')
client = bigquery.Client()
query_job = client.query(query=query)
metric_data = query_job.result().to_dataframe()
if metric_data.empty:
logging.error(
"No results returned from BigQuery. Please check the query.")View on GitHub (pinned to 12126d8942)