Repository: dbt-labs/dbt-core
Pull request: Add back `depends_on` for seeds - only `macros`, never `nodes`
resolves #6806

### Description

- Seeds can have pre/post hooks that call macros, and we need to track these in the seed's `depends_on`
- If those macros try to take a dependency on another node, this is an unsupported anti-pattern — raise an explicit error

I'm not thrilled with this approach, which requires a bit of mucking with magic methods, but it does keep the changes fairly self-contained.

If we do move forward with this approach, we'll need to:
- backport to `1.4.latest`
- (!) update the [v8 manifest schema definition](https://schemas.getdbt.com/dbt/manifest/v8/index.html#tab-pane_nodes_additionalProperties_oneOf_i8)

### Checklist

- [x] I have read [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md) and understand what's expected of me
- [x] I have signed the [CLA](https://docs.getdbt.com/docs/contributor-license-agreements)
- [x] I have run this code in development and it appears to resolve the stated issue
- [x] This PR includes tests, or tests are not required/relevant for this PR
- ~I have [opened an issue to add/update docs](https://github.com/dbt-labs/docs.getdbt.com/issues/new/choose), or docs changes are not required/relevant for this PR~
- [x] I have run `changie new` to [create a changelog entry](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-a-changelog-entry)


Problem statement:
[CT-1984] [Regression] In v1.4, seeds with hooks calling macros raise an AttributeError
### Is this a regression in a recent version of dbt-core?

- [X] I believe this is a regression in dbt-core functionality
- [X] I have searched the existing issues, and I could not find an existing issue for this regression

### Current Behavior

After trying to upgrade both dbt-utils, dbt-core and dbt-snowflake to 1.0.0, 1.4.1 and 1.4.0 respectively, my project no-longer compiles. 

Downgrading just the dbt parts (core and snowflake) and it compiles. 


### Expected/Previous Behavior

I expect that after following migration guides etc. that the project will compile. 

It compiles as normal if I downgrade dbt to previous version (1.3.2)


### Steps To Reproduce

This is not easily reproducible. It did not affect a new project, just a current one. Something in 1.4.1 is different in the fact that downgrading dbt, the project does compile.

### Relevant log output

```shell
dbt compile  
18:42:38  Running with dbt=1.4.1
18:42:54  Encountered an error:
'SeedNode' object has no attribute 'depends_on'
18:42:54  Traceback (most recent call last):
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/main.py", line 135, in main
    results, succeeded = handle_and_check(args)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/main.py", line 198, in handle_and_check
    task, res = run_from_args(parsed)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/main.py", line 245, in run_from_args
    results = task.run()
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/task/runnable.py", line 454, in run
    self._runtime_initialize()
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/task/runnable.py", line 165, in _runtime_initialize
    super()._runtime_initialize()
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/task/runnable.py", line 94, in _runtime_initialize
    self.load_manifest()
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/task/runnable.py", line 81, in load_manifest
    self.manifest = ManifestLoader.get_full_manifest(self.config)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/parser/manifest.py", line 203, in get_full_manifest
    manifest = loader.load()
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/parser/manifest.py", line 339, in load
    self.parse_project(
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/parser/manifest.py", line 467, in parse_project
    parser.parse_file(block)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/parser/base.py", line 425, in parse_file
    self.parse_node(file_block)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/parser/base.py", line 386, in parse_node
    self.render_update(node, config)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/parser/base.py", line 363, in render_update
    self.update_parsed_node_config(node, config, context=context)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/parser/base.py", line 336, in update_parsed_node_config
    get_rendered(hook.sql, context, parsed_node, capture_macros=True)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/clients/jinja.py", line 590, in get_rendered
    return render_template(template, ctx, node)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/clients/jinja.py", line 545, in render_template
    return template.render(ctx)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
    return __context.call(__obj, *args, **kwargs)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/clients/jinja.py", line 328, in __call__
    with self.track_call():
  File "/Users/stephen.herron/.pyenv/versions/3.10.7/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/Users/stephen.herron/.local/share/virtualenvs/snowflake_dbt-aabVNRJU/lib/python3.10/site-packages/dbt/clients/jinja.py", line 319, in track_call
    self.node.depends_on.add_macro(unique_id)
AttributeError: 'SeedNode' object has no attribute 'depends_on'
```

### Environment
- OS: MacOS
- Python: 3.10.7
- dbt-core (working version): 1.3.2
- dbt-core (regression version): 1.4.1


### Which database adapter are you using with dbt?

snowflake

### Additional Context

This must be something weird with my project. Out of interest I created a new project in the same virtual env  and that worked.

I will start trying to copy over things to see what is causing the breakage, starting with seeds as the error mentioned `SeedNode`

Hints from issue discussion:
Think I narrowed it down..

There are seeds in my project that have a post-hook that calls a macro.

e.g.

```
seeds:
  quote_columns: false
   my_project:
     reporting:
       +schema: reporting
       +post-hook:
         - "{{ apply_masking_policy('models') }}"
```

Works ok on previous? Need to try a simpler macro..

I tried changing the post-hook to some generic sql, i.e. "select 1 as test" and the project compiled.

edit: does not work with a `my_silly_macro()` either.


Thanks for opening @rudeb0y !

Agreed that you narrowed it down, and I was able to reproduce the same error using dbt-core==1.4.1 and dbt-snowflake==1.40

Here's what I did to reproduce:

`dbt_project.yaml`
```yaml
name: "my_dbt_project"
version: "1.0.0"
config-version: 2
profile: "my_profile"

seeds:
  +post-hook:
    - "{{ my_silly_macro() }}"
```

`seeds/dummy_seed.csv`
```csv
id
1
```

`macros/my_silly_macro.sql`
```sql
{% macro my_silly_macro() %}
select 1 as test
{% endmacro %}
```

Then run:
```shell
dbt seed -s dummy_seed
```

Then I got the same error as you:
```
AttributeError: 'SeedNode' object has no attribute 'depends_on'
```
Does this remove the `depends_on` attr from seeds? 

https://github.com/dbt-labs/dbt-core/blob/52be5ffaa6688d28234e1871f9707f1bb2b2b311/core/dbt/contracts/util.py#L253
In v1.4, we removed dependency-related attributes from seeds, since they can't actually use `ref`/`source`/`metric`, or call macros directly, in their definition (CSV). That included `depends_on`, `refs`, `sources`, and `metrics`.

_However_, it's true that seeds _can_ have pre- and post-hooks. Those hooks can call macros! It's important we track those dependencies for `dbt seed --select state:modified.macros` ([docs](https://docs.getdbt.com/reference/node-selection/methods#the-state-method)). That's what we're trying to do here, and it's where the error is surfacing:

https://github.com/dbt-labs/dbt-core/blob/b2ea2b8b256e5db1da0b712dfedd7973e1e50a37/core/dbt/clients/jinja.py#L308-L324

---

_Can those macros also call `ref`/`source`/`metric`???_

At first glance, yes. In practice, I sure hope not.

If I try this in `1.3.latest`, adapting @dbeatty10's reproduction case above, it's true that it ""works"":
```sql
{% macro my_silly_macro() %}
select * from {{ ref('my_model') }}
{% endmacro %}
```
I run `dbt seed`, it succeeds:
```
[0m11:36:42.191361 [debug] [Thread-1  ]: On seed.test.seed: 
          insert into "jerco"."dbt_jcohen"."seed" ("id") values
          (%s)
      ...
[0m11:36:42.192621 [debug] [Thread-1  ]: SQL status: INSERT 0 1 in 0.0 seconds
[0m11:36:42.197663 [debug] [Thread-1  ]: Writing runtime SQL for node "seed.test.seed"
[0m11:36:42.212489 [debug] [Thread-1  ]: Using postgres connection "seed.test.seed"
[0m11:36:42.212629 [debug] [Thread-1  ]: On seed.test.seed: /* {"app": "dbt", "dbt_version": "1.3.2", "profile_name": "garage-postgres", "target_name": "dev", "node_id": "seed.test.seed"} */

        select * from "jerco"."dbt_jcohen"."my_model"
```
In `manifest.json`:
```json
...
    "seed.test.seed": {
      "resource_type": "seed",
      "depends_on": {
        "macros": [
          "macro.test.my_silly_macro"
        ],
        "nodes": [
          "model.test.my_model"
        ]
      },
...
```

<img width="562" alt="Screenshot 2023-02-03 at 12 38 41" src="https://user-images.githubusercontent.com/13897643/216594304-d6470cd8-48bd-4ec3-ae8c-1a8e3a5fbbc6.png">

**I hate this.** I'm willing to call it an unsupported & undocumented anti-pattern.

### Proposed resolution

- Add `depends_on` back to seeds, but _only_ `MacroDependsOn` (the same that macros have)
- Raise an explicit error if a seed tries to take a dependency on another resource, via its pre/post hook

I can open a PR for this, with the (bad) code I wrote while trying to understand the codepaths in play—but I definitely want to get @gshank's blessing before moving forward with this approach.

Commit message: Be less magical

Patch to review:
diff --git a/.changes/unreleased/Fixes-20230203-135557.yaml b/.changes/unreleased/Fixes-20230203-135557.yaml
new file mode 100644
index 00000000000..c7b5c3ec265
--- /dev/null
+++ b/.changes/unreleased/Fixes-20230203-135557.yaml
@@ -0,0 +1,6 @@
+kind: Fixes
+body: Readd depends_on.macros to SeedNode, to support seeds with hooks calling macros
+time: 2023-02-03T13:55:57.853715+01:00
+custom:
+  Author: jtcohen6
+  Issue: "6806"
diff --git a/core/dbt/contracts/graph/nodes.py b/core/dbt/contracts/graph/nodes.py
index a299f5e9b12..b5847da957f 100644
--- a/core/dbt/contracts/graph/nodes.py
+++ b/core/dbt/contracts/graph/nodes.py
@@ -37,6 +37,7 @@
 from dbt.contracts.util import Replaceable, AdditionalPropertiesMixin
 from dbt.events.proto_types import NodeInfo
 from dbt.events.functions import warn_or_error
+from dbt.exceptions import ParsingError
 from dbt.events.types import (
     SeedIncreased,
     SeedExceedsLimitSamePath,
@@ -482,6 +483,7 @@ class SeedNode(ParsedNode):  # No SQLDefaults!
     # seeds need the root_path because the contents are not loaded initially
     # and we need the root_path to load the seed later
     root_path: Optional[str] = None
+    depends_on: MacroDependsOn = field(default_factory=MacroDependsOn)
 
     def same_seeds(self, other: "SeedNode") -> bool:
         # for seeds, we check the hashes. If the hashes are different types,
@@ -523,6 +525,39 @@ def empty(self):
         """Seeds are never empty"""
         return False
 
+    def disallow_implicit_dependencies(self):
+        """Disallow seeds to take implicit upstream dependencies via pre/post hooks"""
+        # Seeds are root nodes in the DAG. They cannot depend on other nodes.
+        # However, it's possible to define pre- and post-hooks on seeds, and for those
+        # hooks to include {{ ref(...) }}. This worked in previous versions, but it
+        # was never officially documented or supported behavior. Let's raise an explicit error,
+        # which will surface during parsing if the user has written code such that we attempt
+        # to capture & record a ref/source/metric call on the SeedNode.
+        # For more details: https://github.com/dbt-labs/dbt-core/issues/6806
+        hooks = [f'- pre_hook: "{hook.sql}"' for hook in self.config.pre_hook] + [
+            f'- post_hook: "{hook.sql}"' for hook in self.config.post_hook
+        ]
+        hook_list = "\n".join(hooks)
+        message = f"""
+Seeds cannot depend on other nodes. dbt detected a seed with a pre- or post-hook
+that calls 'ref', 'source', or 'metric', either directly or indirectly via other macros.
+
+Error raised for '{self.unique_id}', which has these hooks defined: \n{hook_list}
+        """
+        raise ParsingError(message)
+
+    @property
+    def refs(self):
+        self.disallow_implicit_dependencies()
+
+    @property
+    def sources(self):
+        self.disallow_implicit_dependencies()
+
+    @property
+    def metrics(self):
+        self.disallow_implicit_dependencies()
+
     def same_body(self, other) -> bool:
         return self.same_seeds(other)
 
@@ -532,7 +567,7 @@ def depends_on_nodes(self):
 
     @property
     def depends_on_macros(self):
-        return []
+        return self.depends_on.macros
 
     @property
     def extra_ctes(self):
diff --git a/core/dbt/contracts/util.py b/core/dbt/contracts/util.py
index d8b166b1d93..2f17f0e5e3b 100644
--- a/core/dbt/contracts/util.py
+++ b/core/dbt/contracts/util.py
@@ -250,7 +250,6 @@ def upgrade_seed_content(node_content):
         "refs",
         "sources",
         "metrics",
-        "depends_on",
         "compiled_path",
         "compiled",
         "compiled_code",
@@ -260,6 +259,9 @@ def upgrade_seed_content(node_content):
     ):
         if attr_name in node_content:
             del node_content[attr_name]
+        # In v1.4, we switched SeedNode.depends_on from DependsOn to MacroDependsOn
+        if "depends_on" in node_content and "nodes" in node_content["depends_on"].keys():
+            del node_content["depends_on"]["nodes"]
 
 
 def upgrade_manifest_json(manifest: dict) -> dict:
diff --git a/schemas/dbt/manifest/v8.json b/schemas/dbt/manifest/v8.json
index d92dc46b79c..16b6bfe304c 100644
--- a/schemas/dbt/manifest/v8.json
+++ b/schemas/dbt/manifest/v8.json
@@ -185,12 +185,12 @@
         },
         "dbt_version": {
           "type": "string",
-          "default": "1.4.0a1"
+          "default": "1.5.0a1"
         },
         "generated_at": {
           "type": "string",
           "format": "date-time",
-          "default": "2022-12-13T03:30:15.966964Z"
+          "default": "2023-02-06T14:19:58.594083Z"
         },
         "invocation_id": {
           "oneOf": [
@@ -201,7 +201,7 @@
               "type": "null"
             }
           ],
-          "default": "4f2b967b-7e02-46de-a7ea-268a05e3fab1"
+          "default": "1dc2da24-242b-43e7-a6c8-0385fcd8ff50"
         },
         "env": {
           "type": "object",
@@ -262,7 +262,6 @@
     "AnalysisNode": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -276,7 +275,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -400,7 +406,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.970579
+          "default": 1675693198.596908
         },
         "config_call_dict": {
           "type": "object",
@@ -498,7 +504,7 @@
         }
       },
       "additionalProperties": false,
-      "description": "AnalysisNode(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
+      "description": "AnalysisNode(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
     },
     "FileHash": {
       "type": "object",
@@ -811,7 +817,6 @@
     "SingularTestNode": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -825,7 +830,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -941,7 +953,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.973521
+          "default": 1675693198.598933
         },
         "config_call_dict": {
           "type": "object",
@@ -1039,7 +1051,7 @@
         }
       },
       "additionalProperties": false,
