cube-js/cube · error
CreateExternalTable is not supported
Error message
CreateExternalTable is not supported
What it means
CubeSQL's converter that turns DataFusion LogicalPlans into the EQ graph language explicitly does not support CreateExternalTable and panics when it encounters one. The logical-plan-to-graph translation only covers query plans CubeSQL actually executes.
Source
Thrown at rust/cubesql/cubesql/src/compile/rewrite/converter.rs:811
produce_one_row,
derived_source_table_name,
is_wrappable,
]))
}
LogicalPlan::Limit(limit) => {
let skip = add_data_node!(self, limit.skip, LimitSkip);
let fetch = add_data_node!(self, limit.fetch, LimitFetch);
let input =
self.add_logical_plan_replace_params(limit.input.as_ref(), query_params, ctx)?;
self.graph
.add(LogicalPlanLanguage::Limit([skip, fetch, input]))
}
LogicalPlan::Values(values) => {
let values = add_data_node!(self, values.values, ValuesValues);
self.graph.add(LogicalPlanLanguage::Values([values]))
}
LogicalPlan::CreateExternalTable { .. } => {
panic!("CreateExternalTable is not supported");
}
LogicalPlan::Explain { .. } => {
panic!("Explain is not supported");
}
LogicalPlan::Analyze { .. } => {
panic!("Analyze is not supported");
}
// TODO
LogicalPlan::Extension(ext) => {
panic!("Unsupported extension node: {}", ext.node.schema());
}
LogicalPlan::Distinct(distinct) => {
let input = self.add_logical_plan_replace_params(
distinct.input.as_ref(),
query_params,
ctx,
)?;
self.graph.add(LogicalPlanLanguage::Distinct([input]))View on GitHub (pinned to 7d981676b3)
Solutions
- Do not issue CREATE EXTERNAL TABLE through CubeSQL; create external tables via Cube Store tooling or the appropriate native path instead.
- Guard the SQL layer to intercept and reject/handle external-table DDL before conversion.
- If support is needed, implement the CreateExternalTable arm in the converter upstream.
Example fix
// before
await sqlApi.query('CREATE EXTERNAL TABLE t STORED AS PARQUET LOCATION ...');
// after
// create the external table via Cube Store CLI/API, then query it through CubeSQL Defensive patterns
Strategy: validation
Prevention
- Never send CREATE EXTERNAL TABLE through the CubeSQL interface
- Pre-validate or intercept DDL at the gateway
- Use Cube Store tooling for external table management
When it happens
Trigger: Parsing/planning a SQL statement like CREATE EXTERNAL TABLE ... and converting the resulting LogicalPlan::CreateExternalTable via add_logical_plan_replace_params / plan().
Common situations: Users sending DDL for external tables through the CubeSQL interface (e.g. via the Postgres protocol), scripts migrated from raw DataFusion usage, tooling that generates external-table DDL.
Related errors
- Explain is not supported
- This query doesnt have a plan, because it already has values
- Should be rewritten with UtcTimestamp function
- Analyze is not supported
- Unsupported extension node: {}
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/00fb4f553ccd1ce5.
Report an issue: GitHub.