Autoloading existing Dagster definitions
note
This guide covers using existing Dagster definitions with a dg-compatible project. To convert an existing project to use dg, see "Converting an existing project to use dg".
In projects created with create-dagster, all definitions are typically kept in the defs/ directory. However, if you've converted an existing project to use dg, you may have definitions located in various other modules. This guide will show you how to move these existing definitions into the defs directory in a way that will allow them to be automatically loaded.
Example project structure
Let's walk through an example of migrating your existing definitions, with a project that has the following structure:
tree
.
├── my_existing_project
│   ├── __init__.py
│   ├── analytics
│   │   ├── __init__.py
│   │   ├── assets.py