pathwaycom/pathway · error · ValueError
SchemaRegistrySettings requires at least one entry in 'urls'
Error message
SchemaRegistrySettings requires at least one entry in 'urls'; got an empty list.
What it means
The Delta table optimizer tracks compaction activity against a specific column (its engine rule), and Delta optimization can only act on partitioned data. Therefore the tracked column must appear in partition_columns, otherwise the optimizer would track nothing useful.
Source
Thrown at python/pathway/internals/_io_helpers.py:280
"""
urls: list[str]
token_authorization: str | None = None
username: str | None = None
password: str | None = None
headers: list[SchemaRegistryHeader] | None = None
proxy: str | None = None
timeout: datetime.timedelta | None = None
def __post_init__(self):
if not isinstance(self.urls, (list, tuple)):
raise TypeError(
f"SchemaRegistrySettings.urls must be a list of strings, "
f"got {type(self.urls).__name__}. Wrap a single URL in a "
f"list: urls=['http://...']."
)
if not self.urls:
raise ValueError(
"SchemaRegistrySettings requires at least one entry in 'urls'; "
"got an empty list."
)
for i, url in enumerate(self.urls):
if not isinstance(url, str) or not url:
raise ValueError(
f"SchemaRegistrySettings.urls[{i}] must be a non-empty "
f"string; got {url!r}."
)
for field_name in ("token_authorization", "username", "password", "proxy"):
value = getattr(self, field_name)
if value is not None and not isinstance(value, str):
raise TypeError(
f"SchemaRegistrySettings.{field_name} must be a str, "
f"got {type(value).__name__}."
)
if self.password is not None and self.username is None:
raise ValueError(View on GitHub (pinned to fa2f74a464)
Solutions
- Add the optimizer's tracked column to partition_columns, e.g. partition_columns=[t.event_time, ...].
- If partitioning by that column is unacceptable (cardinality too high), configure the optimizer to track an existing partition column instead.
- Drop table_optimizer if no partition-based optimization is intended.
Example fix
# before pw.io.deltalake.write(t, uri, partition_columns=[t.tenant], table_optimizer=pw.io.deltalake.DeltalakeCompactionOptimizer(tracked_column=t.event_time)) # after pw.io.deltalake.write(t, uri, partition_columns=[t.tenant, t.event_time], table_optimizer=pw.io.deltalake.DeltalakeCompactionOptimizer(tracked_column=t.event_time))
Defensive patterns
Strategy: validation
Validate before calling
if table_optimizer is not None:
tracked = table_optimizer.tracked_column.name
names = [c._name for c in partition_columns or []]
assert tracked in names, (
f"optimizer tracks '{tracked}' but partition_columns={names}"
)
pw.io.deltalake.write(t, uri, partition_columns=partition_columns,
table_optimizer=table_optimizer) Prevention
- Choose partition_columns and the optimizer's tracked column together, typically the same time column.
- Avoid enabling optimizers on unpartitioned writes; compaction only helps partitioned data.
When it happens
Trigger: Calling pw.io.deltalake.write(table, uri, partition_columns=[t.a], table_optimizer=SomeOptimizer(tracked_column=t.b)) where the optimizer's tracked column is not among partition_columns (or partition_columns is None/empty).
Common situations: User enables an optimizer (e.g. one tracking a timestamp column) but partitions by a different business column, or forgets partitioning entirely while adding the optimizer to speed up reads.
Related errors
- SchemaRegistrySettings.urls must be a list of strings, got {
- Failed to install dependencies
- Column {pseudocolumn} has to contain integers only.
- Column {api.TIME_PSEUDOCOLUMN} cannot contain negative times
- parameters `schema` and `id_from` are mutually exclusive
AI-assisted analysis of pathwaycom/pathway@fa2f74a464 (2026-08-15).
Data as JSON: /api/errors/d14058449325b2f5.
Report an issue: GitHub.