# Macro to load json from file

**URL:** <https://discourse.getdbt.com/t/macro-to-load-json-from-file/5632>\
**Category:** Help\
**Created:** [December 14, 2022, 11:04pm UTC](https://discourse.getdbt.com/t/macro-to-load-json-from-file/5632 "2022-12-14T23:04:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mroy](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/mroy/32/3094_2.png) [@mroy](https://discourse.getdbt.com/u/mroy)\
**Post date:** [September 7, 2024, 7:08am UTC](https://discourse.getdbt.com/t/macro-to-load-json-from-file/5632/5 "2024-09-07T07:08:44Z")

</div>

@joellabes: In our case, we want to store large configurations _ **as code** _ within our dbt project. The configs contain metadata about our project, our database, and much more, which come in very handy to dynamically generate stuff in models, tests, macros, etc.

We currently store those configs in a macro ([see related thread here](https://discourse.getdbt.com/t/how-can-dbt-read-files-and-use-it-when-refresh-model/8908)), but it would be very nice to be able to store them in a YAML file instead (it would at least provide better IDE support to edit the file).

What would be even better is if dbt provided a way to store custom configs directly within the project itself, perhaps as a `custom_conf` key in `dbt_project.yml`. But currently that returns an error:

```auto
Runtime Error
  at path []: Additional properties are not allowed ('custom_conf' was unexpected)

```

---

_[View the full topic](https://discourse.getdbt.com/t/macro-to-load-json-from-file/5632)._
