Search Shortcut cmd + k | ctrl + k

Evaluate Lua scripts within queries

Maintainer(s): isaacbrodsky

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.

Platform 1.4.4 1.4.5 1.5.5 1.5.6 2.0.0
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL lua FROM community;
LOAD lua;

Example

SELECT lua('return "Hello " .. context', 'World');

About lua

Adds support for the Lua embedded scripting language to DuckDB.

Added Functions

function_name function_type description comment examples
lua scalar NULL NULL  
lua_json scalar NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

name description input_type scope aliases typed_value
temp_directory Set the directory to which temporary files are written. VARCHAR GLOBAL [] post.db.tmp