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
  • Loading branch information
eddowh committed Dec 11, 2023
1 parent 297ea3f commit a8ae9bd
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 a8ae9bd

Please sign in to comment.