baleia

module
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0

README


Baleia

A self-hosted SQL workspace for your data platform.

Baleia is in beta — expect breaking changes between minor versions; read the upgrade notes before upgrading.

CI Release License

Documentation · Live demo · Quick start · Releases

Baleia gives your team one place to write SQL against Trino and your databases, find and document the data, and share the queries, metrics and models built on it. It runs on your infrastructure, next to the engines you already have.

Baleia is a control plane, not another query engine. It manages connections, catalogs and engines, runs your SQL on those engines and keeps the results. Your BI tools and pipelines keep talking to the engines directly, and joins across sources stay the job of a federated engine such as Trino.

Features

Write and run SQL

  • An editor with tabs, autocomplete from your catalogs' metadata, join suggestions learned from your team's history, a function reference for each engine, formatting and EXPLAIN.
  • Run a statement or a whole script; page through large results or export them as CSV, TSV, JSON Lines or Arrow.
  • See where a run's time went: queue, planning, execution, and on Trino CPU, memory and the query profile.

Find and understand your data

  • Browse every catalog in one tree, and search tables and columns with filters such as tag:pii or certified:yes.
  • Document tables and columns next to the data: descriptions, tags, owners and certification.
  • Follow lineage from a table to the saved queries, metrics and models that use it, and see what your workspace reads most.
  • Open a table in Tableau or Power BI with one click.

Share and reuse

  • Saved queries, metrics and semantic models live in team spaces, each with version history and a trash.
  • Build questions in Explore by picking dimensions and metrics instead of writing SQL.
  • Export a space to a bundle you can keep in Git and import into another instance.
  • Materialize a query into an Iceberg table on a schedule with retrievers.

Keep the engines healthy

  • Workload management queues runs per engine and class, so a heavy report cannot crowd out quick queries. Admin rules decide the class, and Trino's own resource groups can take over the queue.
  • Watch the cluster, running queries and Iceberg table health, and maintain each Iceberg table with its own parameters.
  • Prometheus metrics, alerts with runbooks, OpenTelemetry tracing and an audit trail of every security and data operation.

Control access

  • Workspaces, teams and roles: a catalog granted to a workspace is reachable by its members only, and in each workspace a member is a viewer, an editor or an admin, which decides what they may do in Baleia (ADR 0016). Inside the catalog, the engine and the catalog manager decide what may be read or written: with per-user identity, Polaris, Unity or Lakekeeper authorize each user who signed in through an identity provider with their own token, while local and LDAP users act as the connection's account (ADR 0015).
  • Sign in with OIDC or LDAP and map identity-provider groups to workspace roles. Service accounts give agents and integrations their own identity, with an API key or the provider's client credentials. Personal API keys; credentials encrypted at rest.
  • The bundled Trino requires HTTPS and a password, and only Baleia reaches it.

Bring in AI, if you want

  • An optional assistant that knows your catalogs, and an MCP server so your own agents can query within the limits you set. An agent acts with its owner's role in each workspace: a viewer's agent only reads, an editor's may also write.

The interface is available in English and Brazilian Portuguese.

What it connects to

Federated engine Trino, with catalogs Baleia creates and keeps in sync
Direct engines PostgreSQL, MySQL/MariaDB, SQL Server, Oracle, ClickHouse, Arrow Flight SQL, and SQLite files under BALEIA_SQLITE_ROOT
Lakehouse catalogs Polaris, Nessie, Lakekeeper, Iceberg REST, Unity Catalog, AWS Glue, Hive Metastore
Object storage Any S3-compatible store (AWS S3, RustFS, MinIO, Ceph, GCS, OCI)

Register a lakehouse catalog once and Baleia sets up the matching Trino catalog for you. Connections has the details of each one.

Get started

Try it on your machine

You need Docker with Compose and make. This starts Baleia with Trino, Polaris, Temporal, PostgreSQL and S3-compatible storage:

git clone https://github.com/maltzsama/baleia.git
cd baleia
make up

Open http://localhost:8080. On the first visit, a setup wizard creates your admin account. The quick start walks you through your first query.

Install on Kubernetes

Each release publishes multi-arch container images and a Helm chart:

helm install baleia oci://ghcr.io/maltzsama/charts/baleia --version 0.11.0 # x-release-please-version

Install covers the chart's values, configuration lists every setting, and operations covers upgrades, metrics, alerts and runbooks. Read the upgrade notes there before moving between minor versions.

How it works

flowchart LR
    Browser["Web app"] -->|REST and WebSocket| API
    API -->|starts workflows| Temporal
    Temporal --> Worker
    Worker -->|runs SQL| Engines
    Worker -->|writes Arrow results| Storage[("Object storage")]
    API -->|reads result pages| Storage
    API --- DB[("PostgreSQL")]
    Worker --- DB

