risingwavelabs/risingwave · error
Unsupported to query directly from this {} source, please cr
Error message
Unsupported to query directly from this {} source, please create a table or streaming job from it What it means
`SourceScanInfo::complete` (src/frontend/src/scheduler/plan_fragmenter.rs:475) rejects batch queries that scan a source connector directly. Only sources with partitionable batch split support (e.g. Kafka with offsets, Iceberg/Posix FS files) can be queried in batch mode; other connector kinds must first be materialized into a table or streaming job.
Source
Thrown at src/frontend/src/scheduler/plan_fragmenter.rs:475
Ok(SourceScanInfo::Complete(res))
}
(ConnectorProperties::BatchPosixFs(prop), SourceFetchParameters::Empty) => {
use risingwave_connector::source::SplitEnumerator;
let mut enumerator = BatchPosixFsEnumerator::new(
*prop,
risingwave_connector::source::SourceEnumeratorContext::dummy().into(),
)
.await?;
let splits = enumerator.list_splits().await?;
let res = splits
.into_iter()
.map(SplitImpl::BatchPosixFs)
.collect_vec();
Ok(SourceScanInfo::Complete(res))
}
(connector, _) => Err(SchedulerError::Internal(anyhow!(
"Unsupported to query directly from this {} source, \
please create a table or streaming job from it",
connector.kind()
))),
}
}
}
#[derive(Clone, Debug)]
pub struct TableScanInfo {
/// The name of the table to scan.
name: String,
/// Indicates the table partitions to be read by scan tasks. Unnecessary partitions are already
/// pruned.
///
/// For singleton table, this field is still `Some` and only contains a single partition with
/// full vnode bitmap, since we need to know where to schedule the singleton scan task.View on GitHub (pinned to 6469eb736d)
Solutions
- Create a table or materialized view over the source (`CREATE MATERIALIZED VIEW mv AS SELECT * FROM source;`) and query that.
- Use `CREATE TABLE ... WITH (connector=...)` to ingest into a table, then SELECT from the table.
- If the connector should support batch queries, verify the source kind string is correct (e.g. `kafka`, `iceberg`) or add a split implementation for the kind.
Example fix
// before: SELECT * FROM my_cdc_source; -- fails // after CREATE MATERIALIZED VIEW mv_cdc AS SELECT * FROM my_cdc_source; SELECT * FROM mv_cdc;
Defensive patterns
Strategy: validation
Validate before calling
-- Only query tables/MVs, or sources with batch split support SELECT name, connector FROM rw_catalog.rw_sources WHERE name = 'my_source'; -- if connector is not batch-queryable (e.g. cdc), query a MV over it instead
Try / catch
match scheduler_result {
Err(e) if e.to_string().contains("Unsupported to query directly") => {
eprintln!("Create a materialized view over the source before querying it.");
}
r => r?,
} Prevention
- Materialize sources into tables/MVs before ad-hoc SELECTs.
- Remember only Kafka/Iceberg/FS-style sources support direct batch queries.
- Validate source kind before enabling direct query paths in tools.
When it happens
Trigger: Running `SELECT * FROM <source>` where `<source>` is a connector source whose kind has no batch split implementation (the catch-all `(connector, _)` match arm).
Common situations: Querying directly from CDC or other non-batch-queryable sources created with `CREATE SOURCE`, expecting ad-hoc SELECT to work like it does on tables or MVs.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- ConnectorError
- Should not get split info from unpartitioned source scan inf
- additional column is not supported for connector {}, accepta
- additional column type {} is not supported for connector {},
- unsupported encoding for Upsert
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/d1ae6bfb5434bfd8.
Report an issue: GitHub.