dbt-labs / dbt-labs/docs.getdbt.com
[Core] The `schemas` context variable has its own page but `invocation_args_dict` does not
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 1.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 130
Description
### Link to the page(s) on docs.getdbt.com requiring updates
This page for `schemas` also exists:
https://docs.getdbt.com/reference/dbt-jinja-functions/schemas
But this page does not exist for `invocation_args_dict`:
https://docs.getdbt.com/reference/dbt-jinja-functions/invocation_args_dict
Rather, it is within this page instead:
https://docs.getdbt.com/reference/dbt-jinja-functions/flags#invocation_args_dict
### Tell us more about this update
So to resolve this discrepancy, it seems like either both should have their own page or neither should have their own page.
Having its own page seems more useful, because then it would be available in the side menu also. It would also show up as the page title when searching through Google search results or Algolia search results.
### Example
It would also be useful to have an example that shows how to get the value of one of the CLI args. Here's a couple potential examples for getting the value of the `--limit` flag and use a default of 999 if it is not found (I'm not sure which works or not):
```sql
invocation_args_dict.get("limit", 999)
```
```sql
invocation_args_dict.get("limit") or 999
```
> [!IMPORTANT]
> I'm not sure if either or both of these examples work or not. At least for [`config.get`](https://docs.getdbt.com/reference/dbt-jinja-functions/config), I think it needs to be the latter (see https://github.com/dbt-labs/docs.getdbt.com/issues/3969), but I'm not sure if that also applies to `invocation_args_dict` or not.
### Reviewers/Stakeholders/SMEs
I can be the stakeholder on this one 😎
### Related GitHub issues
I noticed this discrepancy when looking at https://github.com/dbt-labs/dbt-core/issues/9600#issuecomment-2007621731 and was researching a context variable that contains the command-line args (which ended up being [`invocation_args_dict`](https://docs.getdbt.com/reference/dbt-jinja-functions/flags#invocation_args_dict)).
This is also related to https://github.com/dbt-labs/docs.getdbt.com/issues/5117
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.