Repository navigation
Expand file tree
/
Copy pathencode.example.yaml
More file actions
66 lines (55 loc) · 2.16 KB
/
Copy pathencode.example.yaml
File metadata and controls
66 lines (55 loc) · 2.16 KB
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
stagingDirectory: "/tmp"
s3:
enabled: true
bucket: "your-s3-bucket-name"
region: "us-east-1"
prefix: "encode-reports"
manifest_path: "/tmp/manifests"
connections:
- name: metadb
type: MariaDB
dsn: "${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:${DB_PORT})/${DB_NAME}"
- name: ole_db
type: MariaDB
dsn: "${OLE_DB_USER}:${OLE_DB_PASSWORD}@tcp(${OLE_DB_HOST}:${OLE_DB_PORT})/${OLE_DB_NAME}"
- name: postgres_db
type: PostgreSQL
dsn: "postgres://${PG_USER}:${PG_PASSWORD}@${PG_HOST}:${PG_PORT}/${PG_DB}"
- name: folio_metadb
type: FOLIO
base_url: "${FOLIO_BASE_URL}"
tenant: "${FOLIO_TENANT}"
username: "${FOLIO_USERNAME}"
password: "${FOLIO_PASSWORD}"
- name: google_sheets
type: GoogleSheets
credentials_file: "${GOOGLE_CREDENTIALS_FILE}"
reports:
- name: circulation_report
connection: metadb
query_params:
query: "SELECT date, checkouts, renewals FROM circulation_stats WHERE date >= CURDATE() - INTERVAL 1 DAY"
schedule: "0 2 * * *" # Daily at 2 AM
- name: users_report
connection: postgres_db
query_params:
query: "SELECT id, name, email, created_at FROM users WHERE updated_at >= NOW() - INTERVAL '1 day'"
schedule: "0 0 1 * *" # First of every month at midnight
- name: gate_counts_report
connection: ole_db
query_params:
query: "SELECT DATE(timestamp) as `date`, SUM(incoming_diff) as count FROM lib_gate_counts WHERE DATE(timestamp) >= CURDATE() - INTERVAL 14 DAY GROUP BY DATE(timestamp) ORDER BY date DESC"
schedule: "0 3 */14 * *" # Every 14 days at 3 AM
- name: fund_expenses_report
connection: folio_metadb
query_params:
query_url: "https://raw.githubusercontent.com/your-org/folio-metadb-queries/main/quicksight/get_fund_expenses_by_group.sql"
schedule: "0 4 * * *" # Daily at 4 AM
- name: spreadsheet_report
connection: google_sheets
query_params:
spreadsheet_id: "your-spreadsheet-id"
gid: "0" # Sheet GID (0 is usually the first sheet)
header_row: "1" # Header is in row 1 (optional, defaults to 1)
# Set to "2" if header is in row 2
schedule: "0 5 * * *" # Daily at 5 AM