-      "description": "SingularTestNode(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.TestConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
+      "description": "SingularTestNode(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.TestConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
     },
     "TestConfig": {
       "type": "object",
@@ -1156,7 +1168,6 @@
     "HookNode": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -1170,7 +1181,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -1294,7 +1312,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.975156
+          "default": 1675693198.60002
         },
         "config_call_dict": {
           "type": "object",
@@ -1402,12 +1420,11 @@
         }
       },
       "additionalProperties": false,
-      "description": "HookNode(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None, index: Optional[int] = None)"
+      "description": "HookNode(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None, index: Optional[int] = None)"
     },
     "ModelNode": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -1421,7 +1438,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -1545,7 +1569,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.976732
+          "default": 1675693198.601195
         },
         "config_call_dict": {
           "type": "object",
@@ -1643,12 +1667,11 @@
         }
       },
       "additionalProperties": false,
-      "description": "ModelNode(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
+      "description": "ModelNode(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
     },
     "RPCNode": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -1662,7 +1685,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -1786,7 +1816,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.978195
+          "default": 1675693198.6022851
         },
         "config_call_dict": {
           "type": "object",
@@ -1884,12 +1914,11 @@
         }
       },
       "additionalProperties": false,
-      "description": "RPCNode(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
+      "description": "RPCNode(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
     },
     "SqlNode": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -1903,7 +1932,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -2027,7 +2063,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.979718
