Skip to main content
First, define a variable in R script file.
Note that the ‘\’ (backslash) symbols are used to escape the single quotes, which are required to be used for characters in SQL queries. Second, load the R script file. Finally, you can use @ to surround a variable name inside the query like below.
Here’s a blog post for more detail.