Machine Learning Services and Result Sets part 2

2017-11-16 0 Comments

Dave Mason SQL Server Machine Learning Services WITH RESULT SETS R Python

In the last post, I pondered the use of WITH RESULT SETS along with sp_execute_external_script when we don't know the structure of the OutputDataSet until run time. Let's look at another example. Here I'll use the rvest package to scrape a web page: each HTML <table> found on the web page becomes a data frame in the "tables" list (line 5). The first data frame in the list is returned to SQL Server (line 6).


Machine Learning Services and Result Sets

2017-11-15 0 Comments

Dave Mason SQL Server Machine Learning Services WITH RESULT SETS R Python

When you run an R or Python script in-database via the sp_execute_external_script stored procedure, result sets returned by the stored procedure are output with unnamed columns by default. Here's an example using R and the [WideWorldImporters] database. The input data is a simple query on the Application.Countries table. R creates a data frame from the input data and merely returns it back to SQL Server (as the "OutputDataSet" data frame).


T-SQL Tuesday #96: Folks Who Have Made a Difference

2017-11-14 0 Comments

Dave Mason T-SQL Tuesday

Last week while reviewing some of my old posts, I realized I had written 99 of them. For my 100th post, I asked for suggestions from the Twitterverse. There were some really great responses, including some that focused on the journey to 100: what I learned, who helped and influenced me along the way, etc. I was going to go in another direction, but this really dovetails nicely with the T-SQL Tuesday topic for November 2017.


The PASS Website and Social Media Promotion

2017-11-09 0 Comments

I haven't been involved in the SQL community for very long. Because of that, I haven't done much volunteering. But earlier this year, Andy Warren asked me to help out with the organization efforts for SQLSaturday Orlando 2017. Andy is a veritable fountain of knowledge when it comes to SQLSaturdays. He has a ton of great ideas on how to improve things for everyone involved: attendees, sponsors, speakers, and organizers. Seriously, check out his recent posts to see what I mean!


Multiple Output Datasets With R and SQL Server

2017-11-06 0 Comments

Dave Mason SQL Server R

Something I've been fooling around with lately is using R to scrape web pages for HTML table data. As an example, there are two HTML tables on this post about unpivoting the output of a RESTORE HEADER command in T-SQL. Basically, there's a "wide" HTML table with dozens of columns, and a "narrow" HTML table with just two.