+          "default": 1675693198.603358
         },
         "config_call_dict": {
           "type": "object",
@@ -2125,13 +2161,12 @@
         }
       },
       "additionalProperties": false,
-      "description": "SqlNode(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
+      "description": "SqlNode(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.NodeConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
     },
     "GenericTestNode": {
       "type": "object",
       "required": [
         "test_metadata",
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -2148,7 +2183,14 @@
           "$ref": "#/definitions/TestMetadata"
         },
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -2264,7 +2306,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.981434
+          "default": 1675693198.60465
         },
         "config_call_dict": {
           "type": "object",
@@ -2382,7 +2424,7 @@
         }
       },
       "additionalProperties": false,
-      "description": "GenericTestNode(test_metadata: dbt.contracts.graph.nodes.TestMetadata, database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.TestConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None, column_name: Optional[str] = None, file_key_name: Optional[str] = None)"
+      "description": "GenericTestNode(test_metadata: dbt.contracts.graph.nodes.TestMetadata, database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.TestConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None, column_name: Optional[str] = None, file_key_name: Optional[str] = None)"
     },
     "TestMetadata": {
       "type": "object",
@@ -2414,7 +2456,6 @@
     "SnapshotNode": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -2429,7 +2470,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -2529,7 +2577,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.984685
+          "default": 1675693198.606718
         },
         "config_call_dict": {
           "type": "object",
@@ -2627,7 +2675,7 @@
         }
       },
       "additionalProperties": false,
