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

Discovery API: update docs #3894

Merged
merged 71 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0e39350
discovery-use-cases-and-examples: update queries to use bigints and n…
eddowh Aug 8, 2023
7eec141
discovery-querying: update queries to use bigints and add TODOs to re…
eddowh Aug 9, 2023
7b3b1fa
discovery-use-cases-and-examples: add TODOs on querying model constra…
eddowh Aug 9, 2023
99a097f
Update website/docs/docs/dbt-cloud-apis/discovery-querying.md
nghi-ly Aug 9, 2023
fcbea5e
Update ModelByEnv and Environment schema obj docs
nghi-ly Aug 9, 2023
6e146bd
Merge branch 'current' into meta-1482/update-discovery-api-docs
nghi-ly Aug 9, 2023
9db6960
Update jobs. Minor nits
nghi-ly Aug 9, 2023
8894408
Update website/docs/docs/dbt-cloud-apis/schema-discovery-modelByEnv.mdx
nghi-ly Aug 9, 2023
5910903
Merge branch 'meta-1482/update-discovery-api-docs' of github.com:dbt-…
nghi-ly Aug 9, 2023
fd7bc98
Update website/docs/docs/dbt-cloud-apis/schema-discovery-environment.mdx
nghi-ly Aug 9, 2023
1c7e291
Update website/docs/docs/dbt-cloud-apis/schema-discovery-modelByEnv.mdx
nghi-ly Aug 9, 2023
4133c16
Fix callouts
nghi-ly Aug 9, 2023
4c76a3b
Update website/docs/docs/dbt-cloud-apis/schema-discovery-modelByEnv.mdx
nghi-ly Aug 9, 2023
2e5d4a4
Update website/docs/docs/dbt-cloud-apis/schema-discovery-environment.mdx
nghi-ly Aug 9, 2023
6a31d25
Update website/docs/docs/dbt-cloud-apis/discovery-use-cases-and-examp…
nghi-ly Aug 9, 2023
953673a
Update wording
nghi-ly Aug 9, 2023
412cde3
Feedback from PM
nghi-ly Aug 9, 2023
078c55c
Update website/docs/docs/dbt-cloud-apis/discovery-use-cases-and-examp…
nghi-ly Aug 9, 2023
943f101
discovery-schema: Add 'Job' page
eddowh Aug 9, 2023
63dffb8
Merge branch 'meta-1482/update-discovery-api-docs' of github.com:dbt-…
eddowh Aug 9, 2023
7db7e06
Add Discovery API Job Schema to sidebar
eddowh Aug 9, 2023
bdc0432
This branch was auto-updated!
github-actions[bot] Aug 9, 2023
01168db
Merge branch 'meta-1482/update-discovery-api-docs' of github.com:dbt-…
eddowh Aug 9, 2023
d95f422
discovery-api: various changes
eddowh Aug 9, 2023
872154a
This branch was auto-updated!
github-actions[bot] Aug 9, 2023
a8ea7ca
discovery-api-schema: Display deprecation notices for legacy job endp…
eddowh Aug 9, 2023
3c23a3c
Merge branch 'meta-1482/update-discovery-api-docs' of github.com:dbt-…
eddowh Aug 9, 2023
e5bb587
discovery-api: Remove wrongly placed deprecation notices
eddowh Aug 9, 2023
24ae1bf
discovery-api-schema: Add 'Model' endpoint under 'Job'
eddowh Aug 9, 2023
9c96820
discovery-api-schema: Add 'Models' docs under 'Job'
eddowh Aug 9, 2023
7642ff1
discovery-api-schema: Add exposure docs under 'Job'
eddowh Aug 9, 2023
2a2e8ff
discovery-api-schema: Add metric docs under 'Job'
eddowh Aug 9, 2023
d02b9f3
discovery-api-schema: Add seed docs under 'Job'
eddowh Aug 9, 2023
b8ef15c
discovery-api-schema: Add source docs under 'Job'
eddowh Aug 9, 2023
ea307d2
discovery-api-schema: Add snapshot and test docs under 'Job'
eddowh Aug 10, 2023
b0239e9
discovery-api-schema: Add modelHistoricalRuns docs under 'Environment…
eddowh Aug 10, 2023
3d27843
discovery-api: Finalize TODOs
eddowh Aug 10, 2023
0ed5284
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
25b971a
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
3bcda6f
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
50b01aa
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
a93ce45
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
d7ed773
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
907d5b5
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
07a8800
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
53b76c3
This branch was auto-updated!
github-actions[bot] Aug 10, 2023
45cfb25
Updates to query page
nghi-ly Aug 10, 2023
24cd278
Update snippet for deprecation callout
nghi-ly Aug 10, 2023
9e78499
Updates to use cases and ex
nghi-ly Aug 10, 2023
b4a9973
Updates to schema pages
nghi-ly Aug 11, 2023
2679d5a
Nits for consistency
nghi-ly Aug 11, 2023
a6e6503
This branch was auto-updated!
github-actions[bot] Aug 11, 2023
8666e59
Update website/docs/docs/dbt-cloud-apis/discovery-use-cases-and-examp…
nghi-ly Aug 11, 2023
ab4dc09
discovery-use-cases-and-example: temporarily remove 'What’s the full …
eddowh Aug 11, 2023
82e3c87
This branch was auto-updated!
github-actions[bot] Aug 11, 2023
dc0ed7b
This branch was auto-updated!
github-actions[bot] Aug 12, 2023
b4dc9e2
This branch was auto-updated!
github-actions[bot] Aug 14, 2023
bc1b22e
This branch was auto-updated!
github-actions[bot] Aug 14, 2023
0bdd58c
This branch was auto-updated!
github-actions[bot] Aug 14, 2023
c23c3dc
This branch was auto-updated!
github-actions[bot] Aug 15, 2023
e74a071
This branch was auto-updated!
github-actions[bot] Aug 15, 2023
67acd2f
This branch was auto-updated!
github-actions[bot] Aug 15, 2023
8e189e4
This branch was auto-updated!
github-actions[bot] Aug 15, 2023
dca68e2
This branch was auto-updated!
github-actions[bot] Aug 15, 2023
32d94d7
This branch was auto-updated!
github-actions[bot] Aug 15, 2023
937ea5e
This branch was auto-updated!
github-actions[bot] Aug 15, 2023
9bca438
Revert hardcoded metadataUrls
eddowh Aug 15, 2023
f8b7735
Update website/docs/docs/dbt-cloud-apis/schema-discovery-environment-…
runleonarun Aug 15, 2023
02b273a
Merge branch 'current' into meta-1482/update-discovery-api-docs
runleonarun Aug 15, 2023
1f0b4f2
Update contributing/single-sourcing-content.md
runleonarun Aug 15, 2023
bb7f63d
Update website/docs/docs/dbt-cloud-apis/schema-discovery-environment-…
runleonarun Aug 15, 2023
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
44 changes: 22 additions & 22 deletions contributing/single-sourcing-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Versions are managed in the `versions` array located in the `website/dbt-version

### Adding a new version

To add a new version to the site, a new object must be added to the `versions` array in the same format as existing versions. This object holds two properties: **version** and **EOLDate (See End of Life Dates below)**.
To add a new version to the site, a new object must be added to the `versions` array in the same format as existing versions. This object holds two properties: **version** and **EOLDate (See End of Life Dates below)**.

Example Version:
Example Version:

```jsx
exports.versions = [
Expand All @@ -36,7 +36,7 @@ The **EOLDate** property determines when a version is no longer supported. A ver

When a documentation page is viewed, the **EOLDate** property for the active version is compared to today’s date. If the current version has reached or is nearing the end of support, a banner will show atop the page, notifying the visitor of the end-of-life status.

Two different versions of the banner will show depending on the end-of-life date:
Two different versions of the banner will show depending on the end-of-life date:

- When the version is within 3 months of the **EOLDate.**
- When the version has passed the **EOLDate.**
Expand Down Expand Up @@ -76,7 +76,7 @@ exports.versionedPages = [

## Versioning blocks of content

The **VersionBlock** component provides the ability to version a specific piece of content on a docs page.
The **VersionBlock** component provides the ability to version a specific piece of content on a docs page.

This component can be added directly to a markdown file in a similar way as other components (FAQ, File, Lightbox).

Expand All @@ -99,7 +99,7 @@ Both properties can be used together to set a range where the content should sho

### Example for versioning entire pages

On the [Docs Defer page](https://docs.getdbt.com/reference/node-selection/defer), tabs are used to show different versions of a piece of code. **v0.21.0 and later** shows `--select`, while **v-.20.x and earlier** changes this to `--models`.
On the [Docs Defer page](https://docs.getdbt.com/reference/node-selection/defer), tabs are used to show different versions of a piece of code. **v0.21.0 and later** shows `--select`, while **v-.20.x and earlier** changes this to `--models`.

![oldway](https://user-images.githubusercontent.com/3880403/163254165-dea23266-2eea-4e65-b3f0-c7b6d3e51fc3.png)

Expand Down Expand Up @@ -149,7 +149,7 @@ Using a global variable requires two steps:
exports.dbtVariables = {
dbtCore: {
name: "dbt Core"
}
}
}
```

Expand Down Expand Up @@ -198,13 +198,13 @@ In the above example, the **dbtCloud** property has a default name of “dbt Clo

### Global variables example

The global `<Var />` component can be used inline, for example:
The global `<Var />` component can be used inline, for example:

```markdown
This piece of markdown content explains why <Var name="dbt" /> is awesome.
```

However, a Var component cannot start a new line of content. Fortunately, a workaround exists to use the Var component at the beginning of a line of content.
However, a Var component cannot start a new line of content. Fortunately, a workaround exists to use the Var component at the beginning of a line of content.

To use the component at the beginning of a sentence, add a non-breaking space character before the component:

Expand All @@ -231,7 +231,7 @@ A partial file allows you to reuse content throughout the docs. Here are the ste
2. Go back to the docs file that will pull content from the partial file.
3. Add the following import file: `import ComponentName from '/snippets/_this-is-your-partial-file-name.md';`
* You must always add an import file in that format. Note you can name `ComponentName` (a partial component) can be whatever makes sense for your purpose.
* `.md` needs to be added to the end of the filename.
* `.md` needs to be added to the end of the filename.
4. To use the partial component, go to the next line and add `<ComponentName />`. This fetches the reusable content in the partial file
* Note `anyname` can be whatever makes sense for your purpose.

Expand All @@ -258,15 +258,15 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam fermentum portti
```markdown
Docs content here.

`import SetUpPages from '/snippets/_partial-name.md';`

<SetUpPages />
import SetUpPages from '/snippets/_partial-name.md';
<!-- It's important to leave a blank line or a comment between import and usage, otherwise it won't work -->
<SetUpPages />

Docs content here.
```

- `import SetUpPages from '/snippets/_partial-name.md';` &mdash; A partial file that will be imported by other files
- `<SetUpPages />` &mdash; A component that imports content from the partial file. You can also use it to pass in data into the partial using props (See 'How to use props to pass different content on multiple pages?' below).
- `<SetUpPages />` &mdash; A component that imports content from the partial file. You can also use it to pass in data into the partial using props (See 'How to use props to pass different content on multiple pages?' below).

4. This will then render the content of the docs in the partial file.

Expand All @@ -276,32 +276,32 @@ Docs content here.

<details>
<summary><b>How to use props to pass different content on multiple pages?</b></summary><br />

You can add props on the component only if you want to pass in data from the component into the partial file. This is useful for using the same partial component on
multiple docs pages and displaying different values for each. For example, if we wanted to use a partial on multiple pages and pass in a different 'feature' for each
docs page, you can write it as:

```
```markdown
import SetUpPages from '/snippets/_available-enterprise-only.md';

`<SetUpPages feature='A really cool feature' />
<!-- It is important to leave a blank line or a comment between import and usage, otherwise it won't work -->
<SetUpPages feature='A really cool feature' />
```

Then in the `/snippets/_available-enterprise-only.md file`, you can display that feature prop with:

>This feature: `{props.feature}` other content etc...

This will then translate to:

>This feature: A really cool feature other content etc...

In this example, the component `<SetUpPages feature='` is passing 'feature' into the partial. This is useful when using dynamic data (for example if you wanted to use the same partial on multiple docs pages, but change the values within the partial for each page)

</details>

### Snippets

The Snippet component allows for content to be reusable throughout the Docs. This is very similar to the existing FAQ component. Using partial files, which is a built-in Docusaurus feature, is recommended over snippets.
The Snippet component allows for content to be reusable throughout the Docs. This is very similar to the existing FAQ component. Using partial files, which is a built-in Docusaurus feature, is recommended over snippets.

Creating and using a snippet requires two steps:

Expand Down
Loading
Loading