I have a dataframe in R that has about 100k IDs. I want to place these IDs in my queries connecting R to Oracle, MySQL, and redshift tables using R packages RODBC, MYSQL, and redshift.
For example,
output <- dbGetQuery(conn,paste("select * from redshift_table
where ID in (select ID from df"))
I've seen some solutions using the paste function for when you only have a few IDs but my list of IDs is very large and I don't think paste will work.
How can I join my R dataframe with these external databases in R? I prefer not to create a temp table in my external database.
Thanks in advance!