-
Notifications
You must be signed in to change notification settings - Fork 93
/
StockMarketsPrediction.js
76 lines (61 loc) · 1.34 KB
/
StockMarketsPrediction.js
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cube(`StockMarketsPrediction`, {
sql: `select
m.dt,
m.symbol,
p.price_predicted,
m.price_open,
m.price_close,
m.price_low,
m.price_high
from gold.stock_markets m
left join gold.stock_markets_prediction p on p.dt = m.dt and p.symbol = m.symbol`,
preAggregations: {
// Pre-Aggregations definitions go here
// Learn more here: https://cube.dev/docs/caching/pre-aggregations/getting-started
},
joins: {
},
measures: {
count: {
type: `count`
},
price_high: {
sql: `price_high`,
title: `Price High [MAX]`,
type: `max`
},
price_low: {
sql: `price_low`,
title: `Price Low [MIN]`,
type: `min`
},
price_open_avg: {
sql: `price_open`,
title: `Price Open [AVG]`,
type: `avg`
},
price_close_avg: {
sql: `price_close`,
title: `Price Close [AVG]`,
type: `avg`
},
price_predicted: {
sql: `price_predicted`,
title: `Price Predicted [AVG]`,
type: `avg`
}
},
dimensions: {
symbol: {
sql: `symbol`,
title: `Symbol`,
type: `string`
},
dt: {
sql: `dt`,
title: `Date`,
type: `time`
}
},
dataSource: `default`
});