Skip to content

Commit

Permalink
Do not display 'metric' and 'metrics' in Discovery API job query fiel…
Browse files Browse the repository at this point in the history
…ds table (#4623)

## What are you changing in this pull request and why?
<!---
Describe your changes and why you're making them. If linked to an open
issue or a pull request on dbt Core, then link to them here! 

To learn more about the writing conventions used in the dbt Labs docs,
see the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md).
-->

## Checklist
<!--
Uncomment if you're publishing docs for a prerelease version of dbt
(delete if not applicable):
- [x] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)
-->
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [ ] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
- [ ] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."
  • Loading branch information
mirnawong1 authored Dec 11, 2023
2 parents 32a936f + a0d4438 commit 040a2ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website/docs/docs/dbt-cloud-apis/schema-discovery-job.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ query JobQueryExample {
### Fields
When querying an `job`, you can use the following fields.

<SchemaTable nodeName="JobNode" />
<SchemaTable nodeName="JobNode" exclude={['metric', 'metrics']} />
3 changes: 2 additions & 1 deletion website/docs/docs/dbt-cloud-apis/schema.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const NodeArgsTable = ({ parent, name, useBetaAPI }) => {
)
}

export const SchemaTable = ({ nodeName, useBetaAPI }) => {
export const SchemaTable = ({ nodeName, useBetaAPI, exclude = [] }) => {
const [data, setData] = useState(null)
useEffect(() => {
const fetchData = () => {
Expand Down Expand Up @@ -255,6 +255,7 @@ export const SchemaTable = ({ nodeName, useBetaAPI }) => {
</thead>
<tbody>
{data.data.__type.fields.map(function ({ name, description, type }) {
if (exclude.includes(name)) return;
return (
<tr key={name}>
<td><code>{name}</code></td>
Expand Down

0 comments on commit 040a2ce

Please sign in to comment.