How to run SQL queries on R data
To ensure script compatibility across different programming languages like R, Python, and others, one approach is to use SQL queries for data manipulation.
The discussion found in this RStudio community issue) suggests the use of the sqldf
package. However, there are concerns about its current state of maintenance.
The same discussion also recommends tidyquery
as an alternative. This appears to be a promising solution.
To effectively implement this, we should:
- Conduct tests using tidyquery on various data types present in LinkR, including data read through duckdb, sparklyr, arrow, or vroom
- Verify whether tidyquery can accurately translate complex SQL queries
- Verify interoperability between R and Python using common SQL queries