-      "description": "SnapshotNode(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.SnapshotConfig, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
+      "description": "SnapshotNode(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.SnapshotConfig, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', language: str = 'sql', refs: List[List[str]] = <factory>, sources: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, compiled_path: Optional[str] = None, compiled: bool = False, compiled_code: Optional[str] = None, extra_ctes_injected: bool = False, extra_ctes: List[dbt.contracts.graph.nodes.InjectedCTE] = <factory>, _pre_injected_sql: Optional[str] = None)"
     },
     "SnapshotConfig": {
       "type": "object",
@@ -2837,7 +2885,6 @@
     "SeedNode": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -2851,7 +2898,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -2976,7 +3030,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.987447
+          "default": 1675693198.608646
         },
         "config_call_dict": {
           "type": "object",
@@ -3005,10 +3059,16 @@
               "type": "null"
             }
           ]
+        },
+        "depends_on": {
+          "$ref": "#/definitions/MacroDependsOn",
+          "default": {
+            "macros": []
+          }
         }
       },
       "additionalProperties": false,
-      "description": "SeedNode(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.SeedConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', root_path: Optional[str] = None)"
+      "description": "SeedNode(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], alias: str, checksum: dbt.contracts.files.FileHash, config: dbt.contracts.graph.model_config.SeedConfig = <factory>, _event_status: Dict[str, Any] = <factory>, tags: List[str] = <factory>, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, build_path: Optional[str] = None, deferred: bool = False, unrendered_config: Dict[str, Any] = <factory>, created_at: float = <factory>, config_call_dict: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, raw_code: str = '', root_path: Optional[str] = None, depends_on: dbt.contracts.graph.nodes.MacroDependsOn = <factory>)"
     },
     "SeedConfig": {
       "type": "object",
@@ -3175,10 +3235,24 @@
       "additionalProperties": true,
       "description": "SeedConfig(_extra: Dict[str, Any] = <factory>, enabled: bool = True, alias: Optional[str] = None, schema: Optional[str] = None, database: Optional[str] = None, tags: Union[List[str], str] = <factory>, meta: Dict[str, Any] = <factory>, materialized: str = 'seed', incremental_strategy: Optional[str] = None, persist_docs: Dict[str, Any] = <factory>, post_hook: List[dbt.contracts.graph.model_config.Hook] = <factory>, pre_hook: List[dbt.contracts.graph.model_config.Hook] = <factory>, quoting: Dict[str, Any] = <factory>, column_types: Dict[str, Any] = <factory>, full_refresh: Optional[bool] = None, unique_key: Union[str, List[str], NoneType] = None, on_schema_change: Optional[str] = 'ignore', grants: Dict[str, Any] = <factory>, packages: List[str] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, quote_columns: Optional[bool] = None)"
     },
