You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/query/run.go
+16-13Lines changed: 16 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -13,20 +13,24 @@ import (
13
13
funcnewRunCmd() *cobra.Command {
14
14
cmd:=&cobra.Command{
15
15
Use: "run <query-id>",
16
-
Short: "Execute a saved Dune query by its ID and display results",
17
-
Long: "Execute a saved Dune query by its numeric ID. By default, waits for the\n"+
18
-
"execution to complete and displays the result rows. Use --no-wait to submit\n"+
19
-
"the execution and exit immediately with just the execution ID.\n\n"+
20
-
"Credits are consumed based on actual compute resources used. Use --performance\n"+
21
-
"to select the engine size (medium or large).",
22
-
Args: cobra.ExactArgs(1),
23
-
RunE: runRun,
16
+
Short: "Execute a saved query and display results",
17
+
Long: "Execute a saved DuneSQL query by its numeric ID and display results.\n\n"+
18
+
"By default, polls every 5 seconds for up to ~5 minutes waiting for completion.\n"+
19
+
"Use --no-wait to submit the execution and exit immediately; then fetch\n"+
20
+
"results later with 'dune execution results <execution-id>'.\n\n"+
21
+
"Examples:\n"+
22
+
" dune query run 12345\n"+
23
+
" dune query run 12345 --param wallet=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --param days=30\n"+
24
+
" dune query run 12345 --performance large --limit 100\n"+
25
+
" dune query run 12345 --no-wait",
26
+
Args: cobra.ExactArgs(1),
27
+
RunE: runRun,
24
28
}
25
29
26
-
cmd.Flags().StringArray("param", nil, "typed query parameter in key=value format (repeatable); numbers are stringified, datetimes use YYYY-MM-DD HH:mm:ss")
27
-
cmd.Flags().String("performance", "medium", `engine size for the execution: "medium" (default) or "large"; credits are consumed based on actual compute resources used`)
28
-
cmd.Flags().Int("limit", 0, "maximum number of result rows to return (0 = all)")
29
-
cmd.Flags().Bool("no-wait", false, "submit the execution and exit immediately, printing only the execution ID and state")
30
+
cmd.Flags().StringArray("param", nil, "query parameter in key=value format (repeatable)")
31
+
cmd.Flags().String("performance", "medium", `performance tier: "medium" (default) or "large" for higher compute resources`)
32
+
cmd.Flags().Int("limit", 0, "maximum number of rows to display (0 = all)")
33
+
cmd.Flags().Bool("no-wait", false, "submit execution and exit without waiting for results")
30
34
cmd.Flags().Int("timeout", 300, "maximum seconds to wait for the execution to complete before timing out")
cmd.Flags().String("sql", "", "the SQL query text in DuneSQL dialect (required)")
26
+
cmd.Flags().String("sql", "", "DuneSQL query to execute (required)")
23
27
_=cmd.MarkFlagRequired("sql")
24
-
cmd.Flags().StringArray("param", nil, "typed query parameter in key=value format (repeatable); numbers are stringified, datetimes use YYYY-MM-DD HH:mm:ss")
25
-
cmd.Flags().String("performance", "medium", `engine size for the execution: "medium" (default) or "large"; credits are consumed based on actual compute resources used`)
26
-
cmd.Flags().Int("limit", 0, "maximum number of result rows to return (0 = all)")
27
-
cmd.Flags().Bool("no-wait", false, "submit the execution and exit immediately, printing only the execution ID and state")
28
+
cmd.Flags().StringArray("param", nil, "query parameter in key=value format (repeatable)")
29
+
cmd.Flags().String("performance", "medium", `performance tier: "medium" (default) or "large" for higher compute resources`)
30
+
cmd.Flags().Int("limit", 0, "maximum number of rows to display (0 = all)")
31
+
cmd.Flags().Bool("no-wait", false, "submit execution and exit without waiting for results")
28
32
cmd.Flags().Int("timeout", 300, "maximum seconds to wait for the execution to complete before timing out")
0 commit comments