A Go API serves the web app (SvelteKit) and the REST API. Temporal workflows run everything long-running on a Go worker: executions, metadata syncs, catalog reconciliation and maintenance. Results are stored as Arrow files in object storage and read back page by page, so a large result never has to fit in the browser. Architecture explains the parts and how a query runs, and the decision records explain why.

Documentation

Everything is at https://baleia.galileostd.io/, built from docs/:

Start Quick start · Install · Concepts
Use Workbench · Data explorer · Explore · Content and retrievers · Monitoring · Workload · Administration
Run Configuration · Operations · Connections · Secrets · Observability · LDAP
AI Assistant · MCP server
Build Architecture · Development · Releasing · Decision records

Status

Baleia is in beta and moving fast: expect changes between minor versions, and read the upgrade notes in operations before upgrading. Bugs and ideas are welcome in issues.

Contributing

Help is welcome, especially on the web app (Svelte 5). Start with development and AGENTS.md, then open an issue or a pull request. Code, comments and docs are written in English.

Credits

The Baleia icon is the "pet" icon by bsd from Flaticon (Tv show icons created by bsd - Flaticon), used under its free license; the bundled fonts are under the SIL Open Font License. See CREDITS.md for the attributions and license summaries.

License

Apache 2.0. See LICENSE.

Directories