+    "MacroDependsOn": {
+      "type": "object",
+      "required": [],
+      "properties": {
+        "macros": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "default": []
+        }
+      },
+      "additionalProperties": false,
+      "description": "Used only in the Macro class"
+    },
     "SourceDefinition": {
       "type": "object",
       "required": [
-        "database",
         "schema",
         "name",
         "resource_type",
@@ -3194,7 +3268,14 @@
       ],
       "properties": {
         "database": {
-          "type": "string"
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
         },
         "schema": {
           "type": "string"
@@ -3335,11 +3416,11 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.989922
+          "default": 1675693198.610521
         }
       },
       "additionalProperties": false,
-      "description": "SourceDefinition(database: str, schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], source_name: str, source_description: str, loader: str, identifier: str, _event_status: Dict[str, Any] = <factory>, quoting: dbt.contracts.graph.unparsed.Quoting = <factory>, loaded_at_field: Optional[str] = None, freshness: Optional[dbt.contracts.graph.unparsed.FreshnessThreshold] = None, external: Optional[dbt.contracts.graph.unparsed.ExternalTable] = None, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, source_meta: Dict[str, Any] = <factory>, tags: List[str] = <factory>, config: dbt.contracts.graph.model_config.SourceConfig = <factory>, patch_path: Optional[str] = None, unrendered_config: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, created_at: float = <factory>)"
+      "description": "SourceDefinition(database: Optional[str], schema: str, name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], source_name: str, source_description: str, loader: str, identifier: str, _event_status: Dict[str, Any] = <factory>, quoting: dbt.contracts.graph.unparsed.Quoting = <factory>, loaded_at_field: Optional[str] = None, freshness: Optional[dbt.contracts.graph.unparsed.FreshnessThreshold] = None, external: Optional[dbt.contracts.graph.unparsed.ExternalTable] = None, description: str = '', columns: Dict[str, dbt.contracts.graph.nodes.ColumnInfo] = <factory>, meta: Dict[str, Any] = <factory>, source_meta: Dict[str, Any] = <factory>, tags: List[str] = <factory>, config: dbt.contracts.graph.model_config.SourceConfig = <factory>, patch_path: Optional[str] = None, unrendered_config: Dict[str, Any] = <factory>, relation_name: Optional[str] = None, created_at: float = <factory>)"
     },
     "Quoting": {
       "type": "object",
@@ -3445,12 +3526,12 @@
         },
         "dbt_version": {
           "type": "string",
-          "default": "1.4.0a1"
+          "default": "1.5.0a1"
         },
         "generated_at": {
           "type": "string",
           "format": "date-time",
-          "default": "2022-12-13T03:30:15.961825Z"
+          "default": "2023-02-06T14:19:58.590211Z"
         },
         "invocation_id": {
           "oneOf": [
@@ -3461,7 +3542,7 @@
               "type": "null"
             }
           ],
