Skip to content

drop_result_table()

relationalai.api
drop_result_table(table_name STRING)

Deletes a leftover export table from the relationalai.results schema. During an export, PyRel stages results in a temporary table in relationalai.results and normally deletes it automatically. Use this procedure to delete a table that was left behind after an interrupted export. Requires the all_schema_ro or rai_user application role.

NameTypeDescription
table_nameSTRINGThe name of the table in the relationalai.results schema. Pass only the table name, without the app, database, or schema name.

To find the name of a leftover table, list the tables in the relationalai.results schema:

SHOW TABLES IN SCHEMA relationalai.results;
  • Table names are random, like export_<uuid>_table, and don’t map to a specific export.
  • A leftover table only appears after an interrupted export, so the most recent one (by created_on) is usually the one to delete. To confirm, inspect its contents with SELECT * FROM relationalai.results.<table_name> LIMIT 10;.

STRING

A message confirming the table was deleted. The call succeeds even if the table does not exist.

Delete the example_export table from the relationalai.results schema:

CALL relationalai.api.drop_result_table('example_export');
/*+--------------------------------------+
| EXAMPLE_EXPORT successfully dropped. |
+--------------------------------------+ */