Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support descriptions on seeds, snapshots in .yml files #1974

Closed
drewbanin opened this issue Dec 4, 2019 · 3 comments
Closed

Support descriptions on seeds, snapshots in .yml files #1974

drewbanin opened this issue Dec 4, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@drewbanin
Copy link
Contributor

Describe the bug

Seeds can be tested in .yml files, but they can not be documented there. While supporting a description field for seeds in the manifest might be straightforward, the bigger thing to tackle here is the lack of clarity around the schema.yml spec. Right now, nodes can be defined under one of sources: or models:.

It's not obvious that seed files (and snapshots) should be defined under models:. Should dbt instead support other top-level keys like seeds: and snapshots:? It's conceivable that each of these resource types would support their own configurations, so separating them out could make parsing the schema.yml file (and surfacing syntax errors to users) simpler. You can also imagine this paradigm extending to document macros.

Expected behavior

Descriptions on seeds and snapshots should be populated in the rendered documentation site.

The output of dbt --version:

v0.15.0
@drewbanin drewbanin added bug Something isn't working discussion labels Dec 4, 2019
@clrcrl
Copy link
Contributor

clrcrl commented Dec 4, 2019

I like to think of snapshots, seeds and models as resources. I think it makes sense to have sources defined differently -- while sources are describing a thing that already exists, resources is describing a thing that dbt builds. I don't have strong convictions here though!

@drewbanin drewbanin changed the title Support descriptions on seeds in .yml files Support descriptions on seeds, snapshots in .yml files Jan 7, 2020
@drewbanin drewbanin added this to the Barbara Gittings milestone Jan 7, 2020
@jthandy
Copy link
Member

jthandy commented Jan 12, 2020

I just ran into this myself on some work I've been doing. Thanks for documenting this issue.

Like @clrcrl, I also don't have super-strong opinions here, although my initial reaction is to call out the different resource types in the yml tree specifically like you suggested @drewbanin -- they could definitely have different properties in the future.

The thing that this ties into for me, though, is the --models flag. I run a single seed by typing:

dbt seed --models stg_[seed_name]

We've talked for a long time about unifying dbt commands such that dbt run actually runs everything. I could imagine the selector changing to nodes instead of models. That's obviously a much bigger topic than this more specific issue, but I do feel like these two topics are related so I wanted to mention it.

beckjake added a commit that referenced this issue Jan 24, 2020
…ryone

Make dbt support documentation for snapshots and seeds (and analyses) (#1974)
@beckjake
Copy link
Contributor

Fixed in #2051

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants