| 88 | } |
| 89 | |
| 90 | public void createTableMovie() throws DDFException { |
| 91 | manager.sql("drop table if exists movie", "SparkSQL"); |
| 92 | |
| 93 | manager.sql("create table movie (" + |
| 94 | "idx string,title string,year int,length int,budget double,rating double,votes int," + |
| 95 | "r1 double,r2 double,r3 double,r4 double,r5 double,r6 double,r7 double,r8 double,r9 double,r10 double," + |
| 96 | "mpaa string,Action int,Animation int,Comedy int,Drama int,Documentary int,Romance int,Short int" + |
| 97 | ") ROW FORMAT DELIMITED FIELDS TERMINATED BY ','", "SparkSQL"); |
| 98 | |
| 99 | manager.sql("load data local inpath '../resources/test/movies.csv' into table movie", "SparkSQL"); |
| 100 | } |
| 101 | |
| 102 | public void createTableRatings() throws DDFException { |
| 103 | manager.sql("drop table if exists ratings", "SparkSQL"); |