Skip to main content

Query your data

Preview

This feature is in Public Preview in the following regions: us-east-1, us-west-2, eu-west-1.

Lakebase Autoscaling is the new version of Lakebase with autoscaling compute, scale-to-zero, branching, and instant restore. For feature comparison with Lakebase Provisioned, see choosing between versions.

Learn how to query and work with data in your Lakebase Postgres database. Lakebase provides several methods to access and query your data, each suited for different use cases and workflows.

Query methods

Lakebase provides multiple ways to query your data:

Method

Description

Query from Lakebase SQL Editor

Query directly from the Lakebase App with Postgres-native features like EXPLAIN/ANALYZE and meta-commands (\dt, \d, \l). Best for Postgres-specific queries, data exploration, and exporting results to CSV/JSON/XLSX.

Query from SQL Editor in Lakehouse

Query from the SQL editor (Lakehouse) with two connection options: (1) connect directly to Lakebase compute for read-write access, or (2) register in Unity Catalog for federated queries. Enables visualizations, dashboards, collaboration, and scheduled queries.

Managing data with the Tables editor

Visually manage your data and schemas with an interactive interface. Add, edit, and delete records, manage schemas and tables, and export data in JSON or CSV format.

Lakebase Data API

Access your database using a RESTful API interface. Execute CRUD operations via HTTP requests without needing database clients. Ideal for web applications, microservices, and serverless architectures.

Postgres clients

Connect using Postgres clients like psql, DBeaver, and pgAdmin. Use when you prefer your existing tools and workflows.

Querying data at a point in time

Query your database as it existed at any point in the past by creating branches with historical data. Use for analyzing data changes and recovering specific values from before recent modifications.

note

The Lakebase SQL Editor runs queries directly on your Lakebase database and includes Postgres-native features like EXPLAIN/ANALYZE and meta-commands. The SQL editor (Lakehouse) offers two ways to query: (1) connect directly to Lakebase compute for full read-write access, or (2) register your database in Unity Catalog for read-only access with federated queries. Both methods provide collaboration features, visualizations, and scheduled queries.