forked from YotpoLtd/metorikku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
movies_metric.yaml
55 lines (55 loc) · 1.3 KB
/
movies_metric.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
steps:
- dataFrameName: moviesWithRatings
sql:
SELECT userid,
movies.movieid,
rating,
timestamp,
title,
genres
FROM ratings
JOIN movies ON ratings.movieid = movies.movieid
- dataFrameName: fantasyMoviesWithRatings
sql:
SELECT movieId,
cast(rating AS float) AS rating,
timestamp,
title,
genres
FROM moviesWithRatings
WHERE genres LIKE '%Fantasy%'
- dataFrameName: topFantasyMovies
file: topFantasyMovies.sql
- dataFrameName: myFavoriteMovieRated
sql:
SELECT *
FROM topFantasyMovies
WHERE title = ${myFavoriteMovie}
output:
- dataFrameName: topFantasyMovies
outputType: Parquet
outputOptions:
saveMode: Overwrite
path: topFantasyMovies.parquet
createUniquePath: true
- dataFrameName: topFantasyMovies
outputType: CSV
outputOptions:
saveMode: Overwrite
path: topFantasyMovies.csv
coalesce: true
extraOptions:
multiline: "true"
- dataFrameName: topFantasyMovies
outputType: JSON
outputOptions:
saveMode: Overwrite
path: topFantasyMovies.jsonl
repartition: 10
- dataFrameName: topFantasyMovies
outputType: File
outputOptions:
saveMode: Overwrite
path: topFantasyMovies.xml
format: com.databricks.spark.xml
repartition: 2