Airline flight arrival demo data for SQL Server Python and R tutorials
Applies to: SQL Server 2016 (13.x) and later versions
In this exercise, create a SQL Server database to store imported data from R or Python built-in Airline demo data sets. R and Python distributions provide equivalent data, which you can import to a SQL Server database using Management Studio.
To complete this exercise, you should have SQL Server Management Studio or another tool that can run T-SQL queries.
Tutorials and quickstarts using this data set include the following:
Start SQL Server Management Studio, connect to a database engine instance that has R or Python integration.
In Object Explorer, right-click Databases and create a new database called flightdata.
Right-click flightdata, click Tasks, click Import Flat File.
Open the AirlineDemoData.csv file provided in the R or Python distribution, depending on which language you installed.
For R, look for AirlineDemoSmall.csv at C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\R_SERVICES\library\RevoScaleR\SampleData
For Python, look for AirlineDemoSmall.csv at C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\Lib\site-packages\revoscalepy\data\sample_data
When you select the file, default values are filled in for table name and schema.
Click through the remaining pages, accepting the defaults, to import the data.
As a validation step, run a query to confirm the data was uploaded.
In Object Explorer, under Databases, right-click the flightdata database, and start a new query.
Run some simple queries:
SELECT TOP(10) * FROM AirlineDemoSmall; SELECT COUNT(*) FROM AirlineDemoSmall;
In the following lesson, you will create a linear regression model based on this data.