-          "default": "4f2b967b-7e02-46de-a7ea-268a05e3fab1"
+          "default": "1dc2da24-242b-43e7-a6c8-0385fcd8ff50"
         },
         "env": {
           "type": "object",
@@ -3472,7 +3553,7 @@
         }
       },
       "additionalProperties": false,
-      "description": "FreshnessMetadata(dbt_schema_version: str = <factory>, dbt_version: str = '1.4.0a1', generated_at: datetime.datetime = <factory>, invocation_id: Optional[str] = <factory>, env: Dict[str, str] = <factory>)"
+      "description": "FreshnessMetadata(dbt_schema_version: str = <factory>, dbt_version: str = '1.5.0a1', generated_at: datetime.datetime = <factory>, invocation_id: Optional[str] = <factory>, env: Dict[str, str] = <factory>)"
     },
     "SourceFreshnessRuntimeError": {
       "type": "object",
@@ -3814,7 +3895,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.990816
+          "default": 1675693198.611094
         },
         "supported_languages": {
           "oneOf": [
@@ -3837,21 +3918,6 @@
       "additionalProperties": false,
       "description": "Macro(name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, macro_sql: str, depends_on: dbt.contracts.graph.nodes.MacroDependsOn = <factory>, description: str = '', meta: Dict[str, Any] = <factory>, docs: dbt.contracts.graph.unparsed.Docs = <factory>, patch_path: Optional[str] = None, arguments: List[dbt.contracts.graph.unparsed.MacroArgument] = <factory>, created_at: float = <factory>, supported_languages: Optional[List[dbt.node_types.ModelLanguage]] = None)"
     },
-    "MacroDependsOn": {
-      "type": "object",
-      "required": [],
-      "properties": {
-        "macros": {
-          "type": "array",
-          "items": {
-            "type": "string"
-          },
-          "default": []
-        }
-      },
-      "additionalProperties": false,
-      "description": "Used only in the Macro class"
-    },
     "MacroArgument": {
       "type": "object",
       "required": [
@@ -4072,7 +4138,7 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.993354
+          "default": 1675693198.6123588
         }
       },
       "additionalProperties": false,
@@ -4126,7 +4192,6 @@
         "description",
         "label",
         "calculation_method",
-        "timestamp",
         "expression",
         "filters",
         "time_grains",
@@ -4169,9 +4234,6 @@
         "calculation_method": {
           "type": "string"
         },
-        "timestamp": {
-          "type": "string"
-        },
         "expression": {
           "type": "string"
         },
@@ -4193,6 +4255,16 @@
             "type": "string"
           }
         },
