Is there a way to pass two SQL Server tables without a JOIN for processing into R using MS SQL Server 2016?
For Example, @input_data_1=TABLE
, passes the 'TABLE' as a dataframe into R with default variable name InputDataSet
.
Is there a way to somehow access other tables residing in SQL Server through R?
Best Answer
@input_data_1
can be a T-SQL statement, or a reference to a view masking a complex SQL statement, so things can really be as complicated as you make them. Here's some simple examples of how to combine tables of the same or different structures. You could conceivably do some filtering in the r script on the table source column (xsource
):There is not an
@input_data_2
or@input_data_n
at this time.