LakeQL
Introduction
  • Overview
  • Why LakeQL
  • Key Concepts
Getting Started
  • Prerequisites
  • Quickstart
  • Environment
  • First Run
Architecture
  • System Overview
  • Data Flow
  • Request Lifecycle
Configuration
  • Config File
  • Runtime Lifecycle
  • Environment Variables
create-app
  • Usage
  • Template Structure
  • Post-Creation
Guides
  • Custom Resolvers
  • Extending the Schema
  • Mutations
  • Set Up a Trino Mutation
  • Deploying
Endpoints
  • Definition Format
  • Field Types
  • Nested Fields
  • Mutations
  • Glossary
Contributing
  • Local Development
  • Contribution Guide
  • Architecture
GitHub
LakeQL
  1. LakeQL
  2. Guides
  3. Mutations

On this page

  1. Write Strategy Availability
  2. Permissions
  3. Custom Mutation Fields

Mutations

Write data back through LakeQL.

Writes go through a data source's writing. A mutation resolver builds the records to write. It then runs them through the runtime's write strategy for the target source, choosing a load strategy (full_load, full_load_append, or append).

Write Strategy Availability #

A write strategy is only available when the adapter reports the capabilities it needs. For the strategies themselves and how they compare, see write strategies. For how a write combines with existing data, see load strategies.

A data source configured without a writeConfig has no write strategy. In that case, runtime.getWriteStrategy(name) throws WriteStrategyNotConfiguredError.

For the full step-by-step, see Set Up a Trino Mutation. It covers writeConfig, the endpoint definition, generation, and permission.

Permissions #

Writes are authorized by the writePermission scope. It is backed by your permission rules under Mutation. A caller without write access to the target table is denied before the write runs.

Custom Mutation Fields #

Define mutation fields on the shared builder, the same way as custom resolvers. Validate input with a Zod schema and declare the required write scope.

Previous page

Extending the Schema

Next page

Set Up a Trino Mutation