-
Notifications
You must be signed in to change notification settings - Fork 18
108 lines (98 loc) · 3.08 KB
/
meltano-run.yml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Meltano Run
on:
pull_request: {}
push:
branches: [main]
schedule:
# Daily at 12:00 PM UTC
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
meltano-run:
name: ${{ matrix.mapping }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- tap: tap-csv
mapping: hash_email
output_db: tap_csv.db
query: "select * from customers limit 20"
- tap: tap-smoke-test
mapping: whitelist
output_db: tap_smoke_test.db
query: "select * from animals limit 20"
- tap: tap-smoke-test
mapping: json_field
output_db: tap_smoke_test.db
query: "select * from animals limit 20"
- tap: people
mapping: flatten
output_db: people.db
install_extractor: false
query: "select * from people limit 20"
- tap: nested
mapping: comprehension
output_db: nested.db
install_extractor: false
query: "select * from users limit 20"
- tap: tap-csv
mapping: fake
output_db: tap_csv.db
install_extractor: false
query: "select * from customers limit 20"
- tap: tap-csv--multi
mapping: glob
output_db: tap_csv__multi.db
query: |
with
cust as (select *, 'CUSTOMER' as type from customers limit 10),
empl as (select *, 'EMPLOYEE' as type from employees limit 10)
select * from cust
union
select * from empl
- tap: tap-csv--multi
mapping: single_field
output_db: tap_csv__multi.db
query: |
with
cust as (select *, 'CUSTOMER' as type from customers limit 10),
empl as (select *, 'EMPLOYEE' as type from employees limit 10)
select * from cust
union
select * from empl
- tap: tap-csv--multi
mapping: alias_property_all_streams
output_db: tap_csv__multi.db
query: |
with
cust as (select *, 'CUSTOMER' as type from customers limit 10),
empl as (select *, 'EMPLOYEE' as type from employees limit 10)
select * from cust
union
select * from empl
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: 3.x
cache: pip
cache-dependency-path: |
meltano.yml
poetry.lock
- name: Install Meltano
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install --python '${{ steps.setup-python.outputs.python-path }}' meltano
- name: Check Meltano version
run: |
meltano --version
- name: Run
run: |
meltano run --install ${{ matrix.tap }} ${{ matrix.mapping }} target-sqlite
- name: Check output
run: |
sqlite3 -markdown output/${{ matrix.output_db }} "${{ matrix.query }}" >> $GITHUB_STEP_SUMMARY