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

Do not display 'metric' and 'metrics' in Discovery API job query fields table #4623

Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading