A small package
Project description
dbt-run-api
Once installed allows DBT commands to be sent via an api call.
Installation:
pip install dbt-run-api
Set up:
After installing the package ensure your DBT project is set up correctly with all needed profile variables either explicitly defined or available as ENV-variables.
Execution:
Run server while in the same directory as your `dbt_project.yml':
uvicorn dbt_run_api:app
Ensure you DBT project has access to the database you have defined in profile.yml
Send call to endpoint:
curl --header 'Content-Type: application/json' \
--request POST \
http://localhost:8000/dbt \
--data \
'{ "cmd": "run", "vars": {"test_var": "1", "date": "20240423"}, "target": "dev", "threads" : 8, "project-dir": "wab", "profiles-dir": "wab", "full-refresh": true}'
Notes:
- commands are passed without
dbt
at the start. All dbt commands should be valid e.grun
,test
, et cetera.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dbt_run_api-0.0.4.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for dbt_run_api-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02be38dbf0601205e059f4c4d9c086d38f092580caee09df98e5d57108e66ede |
|
MD5 | edc7b3ffb891639eefc0f6c9f5ad9396 |
|
BLAKE2b-256 | 37f5a53c41ece134bd81f6238a4f92b5d0a922aa75918f71edf31777caa645f2 |