Path Synopsis
cmd
api command
backfill-references command
Command backfill-references extracts the tables and equi-joins of finished statements and stores them (B0, #530, #538).
Command backfill-references extracts the tables and equi-joins of finished statements and stores them (B0, #530, #538).
migrate command
worker command
deploy
opa
Package opa holds the Rego package Baleia's data policies run on (ADR 0028), and the digest OPA reports for it.
Package opa holds the Rego package Baleia's data policies run on (ADR 0028), and the digest OPA reports for it.
internal
agentauth
Package agentauth resolves an agent bearer token to its owner and agent (#59).
Package agentauth resolves an agent bearer token to its owner and agent (#59).
agentpolicy
Package agentpolicy is the single enforcement gate for agent tool calls (#60).
Package agentpolicy is the single enforcement gate for agent tool calls (#60).
agents/manage
Package manage stores external agents and their tokens (#59): who sees an agent, creating one bound to workspaces its owner can use, updating, deleting, and issuing and revoking tokens.
Package manage stores external agents and their tokens (#59): who sees an agent, creating one bound to workspaces its owner can use, updating, deleting, and issuing and revoking tokens.
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
app
Package app is the composition root the API and the worker share (#362): it builds the dependency graph both processes need, once, from the configuration.
Package app is the composition root the API and the worker share (#362): it builds the dependency graph both processes need, once, from the configuration.
assistant
Package assistant owns the embedded assistant's settings, its per-user × workspace agent and the persisted conversations (#62).
Package assistant owns the embedded assistant's settings, its per-user × workspace agent and the persisted conversations (#62).
assistant/llm
Package llm is the assistant's provider boundary (#62).
Package llm is the assistant's provider boundary (#62).
audit
Package audit records security- and data-relevant operations in an append-only store (#45).
Package audit records security- and data-relevant operations in an append-only store (#45).
audit/export
Package export ships audit events to an OpenSearch/Elasticsearch-compatible `_bulk` endpoint (#50): at-least-once, ordered and resumable.
Package export ships audit events to an OpenSearch/Elasticsearch-compatible `_bulk` endpoint (#50): at-least-once, ordered and resumable.
audit/offload
Package offload writes a stream's rows to an S3 cold sink as gzip NDJSON, one or more bounded chunks per UTC day with a per-day manifest (ADR 0024, amended by ADR 0026).
Package offload writes a stream's rows to an S3 cold sink as gzip NDJSON, one or more bounded chunks per UTC day with a per-day manifest (ADR 0024, amended by ADR 0026).
audit/retention
Package retention drops the partitions of a stream that are past their hot window, gated on the cold-sink cursor and the per-day manifest (ADR 0024, ADR 0026).
Package retention drops the partitions of a stream that are past their hot window, gated on the cold-sink cursor and the per-day manifest (ADR 0024, ADR 0026).
audit/trail
Package trail reads the audit trail (#43): pages of events with their filters and cursor, the CSV export, and the users and catalogs the resolver names.
Package trail reads the audit trail (#43): pages of events with their filters and cursor, the CSV export, and the users and catalogs the resolver names.
authz
Package authz holds the one rule set that decides who may touch connections and catalogs.
Package authz holds the one rule set that decides who may touch connections and catalogs.
bigateway
Package bigateway serves Trino's HTTP client protocol to external BI tools through Baleia (ADR 0017).
Package bigateway serves Trino's HTTP client protocol to external BI tools through Baleia (ADR 0017).
bindings
Package bindings is the binder contract (#80, docs/adr/0002): a binding makes a source catalog visible inside a federated engine.
Package bindings is the binder contract (#80, docs/adr/0002): a binding makes a source catalog visible inside a federated engine.
bindings/stored
Package stored builds the projection of a stored binding: its catalog's connection, decrypted, through the engine's binder.
Package stored builds the projection of a stored binding: its catalog's connection, decrypted, through the engine's binder.
bindings/trino
Package catalogs implements the projection of catalog domain rows into the flat trino_catalog_registry rows consumed by the baleia-trino-catalog-store Trino plugin, and a byte-for-byte replica of Trino's FileCatalogStore.computeCatalogVersion so that the Baleia backend and the plugin Java side can agree on a stable catalog_version hash.
Package catalogs implements the projection of catalog domain rows into the flat trino_catalog_registry rows consumed by the baleia-trino-catalog-store Trino plugin, and a byte-for-byte replica of Trino's FileCatalogStore.computeCatalogVersion so that the Baleia backend and the plugin Java side can agree on a stable catalog_version hash.
bootstrap
Package bootstrap applies deploy-time state that must not live in a committed migration, such as secrets that come from the environment.
Package bootstrap applies deploy-time state that must not live in a committed migration, such as secrets that come from the environment.
catalogidentity
Package catalogidentity decides which bearer token a query session hands to catalog managers set to per-user identity (#648, docs/adr/0015):
Package catalogidentity decides which bearer token a query session hands to catalog managers set to per-user identity (#648, docs/adr/0015):
catalogs
Package catalogs opens the stored credentials of catalog connections.
Package catalogs opens the stored credentials of catalog connections.
catalogs/admin
Package admin edits and retires catalogs and reports what depends on them (#360): renaming, retiring a managed catalog, its namespace and table counts, and the impact of removing a catalog or a connection.
Package admin edits and retires catalogs and reports what depends on them (#360): renaming, retiring a managed catalog, its namespace and table counts, and the impact of removing a catalog or a connection.
catalogs/conns
Package conns stores catalog connections (#360): it lists the ones a user may see, creates, updates and deletes them.
Package conns stores catalog connections (#360): it lists the ones a user may see, creates, updates and deletes them.
catalogs/topology
Package topology reads and edits how catalogs sit on engines (#38, #364): engines, Trino clusters, bindings and their status, catalogs by connection, grant or name, and a catalog's sync state and stored columns.
Package topology reads and edits how catalogs sit on engines (#38, #364): engines, Trino clusters, bindings and their status, catalogs by connection, grant or name, and a catalog's sync state and stored columns.
command
Package command owns the process lifecycle the API and worker binaries share: configuration, logging, the cgroup heap cap, signal handling and the shared dependency graph.
Package command owns the process lifecycle the API and worker binaries share: configuration, logging, the cgroup heap cap, signal handling and the shared dependency graph.
connections
Package connections is the provider contract for connections: credentials and an endpoint for one external system (docs/adr/0002).
Package connections is the provider contract for connections: credentials and an endpoint for one external system (docs/adr/0002).
connections/clickhouse
Package clickhouse is the ClickHouse provider.
Package clickhouse is the ClickHouse provider.
connections/conntest
Package conntest holds checks shared by the provider integration tests.
Package conntest holds checks shared by the provider integration tests.
connections/flightsql
Package flightsql is the Arrow Flight SQL provider: any server that speaks Flight SQL (Dremio, DuckDB, InfluxDB, Arrow's own servers...).
Package flightsql is the Arrow Flight SQL provider: any server that speaks Flight SQL (Dremio, DuckDB, InfluxDB, Arrow's own servers...).
connections/glue
Package glue is the AWS Glue Data Catalog provider: a metastore that holds table definitions for Iceberg, Hive and Delta Lake tables whose data sits in object storage.
Package glue is the AWS Glue Data Catalog provider: a metastore that holds table definitions for Iceberg, Hive and Delta Lake tables whose data sits in object storage.
connections/hive
Package hive is the Hive Metastore (HMS) provider: a Thrift metastore that holds table definitions for Iceberg, Hive and Delta Lake tables whose data sits in object storage.
Package hive is the Hive Metastore (HMS) provider: a Thrift metastore that holds table definitions for Iceberg, Hive and Delta Lake tables whose data sits in object storage.
connections/iceberg
Package iceberg is the generic Iceberg REST catalog provider.
Package iceberg is the generic Iceberg REST catalog provider.
connections/icebergrest
Package icebergrest is the Iceberg REST catalog client shared by the providers that serve that API (Polaris, Nessie, generic REST).
Package icebergrest is the Iceberg REST catalog client shared by the providers that serve that API (Polaris, Nessie, generic REST).
connections/kafka
Package kafka is the Apache Kafka provider (#1064): a Kafka cluster exposed as a federated, read-only source through Trino's Kafka connector.
Package kafka is the Apache Kafka provider (#1064): a Kafka cluster exposed as a federated, read-only source through Trino's Kafka connector.
connections/lakekeeper
Package lakekeeper is the Lakekeeper Iceberg REST catalog provider: an Apache-licensed, Rust-native implementation of the Iceberg REST spec.
Package lakekeeper is the Lakekeeper Iceberg REST catalog provider: an Apache-licensed, Rust-native implementation of the Iceberg REST spec.
connections/mysql
Package mysql is the MySQL provider.
Package mysql is the MySQL provider.
connections/nessie
Package nessie is the Project Nessie provider.
Package nessie is the Project Nessie provider.
connections/oracle
Package oracle is the Oracle Database provider.
Package oracle is the Oracle Database provider.
connections/planned
Package planned declares connection kinds that are known but not implemented yet, so the API can list them and explain why they cannot be created (ADR 0021 D.9).
Package planned declares connection kinds that are known but not implemented yet, so the API can list them and explain why they cannot be created (ADR 0021 D.9).
connections/polaris
Package polaris is the Apache Polaris provider: an Iceberg REST catalog under <url>/api/catalog with OAuth2 client credentials and a management API that lists catalogs.
Package polaris is the Apache Polaris provider: an Iceberg REST catalog under <url>/api/catalog with OAuth2 client credentials and a management API that lists catalogs.
connections/postgresql
Package postgresql is the PostgreSQL provider.
Package postgresql is the PostgreSQL provider.
connections/providers
Package providers builds the registry of every provider.
Package providers builds the registry of every provider.
connections/sqlite
Package sqlite is the SQLite provider (modernc.org/sqlite, pure Go).
Package sqlite is the SQLite provider (modernc.org/sqlite, pure Go).
connections/sqlserver
Package sqlserver is the SQL Server provider.
Package sqlserver is the SQL Server provider.
connections/synthetic
Package synthetic declares the endpointless Trino catalog types Baleia can register without an external endpoint or credentials (ADR 0021 D.7): memory, Black Hole, Faker, JMX, TPC-H and TPC-DS.
Package synthetic declares the endpointless Trino catalog types Baleia can register without an external endpoint or credentials (ADR 0021 D.7): memory, Black Hole, Faker, JMX, TPC-H and TPC-DS.
connections/trino
Package trino is the Trino provider: a coordinator Baleia federates queries on (engine kind "trino") and whose catalogs it can browse through information_schema.
Package trino is the Trino provider: a coordinator Baleia federates queries on (engine kind "trino") and whose catalogs it can browse through information_schema.
connections/unity
Package unity is the Unity Catalog provider.
Package unity is the Unity Catalog provider.
content
Package content owns the writes to saved content (#34, ADR 0013).
Package content owns the writes to saved content (#34, ADR 0013).
content/history
Package history reads the versions and the trash of saved content (#34): saved queries, semantic metrics and semantic models.
Package history reads the versions and the trash of saved content (#34): saved queries, semantic metrics and semantic models.
content/search
Package search finds a workspace's saved content by name or slug: folders, saved queries, semantic metrics and semantic models, among those the user can see (#131).
Package search finds a workspace's saved content by name or slug: folders, saved queries, semantic metrics and semantic models, among those the user can see (#131).
crypto
Package crypto seals connection credentials for storage.
Package crypto seals connection credentials for storage.
datapolicy
Package datapolicy holds Baleia's row filters and column masks (ADR 0028): the policies an admin authors, the restricted expression language they are written in, and the checks a draft passes before it can be published.
Package datapolicy holds Baleia's row filters and column masks (ADR 0028): the policies an admin authors, the restricted expression language they are written in, and the checks a draft passes before it can be published.
datapolicy/viewsql
Package viewsql resolves what a Trino view reads, for the data policy checks over SECURITY DEFINER views (ADR 0028).
Package viewsql resolves what a Trino view reads, for the data policy checks over SECURITY DEFINER views (ADR 0028).
db
The structs below are the row shapes of Baleia's own tables.
The structs below are the row shapes of Baleia's own tables.
db/assistant
The structs below are the assistant row shapes.
The structs below are the assistant row shapes.
dialect
Package dialect is how Baleia writes SQL for each engine kind: quoting, qualification, literals, statement splitting, previews, metadata queries and the SQL-generation primitives of the semantic layer (#14, #33, #91).
Package dialect is how Baleia writes SQL for each engine kind: quoting, qualification, literals, statement splitting, previews, metadata queries and the SQL-generation primitives of the semantic layer (#14, #33, #91).
engines
Package engines lists Baleia's engine kinds (#364).
Package engines lists Baleia's engine kinds (#364).
engines/manage
Package manage stores direct engines (#364): it lists them, creates one with the native catalogs of its connection, enables or disables it, deletes it when nothing depends on it, and lists its bindings.
Package manage stores direct engines (#364): it lists them, creates one with the native catalogs of its connection, enables or disables it, deletes it when nothing depends on it, and lists its bindings.
execscope
Package execscope computes the workspace catalog scope a user-identity session may reach (ADR 0018 §5).
Package execscope computes the workspace catalog scope a user-identity session may reach (ADR 0018 §5).
identity
Package identity maps directory groups to Baleia roles and teams.
Package identity maps directory groups to Baleia roles and teams.
identity/account
Package account is the signed-in user's own account: reading it, editing the profile and changing the password.
Package account is the signed-in user's own account: reading it, editing the profile and changing the password.
identity/apikeys
Package apikeys manages a user's personal API keys.
Package apikeys manages a user's personal API keys.
identity/bikeys
Package bikeys issues and validates workspace-bound BI keys (ADR 0017).
Package bikeys issues and validates workspace-bound BI keys (ADR 0017).
identity/idptoken
Package idptoken keeps the identity-provider tokens of each user's latest OIDC sign-in (#648).
Package idptoken keeps the identity-provider tokens of each user's latest OIDC sign-in (#648).
identity/ldap
Package ldap authenticates users against an LDAP directory (AD or OpenLDAP).
Package ldap authenticates users against an LDAP directory (AD or OpenLDAP).
identity/login
Package login verifies sign-in credentials: a local password or a directory (LDAP) bind.
Package login verifies sign-in credentials: a local password or a directory (LDAP) bind.
identity/oidclogin
Package oidclogin runs the OIDC authorization-code login (#278): it starts an attempt bound to a state, a PKCE verifier and a nonce, and finishes it by exchanging the code and provisioning the account.
Package oidclogin runs the OIDC authorization-code login (#278): it starts an attempt bound to a state, a PKCE verifier and a nonce, and finishes it by exchanging the code and provisioning the account.
identity/passwordreset
Package passwordreset runs the e-mailed password reset (#51): a single-use link whose token is stored only as a hash, and a confirmation that ends every session of the account.
Package passwordreset runs the e-mailed password reset (#51): a single-use link whose token is stored only as a hash, and a confirmation that ends every session of the account.
identity/providers
Package providers manages the OIDC and LDAP identity providers (#280, #286).
Package providers manages the OIDC and LDAP identity providers (#280, #286).
identity/provision
Package provision applies a mapped directory identity to Baleia accounts: the team memberships an LDAP or OIDC login grants.
Package provision applies a mapped directory identity to Baleia accounts: the team memberships an LDAP or OIDC login grants.
identity/session
Package session issues and rotates sign-in sessions: a short-lived access token and a refresh token whose rotations share a family (#51).
Package session issues and rotates sign-in sessions: a short-lived access token and a refresh token whose rotations share a family (#51).
identity/setup
Package setup creates the first administrator of a fresh installation.
Package setup creates the first administrator of a fresh installation.
identity/users
Package users is the administration of accounts: listing, inviting, changing roles, removing, and suspending or reinstating (#258).
Package users is the administration of accounts: listing, inviting, changing roles, removing, and suspending or reinstating (#258).
mail
Package mail renders and sends the small set of transactional e-mails (#67).
Package mail renders and sends the small set of transactional e-mails (#67).
mcp
Package mcp exposes Baleia's governed metadata and query execution over the Model Context Protocol (#58).
Package mcp exposes Baleia's governed metadata and query execution over the Model Context Protocol (#58).
metadata
Package metadata keeps the physical metadata snapshots (#15): namespaces, tables and columns per logical catalog, read from the catalog's own source (catalog manager, database driver) or, when it has none Baleia can read, introspected through an engine.
Package metadata keeps the physical metadata snapshots (#15): namespaces, tables and columns per logical catalog, read from the catalog's own source (catalog manager, database driver) or, when it has none Baleia can read, introspected through an engine.
metadata/browse
Package browse reads the stored metadata of the catalogs granted to a workspace (#18): catalogs, namespaces, a page of tables, one table with its columns and docs, a search, and a catalog's sync runs.
Package browse reads the stored metadata of the catalogs granted to a workspace (#18): catalogs, namespaces, a page of tables, one table with its columns and docs, a search, and a catalog's sync runs.
metadata/typemap
Package typemap renders a stored column type (native_type, in its source's type system) the way an engine's dialect spells it, for the binding a user browses through (#15, #18).
Package typemap renders a stored column type (native_type, in its source's type system) the way an engine's dialect spells it, for the binding a user browses through (#15, #18).
metrics
Package metrics is Baleia's metrics catalog (#87): one Prometheus registry per process, constructors for the catalog's metrics and the /metrics handler.
Package metrics is Baleia's metrics catalog (#87): one Prometheus registry per process, constructors for the catalog's metrics and the /metrics handler.
monitoring
Package monitoring reads what the engines report and runs Iceberg table maintenance (#117): cluster snapshots, query snapshots, table health, and maintenance runs with their validation and binding choice.
Package monitoring reads what the engines report and runs Iceberg table maintenance (#117): cluster snapshots, query snapshots, table health, and maintenance runs with their validation and binding choice.
monitoring/events
Package events fans monitoring changes out to connected SSE clients (#733).
Package events fans monitoring changes out to connected SSE clients (#733).
monitoring/maintenance
Package maintenance holds the per-table Iceberg maintenance parameters and decides which operation is due on a table (#500).
Package maintenance holds the per-table Iceberg maintenance parameters and decides which operation is due on a table (#500).
monitoring/queryevents
Package queryevents ingests the query events Trino's HTTP event listener posts (#406).
Package queryevents ingests the query events Trino's HTTP event listener posts (#406).
obs
Package obs holds the observability plumbing shared by the API and the worker.
Package obs holds the observability plumbing shared by the API and the worker.
oidctest
Package oidctest provides an in-process fake OIDC provider for tests.
Package oidctest provides an in-process fake OIDC provider for tests.
ops/signals
Package signals reads the operational signals behind the system status page (#291) and the attention list (#261): engines, binding states, metadata freshness, reconcile runs, audit export lag, plugin confirmation, and the rows that need someone's attention.
Package signals reads the operational signals behind the system status page (#291) and the attention list (#261): engines, binding states, metadata freshness, reconcile runs, audit export lag, plugin confirmation, and the rows that need someone's attention.
persistence/partitioning
Package partitioning isolates the physical partitioning of append-only tables behind a seam (ADR 0023, which amends ADR 0020).
Package partitioning isolates the physical partitioning of append-only tables behind a seam (ADR 0023, which amends ADR 0020).
policy
Package policy decides what users may do.
Package policy decides what users may do.
queryengine
Package queryengine is the contract between Baleia and the engines that run SQL (docs/adr/0002, 0006).
Package queryengine is the contract between Baleia and the engines that run SQL (docs/adr/0002, 0006).
queryengine/clickhouse
Package clickhouse is the ClickHouse direct engine (#83): Baleia runs SQL on a ClickHouse server itself, without Trino, over the HTTP interface.
Package clickhouse is the ClickHouse direct engine (#83): Baleia runs SQL on a ClickHouse server itself, without Trino, over the HTTP interface.
queryengine/conformance
Package conformance is the suite every engine adapter must pass unchanged (#20): fake now, Trino and the direct engines as they land.
Package conformance is the suite every engine adapter must pass unchanged (#20): fake now, Trino and the direct engines as they land.
queryengine/fake
Package fake is a scripted engine for tests.
Package fake is a scripted engine for tests.
queryengine/flightsql
Package flightsql is the Arrow Flight SQL direct engine (#83): one adapter reaches any Flight SQL server (Dremio, DuckDB, InfluxDB, Doris/StarRocks, …).
Package flightsql is the Arrow Flight SQL direct engine (#83): one adapter reaches any Flight SQL server (Dremio, DuckDB, InfluxDB, Doris/StarRocks, …).
queryengine/flightsql/testserver
Package testserver is an in-process Arrow Flight SQL server for the flightsql engine tests (#83).
Package testserver is an in-process Arrow Flight SQL server for the flightsql engine tests (#83).
queryengine/mysql
Package mysql is the MySQL/MariaDB direct engine (#82, PR 2): Baleia runs SQL on a MySQL or MariaDB connection itself, without Trino.
Package mysql is the MySQL/MariaDB direct engine (#82, PR 2): Baleia runs SQL on a MySQL or MariaDB connection itself, without Trino.
queryengine/oracle
Package oracle is the Oracle Database direct engine (#81, PR 2): Baleia runs SQL on an Oracle connection itself, without Trino.
Package oracle is the Oracle Database direct engine (#81, PR 2): Baleia runs SQL on an Oracle connection itself, without Trino.
queryengine/postgresql
Package postgresql is the PostgreSQL direct engine (#82): Baleia runs SQL on a PostgreSQL connection itself, without Trino.
Package postgresql is the PostgreSQL direct engine (#82): Baleia runs SQL on a PostgreSQL connection itself, without Trino.
queryengine/sqlite
Package sqlite is the SQLite direct engine (#83): Baleia runs SQL on a SQLite database file itself, without Trino.
Package sqlite is the SQLite direct engine (#83): Baleia runs SQL on a SQLite database file itself, without Trino.
queryengine/sqlserver
Package sqlserver is the SQL Server direct engine (#81, PR 1): Baleia runs SQL on a SQL Server connection itself, without Trino.
Package sqlserver is the SQL Server direct engine (#81, PR 1): Baleia runs SQL on a SQL Server connection itself, without Trino.
queryengine/trino
Package trino is the Trino adapter of the engine contract (#25).
Package trino is the Trino adapter of the engine contract (#25).
queryprofile
Package queryprofile parses the payload Lens stores for a Trino query (#532) into the neutral profile the API renders.
Package queryprofile parses the payload Lens stores for a Trino query (#532) into the neutral profile the API renders.
realtime
Package realtime is Baleia's shared cross-replica backbone (ADR 0022).
Package realtime is Baleia's shared cross-replica backbone (ADR 0022).
results
Package results reads stored Arrow results as JSON rows for agent tools (#58).
Package results reads stored Arrow results as JSON rows for agent tools (#58).
retrievers
Package retrievers materializes a SQL definition into an Iceberg table on a cron schedule (#118).
Package retrievers materializes a SQL definition into an Iceberg table on a cron schedule (#118).
retrievers/schedule
Package schedule parses retriever cron expressions: five standard fields, an optional CRON_TZ=<IANA> prefix, and a minimum interval between runs (#118, #139).
Package schedule parses retriever cron expressions: five standard fields, an optional CRON_TZ=<IANA> prefix, and a minimum interval between runs (#118, #139).
search
Package search is Baleia's portable text matching (#798): folding, tokenizing and scoring a query against stored names, comments and descriptions in Go, so search needs no database extension (ADR 0020).
Package search is Baleia's portable text matching (#798): folding, tokenizing and scoring a query against stored names, comments and descriptions in Go, so search needs no database extension (ADR 0020).
semantic
Package semantic is the v1 semantic layer (#33, D9 / ADR 0012): structured, per-dialect metric definitions rendered through internal/dialect's SQL-generation primitives.
Package semantic is the v1 semantic layer (#33, D9 / ADR 0012): structured, per-dialect metric definitions rendered through internal/dialect's SQL-generation primitives.
semantic/compiler
Package compiler turns an explore query into SQL for one binding's dialect (#91).
Package compiler turns an explore query into SQL for one binding's dialect (#91).
semantic/docs
Package docs documents tables and columns of a workspace's catalogs (#116): a description, tags, an owner and a certification.
Package docs documents tables and columns of a workspace's catalogs (#116): a description, tags, an owner and a certification.
semantic/metrics
Package metrics manages a workspace's semantic metrics (#115): structured definitions on a catalog table, kept in spaces and versioned through content.Service (#34, #40).
Package metrics manages a workspace's semantic metrics (#115): structured definitions on a catalog table, kept in spaces and versioned through content.Service (#34, #40).
semantic/models
Package models manages a workspace's semantic models (#219): a table's dimensions, measures and joins, kept in spaces and versioned through content.Service (#34).
Package models manages a workspace's semantic models (#219): a table's dimensions, measures and joins, kept in spaces and versioned through content.Service (#34).
semanticcatalog
Package semanticcatalog is the contract of the workspace semantic catalog that external catalog connectors read through the BI gateway (ADR 0030): the semantic models and metrics a BI key's owner can see, with their physical source tables named as the key's engine names them.
Package semanticcatalog is the contract of the workspace semantic catalog that external catalog connectors read through the BI gateway (ADR 0030): the semantic models and metrics a BI key's owner can see, with their physical source tables named as the key's engine names them.
slug
Package slug makes the portable slugs that name spaces, folders, saved queries and semantic content (ADR 0013).
Package slug makes the portable slugs that name spaces, folders, saved queries and semantic content (ADR 0013).
sqlref
Package sqlref extracts the tables, columns and equi-joins a statement reads and writes from the sqlglot AST (#538, #625).
Package sqlref extracts the tables, columns and equi-joins a statement reads and writes from the sqlglot AST (#538, #625).
store
Package store opens Baleia's own metadata database through GORM (ADR 0020).
Package store opens Baleia's own metadata database through GORM (ADR 0020).
store/model
Package model is Baleia's store schema: one GORM model per table (ADR 0020).
Package model is Baleia's store schema: one GORM model per table (ADR 0020).
store/repo
Package repo is the GORM-backed persistence for Baleia's store (ADR 0020).
Package repo is the GORM-backed persistence for Baleia's store (ADR 0020).
temporal/dial
Package dial connects to Temporal at boot, retrying for a while instead of failing on the first refused connection (#87): a process that cannot reach Temporal exits with an error log, which a crash loop makes visible.
Package dial connects to Temporal at boot, retrying for a while instead of failing on the first refused connection (#87): a process that cannot reach Temporal exits with an error log, which a crash loop makes visible.
temporal/schedules
Package schedules ensures recurring Temporal workflows run on Schedules — the only recurring-job mechanism in the codebase.
Package schedules ensures recurring Temporal workflows run on Schedules — the only recurring-job mechanism in the codebase.
temporal/schedulespecs
Package schedulespecs is the single list of recurring Temporal Schedules the worker ensures.
Package schedulespecs is the single list of recurring Temporal Schedules the worker ensures.
temporal/workflows
Determinism: workflow code here never calls time.Now(), reads the environment, lets map iteration drive control flow, or starts goroutines.
Determinism: workflow code here never calls time.Now(), reads the environment, lets map iteration drive control flow, or starts goroutines.
testdb
Package testdb gives tests a throwaway database migrated to the latest version, on the server of BALEIA_TEST_DATABASE_URL (a role allowed to CREATE DATABASE).
Package testdb gives tests a throwaway database migrated to the latest version, on the server of BALEIA_TEST_DATABASE_URL (a role allowed to CREATE DATABASE).
trino/monitor
Package monitor is the Trino cluster monitor Lens reads (#20): the query list and cluster stats of a coordinator.
Package monitor is the Trino cluster monitor Lens reads (#20): the query list and cluster stats of a coordinator.
trinoidentity
Package trinoidentity maps a Baleia user to the Trino identity their queries run under.
Package trinoidentity maps a Baleia user to the Trino identity their queries run under.
version
Package version holds the Baleia build version, injected at build time via -ldflags "-X github.com/maltzsama/baleia/internal/version.Version=...".
Package version holds the Baleia build version, injected at build time via -ldflags "-X github.com/maltzsama/baleia/internal/version.Version=...".
webhooks
Package webhooks defines the outbound event envelope and its constructors.
Package webhooks defines the outbound event envelope and its constructors.
workbench/executions
Package executions runs SQL on an engine target through the query execution workflow, and reads, cancels and lists the runs.
Package executions runs SQL on an engine target through the query execution workflow, and reads, cancels and lists the runs.
workbench/folders
Package folders organizes saved queries into folders within a space.
Package folders organizes saved queries into folders within a space.
workbench/savedqueries
Package savedqueries manages the saved queries of a workspace: listing and reading them, and the rules around a write (folder, slug, unique name).
Package savedqueries manages the saved queries of a workspace: listing and reading them, and the rules around a write (folder, slug, unique name).
workerapp
Package workerapp wires the Temporal worker: its activities, workflows, schedules and process listeners.
Package workerapp wires the Temporal worker: its activities, workflows, schedules and process listeners.
workload
Package workload holds the parts of workload management (#399, ADR 0014) that are pure policy: the default capacities and the rule that a missing per-engine row falls back to them.
Package workload holds the parts of workload management (#399, ADR 0014) that are pure policy: the default capacities and the rule that a missing per-engine row falls back to them.
workload/resourcegroups
Package resourcegroups publishes the generated Trino resource-group document (#598) into the tables Trino's database resource group manager reads (#599).
Package resourcegroups publishes the generated Trino resource-group document (#598) into the tables Trino's database resource group manager reads (#599).
workload/resourcegroups/publish
Package publish writes the generated Trino resource-group document through the narrow Writer surface the store implements (ADR 0020).
Package publish writes the generated Trino resource-group document through the narrow Writer surface the store implements (ADR 0020).
workspaces/access
Package access answers what a caller can reach: whether a user, or an agent acting for one, may use a workspace (#59), the workspace itself, its query targets (#16), the principals it can grant to (#113), a user's Trino identity, and the navigation flags and global actions of /auth/me (#104).
Package access answers what a caller can reach: whether a user, or an agent acting for one, may use a workspace (#59), the workspace itself, its query targets (#16), the principals it can grant to (#113), a user's Trino identity, and the navigation flags and global actions of /auth/me (#104).
workspaces/manage
Package manage stores workspaces and their catalog grants (#33, #36): listing a user's workspaces, creating, updating with the default target, deleting with the personal and running-execution rules, granting and revoking catalogs, and the impact of a delete or a revoke.
Package manage stores workspaces and their catalog grants (#33, #36): listing a user's workspaces, creating, updating with the default target, deleting with the personal and running-execution rules, granting and revoking catalogs, and the impact of a delete or a revoke.
workspaces/spaces
Package spaces stores a workspace's spaces and their access lists (#131): listing, creating with the creator as manager, updating, deleting with the default-space and content rules, and setting or removing members.
Package spaces stores a workspace's spaces and their access lists (#131): listing, creating with the creator as manager, updating, deleting with the default-space and content rules, and setting or removing members.
workspaces/teams
Package teams stores teams and their members (#33).
Package teams stores teams and their members (#33).
ws
wsticket
Package wsticket issues short-lived, single-use tickets for WebSocket authentication so the JWT never appears in a URL (#26).
Package wsticket issues short-lived, single-use tickets for WebSocket authentication so the JWT never appears in a URL (#26).
scripts
bi-e2e command
Command tlsproxy terminates TLS for the BI gateway e2e.
Command tlsproxy terminates TLS for the BI gateway e2e.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL