-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdozer-config.yaml
66 lines (57 loc) · 1.61 KB
/
dozer-config.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
56
57
58
59
60
61
62
63
64
65
66
app_name: aws-s3-sample
version: 1
connections:
- config: !S3Storage
details:
access_key_id: "{{AWS_ACCESS_KEY}}"
secret_access_key: "{{AWS_SECRET_KEY}}"
region: "{{AWS_REGION_S3}}"
bucket_name: "{{AWS_BUCKET_NAME}}"
tables:
- !Table
name: stocks
config: !CSV
path: stock_data_monthly_100_rows #Change this to stock_data_monthly
extension: .csv
name: s3
sql: |
-- Ticker Analysis
SELECT Ticker, AVG(Close) AS average_close_price, SUM(Volume) AS total_volume
INTO ticker_analysis
FROM stocks
WHERE Date >= '2025-01-01' AND Date < '2025-02-01'
GROUP BY Ticker;
-- Daily Analysis
SELECT Date, AVG(Close) AS average_close_price, SUM(Volume) AS total_volume
INTO daily_analysis
FROM stocks
GROUP BY Date;
-- Highest Daily Close Price
SELECT Date, MAX(Close) AS highest_close_price
INTO highest_daily_close
FROM stocks
GROUP BY Date;
-- Lowest Daily Close Price
SELECT Date, MIN(Close) AS lowest_close_price
INTO lowest_daily_close
FROM stocks
GROUP BY Date;
sources:
- name: stocks
table_name: stocks
connection: s3
endpoints:
- name: ticker_analysis
path: /analysis/ticker
table_name: ticker_analysis
- name: daily_analysis
path: /analysis/daily
table_name: daily_analysis
- name: highest_daily_close
path: /analysis/highest_daily_close
table_name: highest_daily_close
- name: lowest_daily_close
path: /analysis/lowest_daily_close
table_name: lowest_daily_close
# telemetry:
# metrics: !Prometheus # You can check the metrics at http://localhost:9000