meltano-state-backend-snowflake 0.1.0__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.
- meltano_state_backend_snowflake-0.1.0/.github/CODEOWNERS +2 -0
- meltano_state_backend_snowflake-0.1.0/.github/semantic.yml +2 -0
- meltano_state_backend_snowflake-0.1.0/.github/workflows/release.yaml +36 -0
- meltano_state_backend_snowflake-0.1.0/.github/workflows/test.yaml +106 -0
- meltano_state_backend_snowflake-0.1.0/.gitignore +214 -0
- meltano_state_backend_snowflake-0.1.0/.pre-commit-config.yaml +43 -0
- meltano_state_backend_snowflake-0.1.0/.python-version +1 -0
- meltano_state_backend_snowflake-0.1.0/LICENSE +21 -0
- meltano_state_backend_snowflake-0.1.0/PKG-INFO +129 -0
- meltano_state_backend_snowflake-0.1.0/README.md +111 -0
- meltano_state_backend_snowflake-0.1.0/fixtures/project/.gitignore +3 -0
- meltano_state_backend_snowflake-0.1.0/fixtures/project/meltano.yml +15 -0
- meltano_state_backend_snowflake-0.1.0/pyproject.toml +206 -0
- meltano_state_backend_snowflake-0.1.0/src/meltano_state_backend_snowflake/__init__.py +1 -0
- meltano_state_backend_snowflake-0.1.0/src/meltano_state_backend_snowflake/backend.py +410 -0
- meltano_state_backend_snowflake-0.1.0/src/meltano_state_backend_snowflake/py.typed +0 -0
- meltano_state_backend_snowflake-0.1.0/tests/test_backend.py +601 -0
- meltano_state_backend_snowflake-0.1.0/uv.lock +2581 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
id-token: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build wheel and sdist
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
package_name: ${{ steps.baipp.outputs.package_name }}
|
|
16
|
+
package_version: ${{ steps.baipp.outputs.package_version }}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
19
|
+
- uses: hynek/build-and-inspect-python-package@c52c3a4710070b50470d903818a7b25115dcd076 # v2.13.0
|
|
20
|
+
id: baipp
|
|
21
|
+
|
|
22
|
+
publish:
|
|
23
|
+
name: Publish to PyPI
|
|
24
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
needs: [build]
|
|
27
|
+
environment:
|
|
28
|
+
name: pypi
|
|
29
|
+
url: https://pypi.org/project/${{ needs.build.outputs.package_name }}/${{ needs.build.outputs.package_version }}
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
33
|
+
with:
|
|
34
|
+
name: Packages
|
|
35
|
+
path: dist
|
|
36
|
+
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- src/**
|
|
8
|
+
- tests/**
|
|
9
|
+
- pyproject.toml
|
|
10
|
+
- uv.lock
|
|
11
|
+
- .github/workflows/test.yaml
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: [main]
|
|
14
|
+
paths:
|
|
15
|
+
- src/**
|
|
16
|
+
- tests/**
|
|
17
|
+
- pyproject.toml
|
|
18
|
+
- uv.lock
|
|
19
|
+
- .github/workflows/test.yaml
|
|
20
|
+
workflow_dispatch: {}
|
|
21
|
+
schedule:
|
|
22
|
+
# Run every 27 hours to avoid running at the same time every day
|
|
23
|
+
- cron: "40 12 * * 1-5"
|
|
24
|
+
|
|
25
|
+
concurrency:
|
|
26
|
+
cancel-in-progress: true
|
|
27
|
+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
28
|
+
|
|
29
|
+
env:
|
|
30
|
+
FORCE_COLOR: 1
|
|
31
|
+
|
|
32
|
+
jobs:
|
|
33
|
+
typing:
|
|
34
|
+
name: Typing
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
38
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
39
|
+
id: setup-python
|
|
40
|
+
- uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
|
|
41
|
+
- env:
|
|
42
|
+
UV_PYTHON: ${{ steps.setup-python.outputs.python-version }}
|
|
43
|
+
run: >
|
|
44
|
+
uvx
|
|
45
|
+
--with tox-uv
|
|
46
|
+
--with tox
|
|
47
|
+
tox -e types
|
|
48
|
+
|
|
49
|
+
test:
|
|
50
|
+
name: Pytest (Python ${{ matrix.python-version }}, ${{ matrix.os }})
|
|
51
|
+
runs-on: ${{ matrix.os }}
|
|
52
|
+
continue-on-error: ${{ matrix.python-version == '3.13' }}
|
|
53
|
+
strategy:
|
|
54
|
+
fail-fast: false
|
|
55
|
+
matrix:
|
|
56
|
+
os: ["ubuntu-latest"]
|
|
57
|
+
python-version:
|
|
58
|
+
- "3.9"
|
|
59
|
+
- "3.10"
|
|
60
|
+
- "3.11"
|
|
61
|
+
- "3.12"
|
|
62
|
+
- "3.13"
|
|
63
|
+
include:
|
|
64
|
+
- python-version: "3.13"
|
|
65
|
+
os: "windows-latest"
|
|
66
|
+
|
|
67
|
+
- python-version: "3.13"
|
|
68
|
+
os: "macos-latest"
|
|
69
|
+
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
72
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
73
|
+
id: setup-python
|
|
74
|
+
with:
|
|
75
|
+
python-version: ${{ matrix.python-version }}
|
|
76
|
+
allow-prereleases: true
|
|
77
|
+
- uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
|
|
78
|
+
- run: >
|
|
79
|
+
uvx
|
|
80
|
+
--with tox-uv
|
|
81
|
+
--with tox
|
|
82
|
+
tox -e ${{ matrix.python-version }}
|
|
83
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
84
|
+
with:
|
|
85
|
+
include-hidden-files: true
|
|
86
|
+
name: coverage-data-${{ matrix.os }}-py${{ matrix.python-version }}
|
|
87
|
+
path: ".coverage.*"
|
|
88
|
+
|
|
89
|
+
coverage:
|
|
90
|
+
name: Coverage
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
needs: test
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
95
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
96
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
97
|
+
with:
|
|
98
|
+
pattern: coverage-data-*
|
|
99
|
+
merge-multiple: true
|
|
100
|
+
- uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
|
|
101
|
+
- name: Combine coverage data and generate report
|
|
102
|
+
run: >
|
|
103
|
+
uvx
|
|
104
|
+
--with tox-uv
|
|
105
|
+
--with tox
|
|
106
|
+
tox -e coverage
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# Byte-compiled / optimized / DLL files
|
|
13
|
+
__pycache__/
|
|
14
|
+
*.py[codz]
|
|
15
|
+
*$py.class
|
|
16
|
+
|
|
17
|
+
# C extensions
|
|
18
|
+
*.so
|
|
19
|
+
|
|
20
|
+
# Distribution / packaging
|
|
21
|
+
.Python
|
|
22
|
+
build/
|
|
23
|
+
develop-eggs/
|
|
24
|
+
dist/
|
|
25
|
+
downloads/
|
|
26
|
+
eggs/
|
|
27
|
+
.eggs/
|
|
28
|
+
lib/
|
|
29
|
+
lib64/
|
|
30
|
+
parts/
|
|
31
|
+
sdist/
|
|
32
|
+
var/
|
|
33
|
+
wheels/
|
|
34
|
+
share/python-wheels/
|
|
35
|
+
*.egg-info/
|
|
36
|
+
.installed.cfg
|
|
37
|
+
*.egg
|
|
38
|
+
MANIFEST
|
|
39
|
+
|
|
40
|
+
# PyInstaller
|
|
41
|
+
# Usually these files are written by a python script from a template
|
|
42
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
43
|
+
*.manifest
|
|
44
|
+
*.spec
|
|
45
|
+
|
|
46
|
+
# Installer logs
|
|
47
|
+
pip-log.txt
|
|
48
|
+
pip-delete-this-directory.txt
|
|
49
|
+
|
|
50
|
+
# Unit test / coverage reports
|
|
51
|
+
htmlcov/
|
|
52
|
+
.tox/
|
|
53
|
+
.nox/
|
|
54
|
+
.coverage
|
|
55
|
+
.coverage.*
|
|
56
|
+
.cache
|
|
57
|
+
nosetests.xml
|
|
58
|
+
coverage.xml
|
|
59
|
+
*.cover
|
|
60
|
+
*.py.cover
|
|
61
|
+
.hypothesis/
|
|
62
|
+
.pytest_cache/
|
|
63
|
+
cover/
|
|
64
|
+
|
|
65
|
+
# Translations
|
|
66
|
+
*.mo
|
|
67
|
+
*.pot
|
|
68
|
+
|
|
69
|
+
# Django stuff:
|
|
70
|
+
*.log
|
|
71
|
+
local_settings.py
|
|
72
|
+
db.sqlite3
|
|
73
|
+
db.sqlite3-journal
|
|
74
|
+
|
|
75
|
+
# Flask stuff:
|
|
76
|
+
instance/
|
|
77
|
+
.webassets-cache
|
|
78
|
+
|
|
79
|
+
# Scrapy stuff:
|
|
80
|
+
.scrapy
|
|
81
|
+
|
|
82
|
+
# Sphinx documentation
|
|
83
|
+
docs/_build/
|
|
84
|
+
|
|
85
|
+
# PyBuilder
|
|
86
|
+
.pybuilder/
|
|
87
|
+
target/
|
|
88
|
+
|
|
89
|
+
# Jupyter Notebook
|
|
90
|
+
.ipynb_checkpoints
|
|
91
|
+
|
|
92
|
+
# IPython
|
|
93
|
+
profile_default/
|
|
94
|
+
ipython_config.py
|
|
95
|
+
|
|
96
|
+
# pyenv
|
|
97
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
98
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
99
|
+
# .python-version
|
|
100
|
+
|
|
101
|
+
# pipenv
|
|
102
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
103
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
104
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
105
|
+
# install all needed dependencies.
|
|
106
|
+
#Pipfile.lock
|
|
107
|
+
|
|
108
|
+
# UV
|
|
109
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
110
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
111
|
+
# commonly ignored for libraries.
|
|
112
|
+
#uv.lock
|
|
113
|
+
|
|
114
|
+
# poetry
|
|
115
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
116
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
117
|
+
# commonly ignored for libraries.
|
|
118
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
119
|
+
#poetry.lock
|
|
120
|
+
#poetry.toml
|
|
121
|
+
|
|
122
|
+
# pdm
|
|
123
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
124
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
125
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
126
|
+
#pdm.lock
|
|
127
|
+
#pdm.toml
|
|
128
|
+
.pdm-python
|
|
129
|
+
.pdm-build/
|
|
130
|
+
|
|
131
|
+
# pixi
|
|
132
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
133
|
+
#pixi.lock
|
|
134
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
135
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
136
|
+
.pixi
|
|
137
|
+
|
|
138
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
139
|
+
__pypackages__/
|
|
140
|
+
|
|
141
|
+
# Celery stuff
|
|
142
|
+
celerybeat-schedule
|
|
143
|
+
celerybeat.pid
|
|
144
|
+
|
|
145
|
+
# SageMath parsed files
|
|
146
|
+
*.sage.py
|
|
147
|
+
|
|
148
|
+
# Environments
|
|
149
|
+
.env
|
|
150
|
+
.envrc
|
|
151
|
+
.venv
|
|
152
|
+
env/
|
|
153
|
+
venv/
|
|
154
|
+
ENV/
|
|
155
|
+
env.bak/
|
|
156
|
+
venv.bak/
|
|
157
|
+
|
|
158
|
+
# Spyder project settings
|
|
159
|
+
.spyderproject
|
|
160
|
+
.spyproject
|
|
161
|
+
|
|
162
|
+
# Rope project settings
|
|
163
|
+
.ropeproject
|
|
164
|
+
|
|
165
|
+
# mkdocs documentation
|
|
166
|
+
/site
|
|
167
|
+
|
|
168
|
+
# mypy
|
|
169
|
+
.mypy_cache/
|
|
170
|
+
.dmypy.json
|
|
171
|
+
dmypy.json
|
|
172
|
+
|
|
173
|
+
# Pyre type checker
|
|
174
|
+
.pyre/
|
|
175
|
+
|
|
176
|
+
# pytype static type analyzer
|
|
177
|
+
.pytype/
|
|
178
|
+
|
|
179
|
+
# Cython debug symbols
|
|
180
|
+
cython_debug/
|
|
181
|
+
|
|
182
|
+
# PyCharm
|
|
183
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
184
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
185
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
186
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
187
|
+
#.idea/
|
|
188
|
+
|
|
189
|
+
# Abstra
|
|
190
|
+
# Abstra is an AI-powered process automation framework.
|
|
191
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
192
|
+
# Learn more at https://abstra.io/docs
|
|
193
|
+
.abstra/
|
|
194
|
+
|
|
195
|
+
# Visual Studio Code
|
|
196
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
197
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
198
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
199
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
200
|
+
# .vscode/
|
|
201
|
+
|
|
202
|
+
# Ruff stuff:
|
|
203
|
+
.ruff_cache/
|
|
204
|
+
|
|
205
|
+
# PyPI configuration file
|
|
206
|
+
.pypirc
|
|
207
|
+
|
|
208
|
+
# Marimo
|
|
209
|
+
marimo/_static/
|
|
210
|
+
marimo/_lsp/
|
|
211
|
+
__marimo__/
|
|
212
|
+
|
|
213
|
+
# Streamlit
|
|
214
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autofix_commit_msg: "chore: Fix lint errors"
|
|
3
|
+
autofix_prs: true
|
|
4
|
+
autoupdate_branch: main
|
|
5
|
+
autoupdate_commit_msg: "chore: Update pre-commit hooks"
|
|
6
|
+
autoupdate_schedule: monthly
|
|
7
|
+
submodules: false
|
|
8
|
+
skip:
|
|
9
|
+
- uv-lock
|
|
10
|
+
|
|
11
|
+
repos:
|
|
12
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
13
|
+
rev: v5.0.0
|
|
14
|
+
hooks:
|
|
15
|
+
- id: check-merge-conflict
|
|
16
|
+
- id: check-toml
|
|
17
|
+
- id: end-of-file-fixer
|
|
18
|
+
- id: no-commit-to-branch
|
|
19
|
+
args: [--branch, main]
|
|
20
|
+
- id: trailing-whitespace
|
|
21
|
+
|
|
22
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
23
|
+
rev: v0.12.3
|
|
24
|
+
hooks:
|
|
25
|
+
- id: ruff-check
|
|
26
|
+
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
|
|
27
|
+
- id: ruff-format
|
|
28
|
+
|
|
29
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
30
|
+
rev: 0.33.2
|
|
31
|
+
hooks:
|
|
32
|
+
- id: check-github-workflows
|
|
33
|
+
- id: check-meltano
|
|
34
|
+
- id: check-renovate
|
|
35
|
+
language: python
|
|
36
|
+
additional_dependencies:
|
|
37
|
+
- pyjson5==1.6.8
|
|
38
|
+
|
|
39
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
40
|
+
rev: "0.7.21"
|
|
41
|
+
hooks:
|
|
42
|
+
- id: uv-lock
|
|
43
|
+
- id: uv-sync
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Meltano
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: meltano-state-backend-snowflake
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Meltano State Backend for Snowflake
|
|
5
|
+
Author-email: Taylor Murphy <taylor@arch.dev>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Requires-Dist: meltano>=3.7
|
|
16
|
+
Requires-Dist: snowflake-connector-python<4,>=3
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# `meltano-state-backend-snowflake`
|
|
20
|
+
|
|
21
|
+
[](https://pypi.org/project/meltano-state-backend-snowflake)
|
|
22
|
+
[](https://pypi.org/project/meltano-state-backend-snowflake)
|
|
23
|
+
|
|
24
|
+
This is a [Meltano][meltano] extension that provides a [Snowflake][snowflake] [state backend][state-backend].
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
This package needs to be installed in the same Python environment as Meltano.
|
|
29
|
+
|
|
30
|
+
### From GitHub
|
|
31
|
+
|
|
32
|
+
#### With [uv]
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
uv tool install --with meltano-state-backend-snowflake meltano
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### With [pipx]
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pipx install meltano
|
|
42
|
+
pipx inject meltano 'meltano-state-backend-snowflake
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
To store state in Snowflake, set the `state_backend.uri` setting to `snowflake://<user>:<password>@<account>/<database>/<schema>`.
|
|
48
|
+
|
|
49
|
+
State will be stored in two tables that Meltano will create automatically:
|
|
50
|
+
- `meltano_state` - Stores the actual state data
|
|
51
|
+
- `meltano_state_locks` - Manages concurrency locks
|
|
52
|
+
|
|
53
|
+
To authenticate to Snowflake, you'll need to provide:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
state_backend:
|
|
57
|
+
uri: snowflake://my_user:my_password@my_account/my_database/my_schema
|
|
58
|
+
snowflake:
|
|
59
|
+
warehouse: my_warehouse # Required: The compute warehouse to use
|
|
60
|
+
role: my_role # Optional: The role to use for the connection
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Alternatively, you can provide credentials via individual settings:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
state_backend:
|
|
67
|
+
uri: snowflake://my_account/my_database/my_schema
|
|
68
|
+
snowflake:
|
|
69
|
+
account: my_account
|
|
70
|
+
user: my_user
|
|
71
|
+
password: my_password
|
|
72
|
+
warehouse: my_warehouse
|
|
73
|
+
database: my_database
|
|
74
|
+
schema: my_schema # Defaults to PUBLIC if not specified
|
|
75
|
+
role: my_role # Optional
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
#### Connection Parameters
|
|
79
|
+
|
|
80
|
+
- **account**: Your Snowflake account identifier (e.g., `myorg-account123`)
|
|
81
|
+
- **user**: The username for authentication
|
|
82
|
+
- **password**: The password for authentication
|
|
83
|
+
- **warehouse**: The compute warehouse to use (required)
|
|
84
|
+
- **database**: The database where state will be stored
|
|
85
|
+
- **schema**: The schema where state tables will be created (defaults to PUBLIC)
|
|
86
|
+
- **role**: Optional role to use for the connection
|
|
87
|
+
|
|
88
|
+
#### Security Considerations
|
|
89
|
+
|
|
90
|
+
When storing credentials:
|
|
91
|
+
- Use environment variables for sensitive values in production
|
|
92
|
+
- Consider using Snowflake key-pair authentication (future enhancement)
|
|
93
|
+
- Ensure the user has CREATE TABLE, INSERT, UPDATE, DELETE, and SELECT privileges
|
|
94
|
+
|
|
95
|
+
Example using environment variables:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
export MELTANO_STATE_BACKEND_SNOWFLAKE_PASSWORD='my_secure_password'
|
|
99
|
+
meltano config meltano set state_backend.uri 'snowflake://my_user@my_account/my_database'
|
|
100
|
+
meltano config meltano set state_backend.snowflake.warehouse 'my_warehouse'
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
### Setup
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
uv sync
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Run tests
|
|
112
|
+
|
|
113
|
+
Run all tests, type checks, linting, and coverage:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
uvx -with tox-uv tox run-parallel
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Bump the version
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
uv version --bump <type>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
[meltano]: https://meltano.com
|
|
126
|
+
[snowflake]: https://www.snowflake.com/
|
|
127
|
+
[state-backend]: https://docs.meltano.com/concepts/state_backends
|
|
128
|
+
[pipx]: https://github.com/pypa/pipx
|
|
129
|
+
[uv]: https://docs.astral.sh/uv
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# `meltano-state-backend-snowflake`
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/meltano-state-backend-snowflake)
|
|
4
|
+
[](https://pypi.org/project/meltano-state-backend-snowflake)
|
|
5
|
+
|
|
6
|
+
This is a [Meltano][meltano] extension that provides a [Snowflake][snowflake] [state backend][state-backend].
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
This package needs to be installed in the same Python environment as Meltano.
|
|
11
|
+
|
|
12
|
+
### From GitHub
|
|
13
|
+
|
|
14
|
+
#### With [uv]
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv tool install --with meltano-state-backend-snowflake meltano
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
#### With [pipx]
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pipx install meltano
|
|
24
|
+
pipx inject meltano 'meltano-state-backend-snowflake
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Configuration
|
|
28
|
+
|
|
29
|
+
To store state in Snowflake, set the `state_backend.uri` setting to `snowflake://<user>:<password>@<account>/<database>/<schema>`.
|
|
30
|
+
|
|
31
|
+
State will be stored in two tables that Meltano will create automatically:
|
|
32
|
+
- `meltano_state` - Stores the actual state data
|
|
33
|
+
- `meltano_state_locks` - Manages concurrency locks
|
|
34
|
+
|
|
35
|
+
To authenticate to Snowflake, you'll need to provide:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
state_backend:
|
|
39
|
+
uri: snowflake://my_user:my_password@my_account/my_database/my_schema
|
|
40
|
+
snowflake:
|
|
41
|
+
warehouse: my_warehouse # Required: The compute warehouse to use
|
|
42
|
+
role: my_role # Optional: The role to use for the connection
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Alternatively, you can provide credentials via individual settings:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
state_backend:
|
|
49
|
+
uri: snowflake://my_account/my_database/my_schema
|
|
50
|
+
snowflake:
|
|
51
|
+
account: my_account
|
|
52
|
+
user: my_user
|
|
53
|
+
password: my_password
|
|
54
|
+
warehouse: my_warehouse
|
|
55
|
+
database: my_database
|
|
56
|
+
schema: my_schema # Defaults to PUBLIC if not specified
|
|
57
|
+
role: my_role # Optional
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Connection Parameters
|
|
61
|
+
|
|
62
|
+
- **account**: Your Snowflake account identifier (e.g., `myorg-account123`)
|
|
63
|
+
- **user**: The username for authentication
|
|
64
|
+
- **password**: The password for authentication
|
|
65
|
+
- **warehouse**: The compute warehouse to use (required)
|
|
66
|
+
- **database**: The database where state will be stored
|
|
67
|
+
- **schema**: The schema where state tables will be created (defaults to PUBLIC)
|
|
68
|
+
- **role**: Optional role to use for the connection
|
|
69
|
+
|
|
70
|
+
#### Security Considerations
|
|
71
|
+
|
|
72
|
+
When storing credentials:
|
|
73
|
+
- Use environment variables for sensitive values in production
|
|
74
|
+
- Consider using Snowflake key-pair authentication (future enhancement)
|
|
75
|
+
- Ensure the user has CREATE TABLE, INSERT, UPDATE, DELETE, and SELECT privileges
|
|
76
|
+
|
|
77
|
+
Example using environment variables:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
export MELTANO_STATE_BACKEND_SNOWFLAKE_PASSWORD='my_secure_password'
|
|
81
|
+
meltano config meltano set state_backend.uri 'snowflake://my_user@my_account/my_database'
|
|
82
|
+
meltano config meltano set state_backend.snowflake.warehouse 'my_warehouse'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
### Setup
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
uv sync
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Run tests
|
|
94
|
+
|
|
95
|
+
Run all tests, type checks, linting, and coverage:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
uvx -with tox-uv tox run-parallel
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Bump the version
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
uv version --bump <type>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
[meltano]: https://meltano.com
|
|
108
|
+
[snowflake]: https://www.snowflake.com/
|
|
109
|
+
[state-backend]: https://docs.meltano.com/concepts/state_backends
|
|
110
|
+
[pipx]: https://github.com/pypa/pipx
|
|
111
|
+
[uv]: https://docs.astral.sh/uv
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
default_environment: dev
|
|
3
|
+
project_id: 1ec76bd8-4499-4bad-a974-b27225d75f12
|
|
4
|
+
send_anonymous_usage_stats: false
|
|
5
|
+
environments:
|
|
6
|
+
- name: dev
|
|
7
|
+
state_backend:
|
|
8
|
+
uri: snowflake://my-account
|
|
9
|
+
snowflake:
|
|
10
|
+
warehouse: test_warehouse
|
|
11
|
+
database: test_database
|
|
12
|
+
schema: test_schema
|
|
13
|
+
role: test_role
|
|
14
|
+
user: test_user
|
|
15
|
+
password: test_password
|