update to include endpoint configs for LiveQuery

This commit is contained in:
Desmond Hui 2023-10-20 07:19:40 -07:00
parent 0fb9264232
commit 2e5ceca5db

View File

@ -126,6 +126,22 @@ LiveQuery is now available to be deployed into individual projects. For base fun
dbt run -s livequery_models.deploy.quicknode.quicknode_utils__quicknode_utils livequery_models.deploy.quicknode.quicknode_solana_nfts__quicknode_utils --vars '{UPDATE_UDFS_AND_SPS: true}'
```
### Configuring LiveQuery API endpoints
Individual projects have the option to point to a different LiveQuery API endpoint. To do so, modify your project's `dbt_projects.yml` to include the additional configurations within the project `vars`. If no configurations are specified, the default endpoints defined in the `livequery_models` package are used.
Below is a sample configuration. The `API_INTEGRATION` and `EXTERNAL_FUNCTION_URI` should point to the specific resources deployed for your project. The `ROLES` property is a list of Snowflake role names that are granted usage to the LiveQuery functions on deployment.
```
config:
# The keys correspond to dbt profiles and are case sensitive
dev:
API_INTEGRATION: AWS_MY_PROJECT_LIVE_QUERY
EXTERNAL_FUNCTION_URI: myproject.api.livequery.com/path-to-endpoint/
ROLES:
- INTERNAL_DEV
```
## Resources
* Learn more about dbt [in the docs](https://docs.getdbt.com/docs/introduction)