tap-belvo 0.1.0a2__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tap-belvo might be problematic. Click here for more details.
- tap_belvo-0.2.1/.github/CODEOWNERS +2 -0
- tap_belvo-0.2.1/.github/renovate.json5 +8 -0
- tap_belvo-0.2.1/.github/workflows/dynamic-publish.yaml +42 -0
- tap_belvo-0.2.1/.github/workflows/test.yml +92 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/.pre-commit-config.yaml +13 -5
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/PKG-INFO +10 -26
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/README.md +4 -10
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/meltano.yml +6 -2
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/plugins/loaders/target-duckdb--jwills.lock +64 -63
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/plugins/loaders/target-jsonl--andyh1203.lock +1 -1
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/pyproject.toml +38 -47
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/client.py +1 -1
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/openapi/__init__.py +3 -8
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tests/test_core.py +1 -1
- tap_belvo-0.2.1/tox.ini +39 -0
- tap_belvo-0.2.1/uv.lock +832 -0
- tap_belvo-0.1.0a2/.github/dependabot.yml +0 -48
- tap_belvo-0.1.0a2/.github/workflows/constraints.txt +0 -2
- tap_belvo-0.1.0a2/.github/workflows/dynamic-publish.yaml +0 -39
- tap_belvo-0.1.0a2/.github/workflows/test.yml +0 -90
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/.copier-answers.yml +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/.gitignore +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/.secrets/.gitignore +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/LICENSE +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/output/.gitignore +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/__init__.py +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/__main__.py +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/openapi/BelvoOpenFinanceApiSpec.json +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/streams/__init__.py +6 -6
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/streams/banking.py +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/streams/core.py +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/streams/enrichment.py +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/streams/fiscal.py +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tap_belvo/tap.py +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tests/__init__.py +0 -0
- {tap_belvo-0.1.0a2 → tap_belvo-0.2.1}/tests/conftest.py +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"extends": [
|
|
4
|
+
// https://docs.renovatebot.com/config-presets/#grouporganization-level-presets
|
|
5
|
+
// https://github.com/reservoir-data/.github/blob/main/.github/renovate.json5
|
|
6
|
+
"reservoir-data/.github//.github/renovate.json5"
|
|
7
|
+
],
|
|
8
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Build and publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
name: Build wheel and sdist
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
outputs:
|
|
11
|
+
package_version: ${{ steps.baipp.outputs.package_version }}
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
- uses: hynek/build-and-inspect-python-package@c52c3a4710070b50470d903818a7b25115dcd076 # v2.13.0
|
|
17
|
+
id: baipp
|
|
18
|
+
|
|
19
|
+
publish:
|
|
20
|
+
name: Publish to PyPI
|
|
21
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
needs: build
|
|
24
|
+
environment:
|
|
25
|
+
name: pypi
|
|
26
|
+
url: https://pypi.org/project/tap-belvo/${{ needs.build.outputs.package_version }}
|
|
27
|
+
permissions:
|
|
28
|
+
contents: write
|
|
29
|
+
id-token: write
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
33
|
+
with:
|
|
34
|
+
name: Packages
|
|
35
|
+
path: dist
|
|
36
|
+
- uses: svenstaro/upload-release-action@ebd922b779f285dafcac6410a0710daee9c12b82 # 2.10.0
|
|
37
|
+
with:
|
|
38
|
+
file: dist/*.whl
|
|
39
|
+
tag: ${{ github.ref }}
|
|
40
|
+
overwrite: true
|
|
41
|
+
file_glob: true
|
|
42
|
+
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Test tap-belvo
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- tap_belvo/**
|
|
8
|
+
- tests/**
|
|
9
|
+
- pyproject.toml
|
|
10
|
+
- tox.ini
|
|
11
|
+
- uv.lock
|
|
12
|
+
- .github/workflows/test.yml
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [main]
|
|
15
|
+
paths:
|
|
16
|
+
- tap_belvo/**
|
|
17
|
+
- tests/**
|
|
18
|
+
- pyproject.toml
|
|
19
|
+
- tox.ini
|
|
20
|
+
- uv.lock
|
|
21
|
+
- .github/workflows/test.yml
|
|
22
|
+
workflow_dispatch:
|
|
23
|
+
schedule:
|
|
24
|
+
- cron: "0 10 * * *"
|
|
25
|
+
|
|
26
|
+
concurrency:
|
|
27
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
28
|
+
cancel-in-progress: true
|
|
29
|
+
|
|
30
|
+
env:
|
|
31
|
+
FORCE_COLOR: 1
|
|
32
|
+
# renovate: datasource=pypi depName=uv
|
|
33
|
+
UV_VERSION: 0.7.13
|
|
34
|
+
# renovate: datasource=pypi depName=tox
|
|
35
|
+
TOX_VERSION: 4.27.0
|
|
36
|
+
# renovate: datasource=pypi depName=tox-uv
|
|
37
|
+
TOX_UV_VERSION: 1.26.0
|
|
38
|
+
|
|
39
|
+
jobs:
|
|
40
|
+
tests:
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
strategy:
|
|
43
|
+
fail-fast: false
|
|
44
|
+
matrix:
|
|
45
|
+
python-version:
|
|
46
|
+
- "3.11"
|
|
47
|
+
- "3.12"
|
|
48
|
+
- "3.13"
|
|
49
|
+
- "3.14"
|
|
50
|
+
include:
|
|
51
|
+
- { environment: "dependencies", python-version: "3.x" }
|
|
52
|
+
- { environment: "typing", python-version: "3.x" }
|
|
53
|
+
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
56
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
57
|
+
id: setup-python
|
|
58
|
+
with:
|
|
59
|
+
python-version: ${{ matrix.python-version }}
|
|
60
|
+
allow-prereleases: true
|
|
61
|
+
- uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
|
|
62
|
+
with:
|
|
63
|
+
version: ${{ env.UV_VERSION }}
|
|
64
|
+
- name: Run
|
|
65
|
+
env:
|
|
66
|
+
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
|
|
67
|
+
TAP_BELVO_SECRET_ID: ${{ secrets.TAP_BELVO_SECRET_ID }}
|
|
68
|
+
TAP_BELVO_PASSWORD: ${{ secrets.TAP_BELVO_PASSWORD }}
|
|
69
|
+
TAP_BELVO_BASE_URL: https://sandbox.belvo.com
|
|
70
|
+
run: >
|
|
71
|
+
uvx
|
|
72
|
+
--with tox-uv==${{ env.TOX_UV_VERSION }}
|
|
73
|
+
--with tox==${{ env.TOX_VERSION }}
|
|
74
|
+
tox -e ${{ matrix.environment || matrix.python-version }}
|
|
75
|
+
|
|
76
|
+
pre-commit:
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
steps:
|
|
79
|
+
- name: Checkout code
|
|
80
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
81
|
+
|
|
82
|
+
- name: Set up Python
|
|
83
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
84
|
+
with:
|
|
85
|
+
python-version: "3.x"
|
|
86
|
+
cache: pip
|
|
87
|
+
cache-dependency-path: .pre-commit-config.yaml
|
|
88
|
+
|
|
89
|
+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
|
|
90
|
+
|
|
91
|
+
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
|
|
92
|
+
if: always()
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
ci:
|
|
2
2
|
autofix_prs: false
|
|
3
3
|
autofix_commit_msg: '[pre-commit.ci] auto fixes'
|
|
4
|
-
autoupdate_schedule:
|
|
4
|
+
autoupdate_schedule: monthly
|
|
5
5
|
autoupdate_commit_msg: 'chore(deps): pre-commit autoupdate'
|
|
6
|
+
skip:
|
|
7
|
+
- uv-lock
|
|
6
8
|
|
|
7
9
|
repos:
|
|
8
10
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
9
|
-
rev:
|
|
11
|
+
rev: v5.0.0
|
|
10
12
|
hooks:
|
|
11
13
|
- id: check-json
|
|
12
14
|
exclude: "\\.vscode/.*.json"
|
|
@@ -17,18 +19,24 @@ repos:
|
|
|
17
19
|
- id: trailing-whitespace
|
|
18
20
|
|
|
19
21
|
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
20
|
-
rev: "
|
|
22
|
+
rev: "v2.6.0"
|
|
21
23
|
hooks:
|
|
22
24
|
- id: pyproject-fmt
|
|
23
25
|
|
|
24
26
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
25
|
-
rev: "v0.
|
|
27
|
+
rev: "v0.12.0"
|
|
26
28
|
hooks:
|
|
27
29
|
- id: ruff
|
|
28
30
|
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
|
|
29
31
|
- id: ruff-format
|
|
30
32
|
|
|
31
33
|
- repo: https://github.com/pre-commit/pre-commit
|
|
32
|
-
rev:
|
|
34
|
+
rev: v4.2.0
|
|
33
35
|
hooks:
|
|
34
36
|
- id: validate_manifest
|
|
37
|
+
|
|
38
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
39
|
+
rev: "0.7.13"
|
|
40
|
+
hooks:
|
|
41
|
+
- id: uv-lock
|
|
42
|
+
- id: uv-sync
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: tap-belvo
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Singer tap for Belvo, built with the Meltano SDK for Singer Taps.
|
|
5
5
|
Project-URL: Documentation, https://github.com/edgarrmondragon/tap-belvo#readme
|
|
6
6
|
Project-URL: Homepage, https://github.com/edgarrmondragon/tap-belvo
|
|
@@ -11,27 +11,17 @@ License-Expression: Apache-2.0
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Keywords: Belvo,ELT,singer.io
|
|
13
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
|
|
21
|
-
Requires-
|
|
22
|
-
Requires-Dist: requests
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Requires-Python: >=3.11
|
|
23
19
|
Requires-Dist: requests-cache==1.*
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
|
|
26
|
-
Requires-Dist: deptry>=0.12; extra == 'testing'
|
|
27
|
-
Requires-Dist: pytest>=7.4; extra == 'testing'
|
|
28
|
-
Requires-Dist: singer-sdk[testing]; extra == 'testing'
|
|
29
|
-
Provides-Extra: typing
|
|
30
|
-
Requires-Dist: mypy; extra == 'typing'
|
|
31
|
-
Requires-Dist: types-requests; extra == 'typing'
|
|
20
|
+
Requires-Dist: requests~=2.32.3
|
|
21
|
+
Requires-Dist: singer-sdk~=0.47.3
|
|
32
22
|
Description-Content-Type: text/markdown
|
|
33
23
|
|
|
34
|
-
#
|
|
24
|
+
# tap-belvo
|
|
35
25
|
|
|
36
26
|
Singer tap for Belvo.
|
|
37
27
|
|
|
@@ -82,21 +72,15 @@ tap-belvo --config CONFIG --discover > ./catalog.json
|
|
|
82
72
|
### Initialize your Development Environment
|
|
83
73
|
|
|
84
74
|
```bash
|
|
85
|
-
|
|
75
|
+
uv tool install --with tox-uv tox
|
|
86
76
|
```
|
|
87
77
|
|
|
88
78
|
### Create and Run Tests
|
|
89
79
|
|
|
90
|
-
Run
|
|
80
|
+
Run all tests:
|
|
91
81
|
|
|
92
82
|
```bash
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
You can also test the `tap-belvo` CLI interface directly:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
hatch run sync:console -- --about --format=json
|
|
83
|
+
tox run-parallel
|
|
100
84
|
```
|
|
101
85
|
|
|
102
86
|
### Testing with [Meltano](https://www.meltano.com)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# tap-belvo
|
|
2
2
|
|
|
3
3
|
Singer tap for Belvo.
|
|
4
4
|
|
|
@@ -49,21 +49,15 @@ tap-belvo --config CONFIG --discover > ./catalog.json
|
|
|
49
49
|
### Initialize your Development Environment
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
|
|
52
|
+
uv tool install --with tox-uv tox
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Create and Run Tests
|
|
56
56
|
|
|
57
|
-
Run
|
|
57
|
+
Run all tests:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
You can also test the `tap-belvo` CLI interface directly:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
hatch run sync:console -- --about --format=json
|
|
60
|
+
tox run-parallel
|
|
67
61
|
```
|
|
68
62
|
|
|
69
63
|
### Testing with [Meltano](https://www.meltano.com)
|
|
@@ -24,10 +24,12 @@ plugins:
|
|
|
24
24
|
kind: password
|
|
25
25
|
label: Secret ID
|
|
26
26
|
description: Belvo API secret ID
|
|
27
|
+
sensitive: true
|
|
27
28
|
- name: password
|
|
28
29
|
kind: password
|
|
29
30
|
label: Password
|
|
30
31
|
description: Belvo API password
|
|
32
|
+
sensitive: true
|
|
31
33
|
- name: base_url
|
|
32
34
|
kind: string
|
|
33
35
|
value: https://development.belvo.com
|
|
@@ -40,8 +42,8 @@ plugins:
|
|
|
40
42
|
config:
|
|
41
43
|
start_date: '2022-11-21'
|
|
42
44
|
select:
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
+
- links_*.*
|
|
46
|
+
- banking_*.*
|
|
45
47
|
repository: https://github.com/edgarrmondragon/tap-belvo
|
|
46
48
|
loaders:
|
|
47
49
|
- name: target-jsonl
|
|
@@ -53,3 +55,5 @@ plugins:
|
|
|
53
55
|
config:
|
|
54
56
|
filepath: output/wh.duckdb
|
|
55
57
|
default_target_schema: $MELTANO_ENVIRONMENT
|
|
58
|
+
venv:
|
|
59
|
+
backend: uv
|
|
@@ -11,31 +11,31 @@
|
|
|
11
11
|
"logo_url": "https://hub.meltano.com/assets/logos/loaders/duckdb.png",
|
|
12
12
|
"settings_group_validation": [
|
|
13
13
|
[
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"default_target_schema",
|
|
15
|
+
"filepath"
|
|
16
16
|
]
|
|
17
17
|
],
|
|
18
18
|
"settings": [
|
|
19
19
|
{
|
|
20
|
-
"name": "
|
|
21
|
-
"kind": "
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
20
|
+
"name": "add_metadata_columns",
|
|
21
|
+
"kind": "boolean",
|
|
22
|
+
"value": false,
|
|
23
|
+
"label": "Add Metadata Columns",
|
|
24
|
+
"description": "Metadata columns add extra row level information about data ingestions, (i.e. when was the row read in source, when was inserted or deleted in postgres etc.) Metadata columns are creating automatically by adding extra columns to the tables with a column prefix _SDC_. The column names are following the stitch naming conventions documented at https://www.stitchdata.com/docs/data-structure/integration-schemas#sdc-columns. Enabling metadata columns will flag the deleted rows by setting the _SDC_DELETED_AT metadata column. Without the add_metadata_columns option the deleted rows from singer taps will not be recognisable in DuckDB."
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
"name": "
|
|
28
|
-
"kind": "
|
|
29
|
-
"value":
|
|
30
|
-
"label": "
|
|
31
|
-
"description": "
|
|
32
|
-
"placeholder": "/path/to/local/file.duckdb"
|
|
27
|
+
"name": "batch_size_rows",
|
|
28
|
+
"kind": "integer",
|
|
29
|
+
"value": 100000,
|
|
30
|
+
"label": "Batch Size Rows",
|
|
31
|
+
"description": "Maximum number of rows in each batch. At the end of each batch, the rows in the batch are loaded into DuckDB."
|
|
33
32
|
},
|
|
34
33
|
{
|
|
35
|
-
"name": "
|
|
36
|
-
"kind": "
|
|
37
|
-
"
|
|
38
|
-
"
|
|
34
|
+
"name": "data_flattening_max_level",
|
|
35
|
+
"kind": "integer",
|
|
36
|
+
"value": 0,
|
|
37
|
+
"label": "Data Flattening Max Level",
|
|
38
|
+
"description": "Object type RECORD items from taps can be transformed to flattened columns by creating columns automatically.\n\nWhen value is 0 (default) then flattening functionality is turned off.\n"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"name": "database",
|
|
@@ -44,10 +44,17 @@
|
|
|
44
44
|
"description": "Alias of `dbname`."
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
"name": "
|
|
48
|
-
"kind": "
|
|
49
|
-
"label": "
|
|
50
|
-
"description": "
|
|
47
|
+
"name": "dbname",
|
|
48
|
+
"kind": "string",
|
|
49
|
+
"label": "Database",
|
|
50
|
+
"description": "The database name to write to; this will be inferred from the path property if it is not specified."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "default_target_schema",
|
|
54
|
+
"kind": "string",
|
|
55
|
+
"value": "$MELTANO_EXTRACT__LOAD_SCHEMA",
|
|
56
|
+
"label": "Default Target Schema",
|
|
57
|
+
"description": "Name of the schema where the tables will be created. If schema_mapping is not defined then every stream sent by the tap is loaded into this schema."
|
|
51
58
|
},
|
|
52
59
|
{
|
|
53
60
|
"name": "delimiter",
|
|
@@ -57,18 +64,12 @@
|
|
|
57
64
|
"description": "The delimiter to use for the CSV files that are used for record imports."
|
|
58
65
|
},
|
|
59
66
|
{
|
|
60
|
-
"name": "
|
|
67
|
+
"name": "filepath",
|
|
61
68
|
"kind": "string",
|
|
62
|
-
"value": "
|
|
63
|
-
"label": "
|
|
64
|
-
"description": "
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
"name": "batch_size_rows",
|
|
68
|
-
"kind": "integer",
|
|
69
|
-
"value": 100000,
|
|
70
|
-
"label": "Batch Size Rows",
|
|
71
|
-
"description": "Maximum number of rows in each batch. At the end of each batch, the rows in the batch are loaded into DuckDB."
|
|
69
|
+
"value": "${MELTANO_PROJECT_ROOT}/output/warehouse.duckdb",
|
|
70
|
+
"label": "File Path",
|
|
71
|
+
"description": "Alias of `path`.",
|
|
72
|
+
"placeholder": "/path/to/local/file.duckdb"
|
|
72
73
|
},
|
|
73
74
|
{
|
|
74
75
|
"name": "flush_all_streams",
|
|
@@ -77,26 +78,6 @@
|
|
|
77
78
|
"label": "Flush All Streams",
|
|
78
79
|
"description": "Flush and load every stream into DuckDB when one batch is full. Warning - This may trigger the COPY command to use files with low number of records."
|
|
79
80
|
},
|
|
80
|
-
{
|
|
81
|
-
"name": "default_target_schema",
|
|
82
|
-
"kind": "string",
|
|
83
|
-
"value": "$MELTANO_EXTRACT__LOAD_SCHEMA",
|
|
84
|
-
"label": "Default Target Schema",
|
|
85
|
-
"description": "Name of the schema where the tables will be created. If schema_mapping is not defined then every stream sent by the tap is loaded into this schema."
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"name": "schema_mapping",
|
|
89
|
-
"kind": "object",
|
|
90
|
-
"label": "schema_mapping",
|
|
91
|
-
"description": "Useful if you want to load multiple streams from one tap to multiple DuckDB schemas.\n\nIf the tap sends the stream_id in <schema_name>-<table_name> format then this option overwrites the default_target_schema value.\n"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"name": "add_metadata_columns",
|
|
95
|
-
"kind": "boolean",
|
|
96
|
-
"value": false,
|
|
97
|
-
"label": "Add Metadata Columns",
|
|
98
|
-
"description": "Metadata columns add extra row level information about data ingestions, (i.e. when was the row read in source, when was inserted or deleted in postgres etc.) Metadata columns are creating automatically by adding extra columns to the tables with a column prefix _SDC_. The column names are following the stitch naming conventions documented at https://www.stitchdata.com/docs/data-structure/integration-schemas#sdc-columns. Enabling metadata columns will flag the deleted rows by setting the _SDC_DELETED_AT metadata column. Without the add_metadata_columns option the deleted rows from singer taps will not be recognisable in DuckDB."
|
|
99
|
-
},
|
|
100
81
|
{
|
|
101
82
|
"name": "hard_delete",
|
|
102
83
|
"kind": "boolean",
|
|
@@ -105,11 +86,11 @@
|
|
|
105
86
|
"description": "When hard_delete option is true then DELETE SQL commands will be performed in DuckDB to delete rows in tables. It's achieved by continuously checking the _SDC_DELETED_AT metadata column sent by the singer tap. Due to deleting rows requires metadata columns, hard_delete option automatically enables the add_metadata_columns option as well."
|
|
106
87
|
},
|
|
107
88
|
{
|
|
108
|
-
"name": "
|
|
109
|
-
"kind": "
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
89
|
+
"name": "path",
|
|
90
|
+
"kind": "string",
|
|
91
|
+
"label": "Connection Path",
|
|
92
|
+
"description": "The path to use for the `duckdb.connect` call; either a local file or a MotherDuck connection uri.",
|
|
93
|
+
"placeholder": "/path/to/local/file.duckdb"
|
|
113
94
|
},
|
|
114
95
|
{
|
|
115
96
|
"name": "primary_key_required",
|
|
@@ -119,17 +100,37 @@
|
|
|
119
100
|
"description": "Log based and Incremental replications on tables with no Primary Key cause duplicates when merging UPDATE events. When set to true, stop loading data if no Primary Key is defined."
|
|
120
101
|
},
|
|
121
102
|
{
|
|
122
|
-
"name": "
|
|
123
|
-
"kind": "
|
|
124
|
-
"value":
|
|
125
|
-
"label": "
|
|
126
|
-
"description": "
|
|
103
|
+
"name": "quotechar",
|
|
104
|
+
"kind": "string",
|
|
105
|
+
"value": "\"",
|
|
106
|
+
"label": "Quote Character",
|
|
107
|
+
"description": "The quote character to use for the CSV files that are used for record imports."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "schema_mapping",
|
|
111
|
+
"kind": "object",
|
|
112
|
+
"label": "schema_mapping",
|
|
113
|
+
"description": "Useful if you want to load multiple streams from one tap to multiple DuckDB schemas.\n\nIf the tap sends the stream_id in <schema_name>-<table_name> format then this option overwrites the default_target_schema value.\n"
|
|
127
114
|
},
|
|
128
115
|
{
|
|
129
116
|
"name": "temp_dir",
|
|
130
117
|
"kind": "string",
|
|
131
118
|
"label": "Temporary Directory",
|
|
132
119
|
"description": "Directory of temporary CSV files with RECORD messages."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "token",
|
|
123
|
+
"kind": "string",
|
|
124
|
+
"label": "Token",
|
|
125
|
+
"description": "For MotherDuck connections, the auth token to use.",
|
|
126
|
+
"sensitive": true
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "validate_records",
|
|
130
|
+
"kind": "boolean",
|
|
131
|
+
"value": false,
|
|
132
|
+
"label": "Validate Records",
|
|
133
|
+
"description": "Validate every single record message to the corresponding JSON schema. This option is disabled by default and invalid RECORD messages will fail only at load time by DuckDB. Enabling this option will detect invalid records earlier but could cause performance degradation."
|
|
133
134
|
}
|
|
134
135
|
]
|
|
135
|
-
}
|
|
136
|
+
}
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
"description": "Specifies a custom name for the filename, instead of the stream name.\n\nThe file name will be `{custom_name}-{timestamp}.jsonl`, if `do_timestamp_file` is `true`.\nOtherwise the file name will be `{custom_name}.jsonl`.\n\nIf custom name is not provided, the stream name will be used.\n"
|
|
32
32
|
}
|
|
33
33
|
]
|
|
34
|
-
}
|
|
34
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
build-backend = "hatchling.build"
|
|
3
3
|
requires = [
|
|
4
|
-
"hatch-vcs",
|
|
5
|
-
"hatchling",
|
|
4
|
+
"hatch-vcs==0.5",
|
|
5
|
+
"hatchling==1.27",
|
|
6
6
|
]
|
|
7
7
|
|
|
8
8
|
[project]
|
|
@@ -17,64 +17,50 @@ keywords = [
|
|
|
17
17
|
license = "Apache-2.0"
|
|
18
18
|
maintainers = [ { name = "Edgar Ramírez-Mondragón", email = "edgarrm358@gmail.com" } ]
|
|
19
19
|
authors = [ { name = "Edgar Ramírez-Mondragón", email = "edgarrm358@gmail.com" } ]
|
|
20
|
-
requires-python = ">=3.
|
|
20
|
+
requires-python = ">=3.11"
|
|
21
21
|
classifiers = [
|
|
22
22
|
"Programming Language :: Python :: 3 :: Only",
|
|
23
|
-
"Programming Language :: Python :: 3.8",
|
|
24
|
-
"Programming Language :: Python :: 3.9",
|
|
25
|
-
"Programming Language :: Python :: 3.10",
|
|
26
23
|
"Programming Language :: Python :: 3.11",
|
|
27
24
|
"Programming Language :: Python :: 3.12",
|
|
28
25
|
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3.14",
|
|
29
27
|
]
|
|
30
28
|
dynamic = [
|
|
31
29
|
"version",
|
|
32
30
|
]
|
|
33
31
|
dependencies = [
|
|
34
|
-
"
|
|
35
|
-
"requests",
|
|
32
|
+
"requests~=2.32.3",
|
|
36
33
|
"requests-cache==1.*",
|
|
37
|
-
"singer-sdk~=0.
|
|
34
|
+
"singer-sdk~=0.47.3",
|
|
38
35
|
]
|
|
39
|
-
|
|
36
|
+
urls.Documentation = "https://github.com/edgarrmondragon/tap-belvo#readme"
|
|
37
|
+
urls.Homepage = "https://github.com/edgarrmondragon/tap-belvo"
|
|
38
|
+
urls.Source = "https://github.com/edgarrmondragon/tap-belvo"
|
|
39
|
+
scripts."tap-belvo" = "tap_belvo.tap:TapBelvo.cli"
|
|
40
|
+
|
|
41
|
+
[dependency-groups]
|
|
42
|
+
dev = [
|
|
43
|
+
{ include-group = "testing" },
|
|
44
|
+
{ include-group = "typing" },
|
|
45
|
+
]
|
|
46
|
+
testing = [
|
|
40
47
|
"deptry>=0.12",
|
|
41
48
|
"pytest>=7.4",
|
|
42
49
|
"singer-sdk[testing]",
|
|
43
50
|
]
|
|
44
|
-
|
|
51
|
+
typing = [
|
|
45
52
|
"mypy",
|
|
46
53
|
"types-requests",
|
|
47
54
|
]
|
|
48
|
-
urls.Documentation = "https://github.com/edgarrmondragon/tap-belvo#readme"
|
|
49
|
-
urls.Homepage = "https://github.com/edgarrmondragon/tap-belvo"
|
|
50
|
-
urls.Source = "https://github.com/edgarrmondragon/tap-belvo"
|
|
51
|
-
scripts."tap-belvo" = "tap_belvo.tap:TapBelvo.cli"
|
|
52
55
|
|
|
53
56
|
[tool.hatch.version]
|
|
54
57
|
source = "vcs"
|
|
55
58
|
|
|
56
|
-
[tool.hatch.envs.sync.scripts]
|
|
57
|
-
console = "tap-belvo {args}"
|
|
58
|
-
jsonl = "tap-belvo {args} > tap-belvo.jsonl"
|
|
59
|
-
|
|
60
|
-
[tool.hatch.envs.test]
|
|
61
|
-
features = [ "testing" ]
|
|
62
|
-
[tool.hatch.envs.test.scripts]
|
|
63
|
-
integration = "pytest {args:tests}"
|
|
64
|
-
dependencies = "deptry ."
|
|
65
|
-
|
|
66
|
-
[tool.hatch.envs.typing]
|
|
67
|
-
features = [ "testing", "typing" ]
|
|
68
|
-
[tool.hatch.envs.typing.scripts]
|
|
69
|
-
check = "mypy --strict {args:tap_belvo tests}"
|
|
70
|
-
|
|
71
59
|
[tool.ruff]
|
|
72
60
|
line-length = 88
|
|
73
|
-
src = [ "tap_belvo", "tests" ]
|
|
74
61
|
|
|
75
62
|
lint.select = [ "ALL" ]
|
|
76
63
|
lint.ignore = [
|
|
77
|
-
"ANN101", # missing-type-self
|
|
78
64
|
"COM812", # missing-trailing-comma
|
|
79
65
|
"DJ", # flake8-django
|
|
80
66
|
"FIX002", # line-contains-todo
|
|
@@ -93,30 +79,35 @@ lint.isort.known-first-party = [ "tap_belvo" ]
|
|
|
93
79
|
lint.isort.required-imports = [ "from __future__ import annotations" ]
|
|
94
80
|
lint.pydocstyle.convention = "google"
|
|
95
81
|
|
|
96
|
-
[tool.deptry.package_module_name_map]
|
|
97
|
-
importlib-resources = "importlib_resources"
|
|
98
|
-
mypy = "mypy"
|
|
99
|
-
types-requests = "requests"
|
|
100
|
-
|
|
101
|
-
[tool.deptry.per_rule_ignores]
|
|
102
|
-
DEP002 = [
|
|
103
|
-
"deptry",
|
|
104
|
-
"mypy",
|
|
105
|
-
"pytest",
|
|
106
|
-
]
|
|
107
|
-
|
|
108
82
|
[tool.pyproject-fmt]
|
|
109
|
-
max_supported_python = "3.
|
|
83
|
+
max_supported_python = "3.14"
|
|
110
84
|
|
|
111
85
|
[tool.pytest.ini_options]
|
|
112
|
-
addopts = "-vvv"
|
|
86
|
+
addopts = [ "-vvv" ]
|
|
87
|
+
filterwarnings = [
|
|
88
|
+
"error",
|
|
89
|
+
"default:'asyncio.iscoroutinefunction' is deprecated:DeprecationWarning",
|
|
90
|
+
"default:'_UnionGenericAlias' is deprecated and slated for removal in Python 3.17:DeprecationWarning",
|
|
91
|
+
]
|
|
113
92
|
|
|
114
93
|
[tool.mypy]
|
|
115
|
-
|
|
94
|
+
enable_error_code = [
|
|
95
|
+
"ignore-without-code",
|
|
96
|
+
"redundant-expr",
|
|
97
|
+
"truthy-bool",
|
|
98
|
+
]
|
|
116
99
|
warn_redundant_casts = true
|
|
100
|
+
warn_return_any = true
|
|
101
|
+
warn_no_return = true
|
|
102
|
+
warn_unreachable = true
|
|
117
103
|
warn_unused_configs = true
|
|
118
104
|
warn_unused_ignores = true
|
|
119
105
|
|
|
120
106
|
[[tool.mypy.overrides]]
|
|
121
107
|
ignore_missing_imports = true
|
|
122
108
|
module = [ "backoff.*" ]
|
|
109
|
+
|
|
110
|
+
[tool.uv]
|
|
111
|
+
prerelease = "allow"
|
|
112
|
+
preview = true
|
|
113
|
+
required-version = ">=0.5.19"
|
|
@@ -10,9 +10,9 @@ from urllib.parse import ParseResult, parse_qsl
|
|
|
10
10
|
from requests.auth import HTTPBasicAuth
|
|
11
11
|
from requests_cache import install_cache
|
|
12
12
|
from singer_sdk import RESTStream
|
|
13
|
-
from singer_sdk._singerlib import resolve_schema_references
|
|
14
13
|
from singer_sdk.helpers._typing import is_date_or_datetime_type
|
|
15
14
|
from singer_sdk.pagination import BaseHATEOASPaginator
|
|
15
|
+
from singer_sdk.singerlib import resolve_schema_references
|
|
16
16
|
|
|
17
17
|
from tap_belvo.openapi import load_openapi
|
|
18
18
|
|