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

Create default overview block for docs website #943

Merged
merged 4 commits into from
Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
recursive-include dbt/include *.py *.sql *.yml *.html
recursive-include dbt/include *.py *.sql *.yml *.html *.md
1 change: 1 addition & 0 deletions dbt/include/global_project/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
name: dbt
version: 1.0

docs-paths: ['docs']
macro-paths: ["macros"]
43 changes: 43 additions & 0 deletions dbt/include/global_project/docs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

{% docs __overview__ %}

### Welcome!

Welcome to the auto-generated documentation for your dbt project!

### Navigation

You can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models
in your project.

#### Project Tab
The `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the
models defined in your dbt project, as well as models imported from dbt packages.

#### Database Tab
The `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view
shows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown
in this interface, as they do not exist in the database.

### Graph Exploration
You can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.

On model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`
button at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,
or are built from, the model you're exploring.

Once expanded, you'll be able to use the `--models` and `--exclude` model selection syntax to filter the
models in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/reference#section-specifying-models-to-run).

Note that you can also right-click on models to interactively filter and explore the graph.

---

### More information

- [What is dbt](https://docs.getdbt.com/docs/overview)?
- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)
- [Installation](https://docs.getdbt.com/docs/installation)
- Join the [chat](https://slack.getdbt.com/) on Slack for live questions and support.

{% enddocs %}
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def read(fname):
'dbt': [
'include/index.html',
'include/global_project/dbt_project.yml',
'include/global_project/docs/*.md',
'include/global_project/macros/*.sql',
'include/global_project/macros/**/*.sql',
'include/global_project/macros/**/**/*.sql',
Expand Down
16 changes: 12 additions & 4 deletions test/integration/029_docs_generate_tests/test_docs_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import os
from datetime import datetime, timedelta
from mock import ANY

from test.integration.base import DBTIntegrationTest, use_profile
from dbt.compat import basestring
Expand Down Expand Up @@ -647,7 +648,9 @@ def expected_seeded_manifest(self):
'test.test.nothing_model_': [],
'test.test.unique_model_id': [],
},
'docs': {},
'docs': {
'dbt.__overview__': ANY
},
'metadata': {
'project_id': '098f6bcd4621d373cade4e832627b4f6',
'user_id': None,
Expand Down Expand Up @@ -845,6 +848,7 @@ def expected_postgres_references_manifest(self):
},
},
'docs': {
'dbt.__overview__': ANY,
'test.ephemeral_summary': {
'block_contents': (
'A summmary table of the ephemeral copy of the seed data'
Expand Down Expand Up @@ -1014,7 +1018,9 @@ def expected_bigquery_nested_manifest(self):
'model.test.model': ['model.test.seed'],
'model.test.seed': []
},
'docs': {},
'docs': {
'dbt.__overview__': ANY,
},
'metadata': {
'project_id': '098f6bcd4621d373cade4e832627b4f6',
'user_id': None,
Expand Down Expand Up @@ -1122,7 +1128,9 @@ def expected_redshift_incremental_view_manifest(self):
"model.test.model": [],
"seed.test.seed": ["model.test.model"]
},
'docs': {},
'docs': {
'dbt.__overview__': ANY,
},
'metadata': {
'project_id': '098f6bcd4621d373cade4e832627b4f6',
'user_id': None,
Expand All @@ -1139,7 +1147,7 @@ def verify_manifest(self, expected_manifest):
self.assertEqual(
set(manifest),
{'nodes', 'macros', 'parent_map', 'child_map', 'generated_at',
'docs', 'metadata'}
'docs', 'metadata', 'docs'}
)

self.verify_manifest_macros(manifest)
Expand Down