How can I use the schema name when I'm renaming a table?

Hello,

I’m trying to rename one of my tables (I’m following ALTER TABLE — CrateDB: Reference), but I’m getting SQLParseException[Target table name must not include a schema] error:

ALTER TABLE log.partitioned_requests RENAME TO log.old_requests ;

Error!

SQLParseException[Target table name must not include a schema]

Error trace
io.crate.exceptions.SQLParseException: Target table name must not include a schema
	at io.crate.exceptions.SQLExceptions.esToCrateException(SQLExceptions.java:139)
	at io.crate.exceptions.SQLExceptions.prepareForClientTransmission(SQLExceptions.java:128)
	at io.crate.rest.action.SqlHttpHandler.sendResponse(SqlHttpHandler.java:162
        ...

How can I perform this operation? I want the new table name to be also in the same schema.

This should work:

ALTER TABLE log.partitioned_requests RENAME TO old_requests ;
2 Likes