datasqrl/sqrl/implement-udf
Claude Code and agent skill by datasqrl/sqrl
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Use when SQRL/SQL alone cannot implement required logic. Use to create custom scalar, aggregate, or table functions in Java.
Install
npx vskill@latest install datasqrl/sqrl/implement-udfSKILL.md
Implement User Defined Function
Implement New UDF
Only implement a UDF if the functionality cannot be implemented with existing Flink SQL or DataSQRL functions. Look up existing functions first.
Follow these steps:
- From the project root directory, initialize function with
/opt/agent/cmd.sh add-func <function-name>to create a scalar UDF. Append--aggregateto create an aggregate function. - New function implementation is added in the
functions/folder with the name<function-name>.java - The generated file declares
//DEPS org.apache.flink:flink-table-common:<version>with the compiler's Flink version. Keep this line: the UDF does not compile without it. - Import into SQRL script with
IMPORT functions.<function-name>orIMPORT functions.*for all functions.functions/sits at the project root, so from a script in a subfolder use the reservedrootprefix —IMPORT root.functions.<function-name>— since SQRL relative dot-paths cannot climb upward. (Inside an included project, keep the import relative so it travels with the copied files.)
Edit UDF
Follow these steps:
- Edit the
.javafile in thefunctions/folder - Try to use standard java libraries
- Use JBANG
//DEPSto include dependencies, next to the generatedflink-table-commonone compile,testandrunbuild the UDFs with JBang. A build failure stops the command with[FATAL] Failed to build JBang UDF(s) [...]followed by the javac output: fix the reported file and line before anything else- Implement tests for the function in the
mainmethod - Execute the
mainmethod after each edit to ensure function compiles and works correctly
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent/skills/implement-udf/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/datasqrl/sqrl/implement-udf)