Jinjat works with your existing dbt projects. Once you have a working dbt project, here are the steps:
1. Add Jinjat as a dependency
package.yml file in the main directory of your dbt project and add the following lines:
- git: https://github.com/jinjat-data/dbt_jinjat
Jinjat dbt package comes with a set of macros that lets you customize the API endpoints so it's optional if you just create endpoints that just execute static SQL queries. The most important macro is
jinjat.request(), which has information about the current request.
Execute following command to install Jinjat CLI:
pip install jinjat
Serve REST API
Now, start the Jinjat server in your root directory of your dbt project:
You should see logs similar to:
0 analysis found with `jinjat` config
INFO: Uvicorn running on http://127.0.0.1:8581
Now visit your API page, you should see the following message:
Congrats on deploying your first API!