+        "timestamp": {
+          "oneOf": [
+            {
+              "type": "string"
+            },
+            {
+              "type": "null"
+            }
+          ]
+        },
         "window": {
           "oneOf": [
             {
@@ -4283,11 +4355,11 @@
         },
         "created_at": {
           "type": "number",
-          "default": 1670902215.995033
+          "default": 1675693198.613676
         }
       },
       "additionalProperties": false,
-      "description": "Metric(name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], description: str, label: str, calculation_method: str, timestamp: str, expression: str, filters: List[dbt.contracts.graph.unparsed.MetricFilter], time_grains: List[str], dimensions: List[str], window: Optional[dbt.contracts.graph.unparsed.MetricTime] = None, model: Optional[str] = None, model_unique_id: Optional[str] = None, meta: Dict[str, Any] = <factory>, tags: List[str] = <factory>, config: dbt.contracts.graph.model_config.MetricConfig = <factory>, unrendered_config: Dict[str, Any] = <factory>, sources: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, refs: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, created_at: float = <factory>)"
+      "description": "Metric(name: str, resource_type: dbt.node_types.NodeType, package_name: str, path: str, original_file_path: str, unique_id: str, fqn: List[str], description: str, label: str, calculation_method: str, expression: str, filters: List[dbt.contracts.graph.unparsed.MetricFilter], time_grains: List[str], dimensions: List[str], timestamp: Optional[str] = None, window: Optional[dbt.contracts.graph.unparsed.MetricTime] = None, model: Optional[str] = None, model_unique_id: Optional[str] = None, meta: Dict[str, Any] = <factory>, tags: List[str] = <factory>, config: dbt.contracts.graph.model_config.MetricConfig = <factory>, unrendered_config: Dict[str, Any] = <factory>, sources: List[List[str]] = <factory>, depends_on: dbt.contracts.graph.nodes.DependsOn = <factory>, refs: List[List[str]] = <factory>, metrics: List[List[str]] = <factory>, created_at: float = <factory>)"
     },
     "MetricFilter": {
       "type": "object",
diff --git a/test/unit/test_contracts_graph_parsed.py b/test/unit/test_contracts_graph_parsed.py
index ae792cdb718..f4b8ba88ecf 100644
--- a/test/unit/test_contracts_graph_parsed.py
+++ b/test/unit/test_contracts_graph_parsed.py
@@ -432,6 +432,7 @@ def basic_parsed_seed_dict():
         'unique_id': 'seed.test.foo',
         'fqn': ['test', 'seeds', 'foo'],
         'database': 'test_db',
+        'depends_on': {'macros': []},
         'description': '',
         'schema': 'test_schema',
         'tags': [],
@@ -472,6 +473,7 @@ def basic_parsed_seed_object():
         raw_code='',
         unique_id='seed.test.foo',
         fqn=['test', 'seeds', 'foo'],
+        depends_on=MacroDependsOn(),
         database='test_db',
         description='',
         schema='test_schema',
@@ -520,6 +522,7 @@ def complex_parsed_seed_dict():
         'unique_id': 'seed.test.foo',
         'fqn': ['test', 'seeds', 'foo'],
         'database': 'test_db',
+        'depends_on': {'macros': []},
         'description': 'a description',
         'schema': 'test_schema',
         'tags': ['mytag'],
@@ -564,6 +567,7 @@ def complex_parsed_seed_object():
         unique_id='seed.test.foo',
         fqn=['test', 'seeds', 'foo'],
         database='test_db',
+        depends_on=MacroDependsOn(),
         description='a description',
         schema='test_schema',
         tags=['mytag'],
diff --git a/tests/functional/artifacts/expected_manifest.py b/tests/functional/artifacts/expected_manifest.py
index 6e1e8e89af5..0ce826dd378 100644
--- a/tests/functional/artifacts/expected_manifest.py
+++ b/tests/functional/artifacts/expected_manifest.py
@@ -414,6 +414,7 @@ def expected_seeded_manifest(project, model_database=None, quote_model=False):
                 "fqn": ["test", "seed"],
                 "tags": [],
                 "meta": {},
+                "depends_on": {"macros": []},
                 "schema": my_schema_name,
                 "database": project.database,
                 "alias": "seed",
@@ -1043,6 +1044,7 @@ def expected_references_manifest(project):
                 },
                 "config": get_rendered_seed_config(),
                 "deferred": False,
