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.3.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for dbt_run_api-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cbe749941f75ad20035bfd0948cad1564d6056dea1d421db7d71fd7fc96a0d7 |
|
MD5 | 7590f4a27f60882b0a2b7e203ded51b7 |
|
BLAKE2b-256 | d1ed8689d929a7ff06b438399a83bc4ac573bdd0d2716da429ee4f5011e2d90c |