From the course: SQL Server Machine Learning Services: R
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Output data to a result set
From the course: SQL Server Machine Learning Services: R
Output data to a result set
- [Instructor] Printing information to the sequels of our messages window is an easy way to quickly get insight into your data. But it isn't very useful to SQL Server. The information just isn't structured, or organized, and your applications simply can't use the data in that format. What we need to do instead, is export the data as a SQL Server result set. Right now I have the standard R Script template on the screen, and I've filled in the input data one parameter with the same query that we looked at in the last movie. If you highlight just this portion of the script, and then make sure that you're targeting the Wide World Importers database, you can execute it just like any other query on your system. Here's the data that we'll be working with. You can see there's a total of 190 rows, across five different columns. Now, when you run a query in SQL Server, it returns what's called a ResultSet. This looks, and acts…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Variables in R6m 10s
-
(Locked)
Import a data set from SQL Server2m 35s
-
(Locked)
Query data into an R data frame4m 51s
-
(Locked)
Output data to a result set5m 24s
-
(Locked)
Select values from a data frame6m 36s
-
(Locked)
Create a data frame from vectors4m 59s
-
(Locked)
Subset a data frame3m 21s
-
(Locked)
Challenge: Import data51s
-
(Locked)
Solution: Import data4m 49s
-
-
-
-
-