sql-translation

Official

Seamlessly translate R to SQL, automate data ops.

Authortidyverse
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill automates the complex process of converting R functions into their correct SQL equivalents for various database backends. It ensures that data operations are consistent, efficient, and accurate when working with different databases through dbplyr.

Core Features & Use Cases

  • R-to-SQL Mapping: Provides a clear guide for defining how R functions (scalar, aggregate, window) are translated into database-specific SQL expressions.
  • Backend Integration: Directs you on how to add these translations to specific dbplyr backend files (e.g., SQLite, PostgreSQL, MySQL), extending dbplyr's capabilities.
  • Use Case: When a new R function like str_to_upper() needs to work with a PostgreSQL database via dbplyr, this skill guides you through adding the UPPER() SQL translation to the R/backend-postgres.R file, including the necessary research and testing steps.

Quick Start

Implement a new SQL translation for the R function my_custom_sum(x) to SUM(x) for the SQLite backend, ensuring it handles NULLs correctly.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: sql-translation
Download link: https://github.com/tidyverse/dbplyr/archive/main.zip#sql-translation

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository