local_ydb_apply_schema
Validate or apply YDB table DDL via the official YDB JS SDK. Apply runs only after validation succeeds and confirm=true, supporting PRAGMA plus CREATE, ALTER, and DROP TABLE.
Instructions
Validate or apply YDB table DDL through the official YDB JS SDK. It accepts raw YQL DDL for PRAGMA plus CREATE TABLE, ALTER TABLE, and DROP TABLE; action=apply validates first and executes only with confirm=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Schema operation to run. validate only checks the YQL DDL through the YDB SDK; apply validates first and executes only with confirm=true. | |
| script | Yes | YQL DDL script to validate or apply. Supports PRAGMA plus CREATE TABLE, ALTER TABLE, and DROP TABLE statements. | |
| confirm | No | Must be true to execute action=apply after SDK validation succeeds. Omit or false for validation plus plan-only output. | |
| profile | No | Named profile from local-ydb.config.json. Defaults to config.defaultProfile. | |
| timeoutMs | No | SDK operation timeout in milliseconds. Defaults to 120000. | |
| configPath | No | Absolute path to an explicit local-ydb config file. Missing, unreadable, oversized, or invalid explicit files fail closed instead of using defaults. | |
| databasePath | No | YDB database path for SDK validation/application. Defaults to the configured tenant root; root database paths use the static gRPC port. | |
| maxOutputBytes | No | Maximum UTF-8 bytes returned per validation/execution issue stream. Defaults to 65536. |