Skip to content

Commit

Permalink
Update run_query.md arguments (#5258)
Browse files Browse the repository at this point in the history
I looked very hard in the code to try and find where run_query macro is
defined. The only hints I got were
`dbt run-operation run_query --args '{\"sql\": \"select now()\"}' `
fails 
but 
`dbt run-operation run_query --args '{\"query\": \"select now()\"}'`

so if this update is wrong just decline. I was using Redshift so it
might just be inconsistencies with the adapters

Co-authored-by: Mirna Wong <[email protected]>
Co-authored-by: Matt Shaver <[email protected]>
  • Loading branch information
3 people authored Aug 5, 2024
1 parent b31bc5e commit 1aca6a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/reference/dbt-jinja-functions/run_query.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "Use `run_query` macro to run queries and fetch results."
The `run_query` macro provides a convenient way to run queries and fetch their results. It is a wrapper around the [statement block](/reference/dbt-jinja-functions/statement-blocks), which is more flexible, but also more complicated to use.

__Args__:
* `sql`: The SQL query to execute
* `query`: The SQL query to execute

Returns a [Table](https://agate.readthedocs.io/page/api/table.html) object with the result of the query. If the specified query does not return results (eg. a <Term id="ddl" />, <Term id="dml" />, or maintenance query), then the return value will be `none`.

Expand Down

0 comments on commit 1aca6a2

Please sign in to comment.