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

Data tests and sources with tags do not appear in project documentation #147

Closed
clrcrl opened this issue Oct 13, 2020 · 4 comments · Fixed by #157
Closed

Data tests and sources with tags do not appear in project documentation #147

clrcrl opened this issue Oct 13, 2020 · 4 comments · Fixed by #157
Labels
bug Something isn't working

Comments

@clrcrl
Copy link
Contributor

clrcrl commented Oct 13, 2020

Steps to reproduce

  1. Add a data test to your project:
$ cat tests/assert_whatever.sql
select 1
from  {{ ref('customers') }}
where false
  1. Generate docs dbt docs generate
  2. Serve docs, dbt docs serve
  3. Data test appears in DAG

Screen Shot 2020-10-13 at 10 20 48 AM

  1. Amend data test to include a config block
$ cat tests/assert_whatever.sql
{{
    config(
        tags='foo'
    )
}}
select 1
from    {{ ref('customers') }}
where false
  1. Regenerate docs

Expected behavior

Data test should still appear in project DAG

Actual behavior

Data test does not appear in project DAG
Screen Shot 2020-10-13 at 10 21 20 AM

System information

The output of dbt --version:

installed version: 0.18.1-rc1
   latest version: 0.18.0

Your version of dbt is ahead of the latest release!

Plugins:
  - bigquery: 0.18.1rc1
  - snowflake: 0.18.1rc1
  - redshift: 0.18.1rc1
  - postgres: 0.18.1rc1

Reproduced on 0.17.2 as well

@jtcohen6
Copy link
Contributor

Nice catch. I reproduced locally and confirmed that the data test is still populated to the manifest all right, so I think this is a dbt-docs bug.

@jtcohen6 jtcohen6 transferred this issue from dbt-labs/dbt-core Oct 13, 2020
@jtcohen6 jtcohen6 added the bug Something isn't working label Oct 13, 2020
@ijoel92
Copy link

ijoel92 commented Oct 23, 2020

Hi all,

I mentioned this issue in the dbt slack channel https://getdbt.slack.com/archives/C2JRRQDTL/p1603290085056200

Same issue is happening when adding a tag to the sources.

@tpolman
Copy link

tpolman commented Dec 9, 2020

I'm experiencing the same when adding tags to sources.

If I edit the corresponding line in the generated target/manifest.json the lineage graph starts showing the node again.

# manifest.json under sources ->> source...dwh.source_name
# from
      "tags": [
        "tag_name"
      ],
# to 
      "tags": [],```

@clrcrl clrcrl changed the title Data tests with config blocks do not appear in project documentation Data tests and sources with tags do not appear in project documentation Dec 9, 2020
@jtcohen6
Copy link
Contributor

The sources piece of this was resolved in #139, which will be included in v0.19.0 (and was included in v0.19.0-b1). I think the fix for data tests should be fairly straightforward.

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

Successfully merging a pull request may close this issue.

4 participants