Preserve non-param template helpers#156
Merged
Merged
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019e2615-5ff8-74a5-a6bc-cd3280ac1e1c Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019e2615-5ff8-74a5-a6bc-cd3280ac1e1c Co-authored-by: Amp <amp@ampcode.com>
juliavallina
approved these changes
May 18, 2026
Amp-Thread-ID: https://ampcode.com/threads/T-019e2615-5ff8-74a5-a6bc-cd3280ac1e1c Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a regression from param metadata generation where non-param template helpers could receive Tinybird parameter metadata.
String(...),DateTime(...),Int32(...), etc.split_to_array(siteIds)unchanged.column(orderBy)behavior while still allowing its supported default positional argument.split_to_array(...)andcolumn(...).Template function coverage
The generator uses an allowlist for metadata injection. Only documented transform type functions receive
default,required, ordescriptionmetadata:Boolean,Date,DateTime,DateTime64Float32,Float64Int8,Int16,Int32,Int64,Int128,Int256UInt8,UInt16,UInt32,UInt64,UInt128,UInt256String,ArrayEverything else from the template-functions reference is preserved as written, including helpers like
split_to_array(...),sql_and(...), and other non-transform helpers.column(...)is handled separately because Tinybird supports its positional default argument, but notrequired=ordescription=keyword args.Problem
This TypeScript:
could be generated as:
{{ split_to_array(siteIds, required=False, description="Comma-separated list of framerSiteId. Only used for test isolation") }}Tinybird rejects that because
split_to_arraydoes not accept those keyword args:How to test