DDL
DDL stands for "Data Definition Language" and relates to creating and modifying catalog objects such as Tables.
CREATE TABLE
An in-memory table can be created with a query or values list.
CREATE [OR REPLACE] TABLE [IF NOT EXISTS] table_name AS [SELECT | VALUES LIST];
CREATE TABLE IF NOT EXISTS valuetable AS VALUES(1,'HELLO'),(12,'DATAFUSION');
CREATE TABLE IF NOT EXISTS valuetable(c1 INT, c2 VARCHAR) AS VALUES(1,'HELLO'),(12,'DATAFUSION');
CREATE TABLE memtable as select * from valuetable;
DROP TABLE
Removes the table from MekaDB's databse.
DROP TABLE [ IF EXISTS ] table_name;
CREATE TABLE users AS VALUES(1,2),(2,3);
DROP TABLE users;
-- or use 'if exists' to silently ignore if the table doesn't exist
DROP TABLE IF EXISTS nonexistent_table;
Index
MekaDB currently supports built in tables. When you insert/modify data, this would typically require some indexing to maintain query performance as data grows. MekaDB tables have builtin indexing. This means that you do not need to add an index. This works regardless of the volume of data.
We have planned support for external tables from systems such as BigQuery, Parquet and others where this may be different.
Large portions of this page is copied from the Apache Datafusion documentation on January 26th 2024 - where there have been customisations to match Hypi's deployment this has been noted. Apache Datafusion and the Apache name are the property of the Apache Foundation and licensed under the Apache V2 license .