+                "depends_on": {"macros": []},
                 "description": "The test seed",
                 "docs": {"node_color": None, "show": True},
                 "fqn": ["test", "seed"],
diff --git a/tests/functional/artifacts/test_artifacts.py b/tests/functional/artifacts/test_artifacts.py
index 0bd0ba436d4..3f6c1304534 100644
--- a/tests/functional/artifacts/test_artifacts.py
+++ b/tests/functional/artifacts/test_artifacts.py
@@ -503,7 +503,6 @@ def test_run_and_generate(self, project, manifest_schema_path, run_results_schem
         start_time = datetime.utcnow()
         results = run_dbt(["compile"])
         assert len(results) == 7
-
         verify_manifest(
             project,
             expected_seeded_manifest(project, quote_model=False),
diff --git a/tests/functional/hooks/test_model_hooks.py b/tests/functional/hooks/test_model_hooks.py
index 99a05c9c895..e4a8c2f5024 100644
--- a/tests/functional/hooks/test_model_hooks.py
+++ b/tests/functional/hooks/test_model_hooks.py
@@ -2,7 +2,7 @@
 
 from pathlib import Path
 
-from dbt.exceptions import CompilationError
+from dbt.exceptions import CompilationError, ParsingError
 
 from dbt.tests.util import (
     run_dbt,
@@ -251,6 +251,8 @@ def project_config_update(self):
                 "post-hook": [
                     "alter table {{ this }} add column new_col int",
                     "update {{ this }} set new_col = 1",
+                    # call any macro to track dependency: https://github.com/dbt-labs/dbt-core/issues/6806
+                    "select null::{{ dbt.type_int() }} as id",
                 ],
                 "quote_columns": False,
             },
@@ -263,6 +265,36 @@ def test_hooks_on_seeds(self, project):
         assert len(res) == 1, "Expected exactly one item"
 
 
+class TestHooksRefsOnSeeds:
+    """
+    This should not succeed, and raise an explicit error
+    https://github.com/dbt-labs/dbt-core/issues/6806
+    """
+
+    @pytest.fixture(scope="class")
+    def seeds(self):
+        return {"example_seed.csv": seeds__example_seed_csv}
+
+    @pytest.fixture(scope="class")
+    def models(self):
+        return {"schema.yml": properties__seed_models, "post.sql": models__post}
+
+    @pytest.fixture(scope="class")
+    def project_config_update(self):
+        return {
+            "seeds": {
+                "post-hook": [
+                    "select * from {{ ref('post') }}",
+                ],
+            },
+        }
+
+    def test_hook_with_ref_on_seeds(self, project):
+        with pytest.raises(ParsingError) as excinfo:
+            run_dbt(["parse"])
+        assert "Seeds cannot depend on other nodes" in str(excinfo.value)
+
+
 class TestPrePostModelHooksOnSeedsPlusPrefixed(TestPrePostModelHooksOnSeeds):
     @pytest.fixture(scope="class")
     def project_config_update(self):
diff --git a/tests/functional/list/test_list.py b/tests/functional/list/test_list.py
index cf0d3d89add..d4ecb111195 100644
--- a/tests/functional/list/test_list.py
+++ b/tests/functional/list/test_list.py
@@ -380,6 +380,7 @@ def expect_seed_output(self):
                     "incremental_strategy": None,
                     "docs": {"node_color": None, "show": True},
                 },
+                "depends_on": {"macros": []},
                 "unique_id": "seed.test.seed",
                 "original_file_path": normalize("seeds/seed.csv"),
                 "alias": "seed",


Code review comments:
diff_hunk: @@ -523,6 +525,39 @@ def empty(self):
         """Seeds are never empty"""
         return False
 
+    def disallow_implicit_dependencies(self):
path: core/dbt/contracts/graph/nodes.py
text: @user1:
This looks like a private method, which should be indicated by prefixing with an underscore:
```
def _disallow_implicit_dependencies():
```