Open afranzi opened 6 months ago
Adding some examples about the credentials:
created related discussion here https://github.com/dbt-labs/dbt-adapters/discussions/259
IMO Adapter factory should allow user provided customized adapter class. this will open door to customization
PR https://github.com/dbt-labs/dbt-adapters/pull/261 implemented in this package https://github.com/memiiso/opendbt example https://github.com/memiiso/opendbt/blob/main/docs/EXAMPLES.md#execute-python-model-locally
using @available decorator makes the function available to jinja
Contributions
Link to the page on docs.getdbt.com requiring updates
Not sure if this would be part of the https://docs.getdbt.com/reference/project-configs/macro-paths Or in https://docs.getdbt.com/reference/dbt-jinja-functions
What part(s) of the page would you like to see updated?
The main idea would be adding documentation about the new incoming feature allowing DBT developers to inject their own python JINJA macros and filters in addition to the native ones, so developers can move complex jinja templating code to python and level up their dbt projects with more possibilities.
Some examples:
We can enable this behavior by defining the following ENV vars with the
path:instance
format.DBT_USER_DEFINED_MACROS
: Jinja MacrosDBT_USER_DEFINED_FILTERS
: Jinja FiltersAdditional information
This documentation would be based on this PR https://github.com/dbt-labs/dbt-common/pull/72.
See following example about how I've used it locally: