SQL Commands

Singdata Lakehouse supports standard ANSI SQL, extended with incremental computation (Dynamic Table), change data capture (Table Stream), vector search, federated queries, and more. This manual covers the complete syntax reference for all SQL statements.

Migrating from another platform? See SQL Syntax Compatibility Reference for compatibility notes with Spark SQL / Databricks.


Query and Data Manipulation

PageDescription
Query SyntaxSELECT, JOIN, GROUP BY, window functions, Time Travel, EXPLAIN
Data Write and ModificationINSERT, UPDATE, DELETE, MERGE INTO, TRUNCATE
Data Import and ExportCOPY INTO for file import, COPY INTO VOLUME for data export

Table and View Objects

PageDescription
TablesFull DDL for regular tables: create, partition, bucket, primary key, ALTER, DROP
ViewsCreate, drop, and inspect views
Materialized ViewsCreate, refresh, alter, and drop materialized views
Dynamic TablesCore incremental computation object: create, refresh configuration, ALTER, refresh history
Table StreamCDC change capture object: create, inspect, drop
External TablesTable definitions for external data sources such as Kafka external tables
IndexesCreate and manage bloom filter indexes, inverted indexes, and vector indexes

Storage, Connections, and Ecosystem

PageDescription
SchemaCreate, alter, switch, and drop schemas
VolumeCreate internal/external volumes, file operations (PUT/GET/LIST/REMOVE)
PipeCreate and manage continuous data ingestion pipelines
ConnectionCreate and manage API, storage, and catalog connection objects
External Catalog & SchemaFederated queries: create and use external catalogs and external schemas
SynonymCreate and manage cross-schema object aliases
Data Sharing (Share)Provider and consumer operations for cross-instance data sharing

Workspace and Access Management

PageDescription
Compute Cluster (VCluster)Create, start/stop, configure, and drop compute clusters
Job ManagementView, describe, and cancel running jobs
User ManagementAdd, modify, and remove workspace users
Roles and PrivilegesCreate roles and grant or revoke privileges
User-Defined FunctionsCreate and manage external functions and SQL functions

Basic Syntax

PageDescription
Basic CommandsObject identifier conventions, comment syntax, session parameters, general DDL patterns

Quick Reference

Object Naming Conventions

Singdata Lakehouse uses a three-part naming scheme: workspace_name.schema_name.object_name. The first part can be omitted when you are in the current workspace; the first two parts can be omitted when you are in the current schema.

General DDL Patterns

Most objects support four operations: CREATE [OR REPLACE] ... [IF NOT EXISTS], DROP ... [IF EXISTS], DESC[RIBE], and SHOW ...S [LIKE 'pattern'].


DocumentDescription
Object ModelConcepts, selection guidance, and how each object type works
INFORMATION_SCHEMAQuery metadata via SQL: table structure, job history, privilege assignments
SQL FunctionsComplete built-in function reference