dbt-labs / dbt-labs/docs.getdbt.com
Page that explains and enumerates all the node / resource types
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 1.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 130
Description
### Contributions
- [X] I have read the contribution docs, and understand what's expected of me.
### Link to the page on docs.getdbt.com requiring updates
We can add more detail here:
https://docs.getdbt.com/reference/global-configs/resource-type
Alternatively, we could create a new stand-alone page.
### What part(s) of the page would you like to see updated?
The closest documentation to enumerating the [valid resource types](https://github.com/dbt-labs/dbt-core/blob/a1f64510907cab3470060fe2eb270e007a9a2522/core/dbt/artifacts/resources/types.py#L18-L37) within dbt is [this](https://docs.getdbt.com/docs/dbt-cloud-apis/project-state#affected-states-by-node-type).
Without a single page that enumerates all the resource types, it makes it harder to do documentation like is needed for https://github.com/dbt-labs/docs.getdbt.com/issues/4313.
It would be nice if our documentation also makes the distinction between the types that can be [versioned, ref'd, and/or executed](https://github.com/dbt-labs/dbt-core/blob/a1f64510907cab3470060fe2eb270e007a9a2522/core/dbt/node_types.py#L6-L26)
### dbt project containing "all" resource types
Here's a simple dbt project that has quite a few different resource types (but probably not all): https://github.com/dbt-labs/docs.getdbt.com/issues/4492#issuecomment-1881658603
### Main resource types
```python
Model = "model" # executable / refable / versioned
Seed = "seed" # executable / refable
Snapshot = "snapshot" # executable / refable
Analysis = "analysis" # executable
Source = "source"
```
### Testing-related resource types
```python
Test = "test" # executable
Unit = "unit_test"
Fixture = "fixture"
```
### Semantic layer resource types
```python
SemanticModel = "semantic_model"
Metric = "metric"
SavedQuery = "saved_query"
```
### Other resource types
```python
Exposure = "exposure"
Macro = "macro"
Group = "group"
```
```python
Operation = "operation" # executable
RPCCall = "rpc" # executable
SqlOperation = "sql_operation" # executable
Documentation = "doc" # executable
```
### Potential table
See below for a re-imagining of the table [here](https://docs.getdbt.com/docs/dbt-cloud-apis/project-state#affected-states-by-node-type).
> [!WARNING]
> The following information hasn't been verified for completeness or correctness!
| Node | Executed in DAG | Exists in database | Created by execution | Upstream lineage | Downstream lineage |
|:-------------------------:|:---------------:|:------------------:|:--------------------:|:----------------:|:------------------:|
| Source | | ✅ | | | → |
| Snapshot | ✅ | ✅ | ✅ | ← | → |
| Model - incremental | ✅ | ✅ | ✅ | ← | → |
| Model - materialized view | ✅ | ✅ | ✅ | ← | → |
| Model - view | ✅ | ✅ | ✅ | ← | → |
| Model - table | ✅ | ✅ | ✅ | ← | → |
| Seed | ✅ | ✅ | ✅ | | → |
| Model - ephemeral | ✅ | | | ← | → |
| Analysis | ✅ | | | ← | |
| Semantic model | | | | ← | → |
| Metric | | | | ← | → |
| Saved query | | | | ← | |
| Export | | ✅ | | ← | |
| Exposure | | | | ← | |
| Data test | ✅ | ☑️ | ☑️ | ← | |
| Unit test | | | | ← | |
| Fixture | | | | | → |
| Group | | | | | → |
| Macro | ✅ | | | | |
### Additional information
Implementing this would unlock or enhance the following:
- https://github.com/dbt-labs/docs.getdbt.com/issues/4313
- clarifying updates to `name` within https://docs.getdbt.com/reference/artifacts/manifest-json#resource-details
- clarifying updates to `type` within https://docs.getdbt.com/reference/artifacts/other-artifacts#graph_summaryjson
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.