Skip to content

Commit e09c011

Browse files
feat: Bump Singer SDK to 0.33.0 to support comprehensions (#183)
1 parent 04ca2d3 commit e09c011

File tree

7 files changed

+55
-13
lines changed

7 files changed

+55
-13
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ updates:
1616
- "edgarrmondragon"
1717
labels:
1818
- "dependencies"
19+
versioning-strategy: increase-if-necessary
1920
- package-ecosystem: "pip"
2021
directory: "/.github/workflows"
2122
schedule:

.github/workflows/meltano-run.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222
mapping: flatten
2323
output_db: people.db
2424
target_table: people
25+
install_extractor: false
26+
- tap: nested
27+
mapping: comprehension
28+
output_db: nested.db
29+
target_table: users
30+
install_extractor: false
2531
steps:
2632
- uses: actions/checkout@v4
2733

@@ -33,15 +39,24 @@ jobs:
3339
env:
3440
PIP_CONSTRAINT: .github/workflows/constraints.txt
3541
run: |
36-
pipx install meltano
42+
pipx install meltano --python python3.11
3743
3844
- name: Check Meltano version
3945
run: |
4046
meltano --version
4147
42-
- name: Install Plugins
48+
- name: Install Mapper
4349
run: |
44-
meltano install
50+
meltano install mapper meltano-map-transformer
51+
52+
- name: Install Extractor
53+
if: matrix.install_extractor != 'false'
54+
run: |
55+
meltano install extractor ${{ matrix.tap }}
56+
57+
- name: Install Loader
58+
run: |
59+
meltano install loader target-sqlite
4560
4661
- name: Run
4762
run: |

fixtures/nested.singer

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{"type": "SCHEMA", "stream": "users", "schema": {"required": ["id"], "type": "object", "properties": {"id": {"type": "integer"}, "fields": {"type": "array", "items": {"type": "object", "properties": {"key": {"type": "string"}, "value": {"type": "string"}}}}}}, "key_properties": ["id"]}
2+
{"type": "RECORD", "stream": "users", "record": {"id": 1, "fields": [{"key": "name", "value": "John Doe"}, {"key": "age", "value": "25"}]}}
3+
{"type": "RECORD", "stream": "users", "record": {"id": 2, "fields": [{"key": "name", "value": "Jane Doe"}, {"key": "age", "value": "30"}]}}
4+
{"type": "RECORD", "stream": "users", "record": {"id": 3, "fields": [{"key": "name", "value": "John Smith"}, {"key": "age", "value": "40"}]}}
5+
{"type": "RECORD", "stream": "users", "record": {"id": 4, "fields": [{"key": "name", "value": "Jane Smith"}, {"key": "age", "value": "50"}]}}

meltano.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ plugins:
2323
- name: people
2424
namespace: people
2525
executable: scripts/people.sh
26+
- name: nested
27+
namespace: nested
28+
executable: scripts/nested.sh
2629
loaders:
2730
- name: target-sqlite
2831
variant: meltanolabs
@@ -63,6 +66,12 @@ plugins:
6366
stream_maps: {}
6467
flattening_enabled: true
6568
flattening_max_depth: 1
69+
- name: comprehension
70+
config:
71+
stream_maps:
72+
users:
73+
id: id
74+
fields: "[f for f in fields if f['key'] != 'age']"
6675
environments:
6776
- name: dev
6877
config:

poetry.lock

Lines changed: 17 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ repository = "https://github.com/MeltanoLabs/meltano-map-transform"
1717
documentation = "https://github.com/MeltanoLabs/meltano-map-transform#readme"
1818

1919
[tool.poetry.dependencies]
20-
python = "<3.12,>=3.7.1"
21-
22-
[tool.poetry.dependencies.singer-sdk]
23-
allow-prereleases = true
24-
version = "~=0.32.0"
20+
python = ">=3.7.1,<4"
21+
singer-sdk = "~=0.33.0"
2522

2623
[tool.poetry.dev-dependencies]
2724
pytest = "^7.4.2"

scripts/nested.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
cat fixtures/nested.singer

0 commit comments

Comments
 (0)