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-udf

SKILL.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 --aggregate to 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> or IMPORT functions.* for all functions. functions/ sits at the project root, so from a script in a subfolder use the reserved root prefix — 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 .java file in the functions/ folder
  • Try to use standard java libraries
  • Use JBANG //DEPS to include dependencies, next to the generated flink-table-common one
  • compile, test and run build 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 main method
  • Execute the main method 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/datasqrl/sqrl/implement-udf/badge)](https://verified-skill.com/skills/datasqrl/sqrl/implement-udf)

Something wrong with this skill or its page? Tell us.