sql-translation
Guide for adding SQL function translations to dbplyr backends. Use when implementing new database-specific R-to-SQL translations for functions like string manipulation, date/time, aggregates, or window functions.
Security Assessment
About sql-translation
The sql-translation skill is designed to guide users in adding SQL function translations to dbplyr backends. This skill is especially useful for implementing database-specific R-to-SQL translations, such as those required for functions related to string manipulation, date/time handling, aggregates, or window functions. By providing a systematic approach to implementing these translations, this skill helps users effectively bridge the gap between R code and the SQL syntax of various databases.
FAQ
How do I implement a new SQL translation for a backend?
To implement a new translation, follow the workflow outlined in the skill. Start by researching the SQL syntax for the desired function using the sql-research skill, then identify the appropriate backend file, add the translation to the sql_translation() method, and finally test the translation interactively.
Are there any specific database backends supported by this skill?
Yes, this skill supports various database backends including SQLite, PostgreSQL, MySQL, and MS SQL Server. Each backend has a corresponding R file where translations are added.
What happens if a function is not supported by the database?
If a function is not supported by a specific database, you can mark it as not supported using the sql_not_supported() helper function, which ensures the translation system handles it appropriately.
Install sql-translation
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
tidyverse/dbplyr