Skip to content

fix(notebook): support ${name} template syntax for parameters - #602

Open
fuleinist wants to merge 1 commit into
TabularisDB:mainfrom
fuleinist:fix/notebook-param-syntax
Open

fix(notebook): support ${name} template syntax for parameters#602
fuleinist wants to merge 1 commit into
TabularisDB:mainfrom
fuleinist:fix/notebook-param-syntax

Conversation

@fuleinist

Copy link
Copy Markdown
Contributor

Summary

  • Extend notebook parameter resolution to support ${name} template syntax in addition to existing @name syntax
  • Users can now write queries with either syntax: WHERE id = @user_id or WHERE id = ${user_id}
  • Both syntaxes work together in the same query

Motivation

Users coming from other SQL tools (bash, JavaScript, etc.) expect ${var} syntax to work. Previously only @name was supported, causing confusion and syntax errors.

Changes

  • Updated extractParamReferences to extract both @name and ${name} patterns
  • Updated hasParamReferences to detect both syntaxes
  • Updated resolveParams to replace both patterns with parameter values
  • Added comprehensive tests for template syntax

Test Plan

  • All existing tests pass (25/25)
  • Verify ${name} syntax works in notebook queries
  • Verify mixed @name and ${name} in same query
  • Verify unresolved parameter warnings work for both syntaxes

Closes #550

Notebook parameters now support both @name and ${name} syntax. Previously only @name worked, causing confusion for users coming from tools that use ${var} syntax (like bash, JavaScript templates, etc.).

Closes TabularisDB#550
@kilo-code-bot

kilo-code-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • src/utils/notebookParams.ts
  • tests/utils/notebookParams.test.ts

Reviewed by step-3.7-flash · Input: 69.5K · Output: 15.7K · Cached: 597K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Parameter are not working in notebook

1 participant