is there any way to call an R dataframe in SQL? For example, I would like to run something like:
SELECT user_id, other_variables FROM table1
WHERE user_id IN ('R DATAFRAME')
where the R dataframe is a simple list of some user id's that can be found in table1.
I was just wondering if something like this is possible, either written in R or SQL and if so, how do this? I know that I could just upload the R dataframe to the database but I do not have permissions to create my own tables in the database. Any help would be greatly appreciated, thank you.
Except with spark environment or with the R package
sqldf
you cannot.If it's only a list of ids you can use
unlist()
Here is an answer to nearly use dataframe, line by line.
Ouput