| title | Lesson 1 Download the sample data | Microsoft Docs |
|---|---|
| ms.prod | sql |
| ms.technology | machine-learning |
| ms.date | 04/15/2018 |
| ms.topic | tutorial |
| author | HeidiSteen |
| ms.author | heidist |
| manager | cgronlun |
[!INCLUDEappliesto-ss-xxxx-xxxx-xxx-md-winonly]
This article is part of a tutorial for SQL developers on how to use R in SQL Server.
In this step, you'll download the sample dataset and the [!INCLUDEtsql] script files that are used in this tutorial. Both the data and the script files are shared on GitHub, but the PowerShell script will download the data and script files to a local directory of your choosing.
-
Open a Windows PowerShell command console.
Use the option, Run as Administrator, if administrative privileges are needed to create the destination directory or to write files to the specified destination.
-
Run the following PowerShell commands, changing the value of the parameter DestDir to any local directory. The default we've used here is TempRSQL.
$source = ‘https://raw.githubusercontent.com/Azure/Azure-MachineLearning-DataScience/master/Misc/RSQL/Download_Scripts_SQL_Walkthrough.ps1’ $ps1_dest = “$pwd\Download_Scripts_SQL_Walkthrough.ps1” $wc = New-Object System.Net.WebClient $wc.DownloadFile($source, $ps1_dest) .\Download_Scripts_SQL_Walkthrough.ps1 –DestDir ‘C:\tempRSQL’
If the folder you specify in DestDir does not exist, it will be created by the PowerShell script.
[!TIP] If you get an error, you can temporarily set the policy for execution of PowerShell scripts to unrestricted only for this walkthrough, by using the Bypass argument and scoping the changes to the current session.
Set\-ExecutionPolicy Bypass \-Scope ProcessRunning this command does not result in a configuration change.
Depending on your Internet connection, the download might take a while.
-
When all files have been downloaded, the PowerShell script opens to the folder specified by DestDir. In the PowerShell command prompt, run the following command and review the files that have been downloaded.
lsResults:
