This assignment explores moving data across multiple environments, specifically .csv files, MySQL, and R.
The assignment processes through the following steps:
All files used for this assignment are stored at https://github.com/ChadRyanBailey/607-Week2-Assignment
In this particular case:
Use the MySQL script, “04 Load Movie Ratings.sql”, to load the .csv file into the MySQL database
No transformations are needed for this assignment
Use the MySQL script, “05 Export Movie Ratings.sql”, to export the data to a new .csv file “06 Movie Ratings SQL Output.csv”
Load the Data:
fileLocation <- "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Data 607/Week2/06 Movie Ratings SQL Output.csv"
MovieRatings <- read.table(file = fileLocation, header = TRUE, sep = ",")
Review the loaded data:
head(MovieRatings)
## RaterId RaterName Movie Rating
## 1 1 Darlene Avengers: Infinity War 2
## 2 1 Darlene The Incredibles 2 5
## 3 1 Darlene Mission Impossible: Fallout 1
## 4 1 Darlene Solo: A Starwars Story 5
## 5 1 Darlene Jurassic World: Fallen Kingdom 3
## 6 1 Darlene Ant Man and the Wasp 5
summary(MovieRatings)
## RaterId RaterName Movie
## Min. :1.0 Bryson :6 Ant Man and the Wasp :6
## 1st Qu.:2.0 Darlene:6 Avengers: Infinity War :6
## Median :3.5 Janice :6 Jurassic World: Fallen Kingdom:6
## Mean :3.5 Jeff :6 Mission Impossible: Fallout :6
## 3rd Qu.:5.0 John :6 Solo: A Starwars Story :6
## Max. :6.0 Ryan :6 The Incredibles 2 :6
## Rating
## Min. :1.000
## 1st Qu.:2.000
## Median :3.000
## Mean :3.222
## 3rd Qu.:5.000
## Max. :5.000