From 1aca6a20860dae5b55dabcd2f811b2952a9f285c Mon Sep 17 00:00:00 2001 From: stevensnicholas Date: Tue, 6 Aug 2024 06:48:25 +1000 Subject: [PATCH] Update run_query.md arguments (#5258) 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 <89008547+mirnawong1@users.noreply.github.com> Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/reference/dbt-jinja-functions/run_query.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt-jinja-functions/run_query.md b/website/docs/reference/dbt-jinja-functions/run_query.md index 87970e024ed..a53927db13d 100644 --- a/website/docs/reference/dbt-jinja-functions/run_query.md +++ b/website/docs/reference/dbt-jinja-functions/run_query.md @@ -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 , , or maintenance query), then the return value will be `none`.