Skip to content

Query run APP-7349#6

Merged
ivpusic merged 2 commits into
archive_queryfrom
query_run
Mar 3, 2026
Merged

Query run APP-7349#6
ivpusic merged 2 commits into
archive_queryfrom
query_run

Conversation

@ivpusic
Copy link
Copy Markdown
Member

@ivpusic ivpusic commented Mar 2, 2026

 dune query run 4125432

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member Author

ivpusic commented Mar 2, 2026

@ivpusic ivpusic changed the title Command to run the queries Query run APP-7349 Mar 3, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Mar 3, 2026

APP-7349 Step 8: `dune query run`

cmd/query/run.go — positional arg: query ID. Flags: --param key=value (repeatable), --performance medium|large, --limit, --no-wait, -o.

Calls QueryExecute(queryID, params). If --no-wait: print execution ID, exit. Otherwise: poll QueryResultsV2(executionID, options) every 2s. Print progress to stderr. On complete: display results. On fail: print error with line/column hint, exit 1.

Extract polling + display into shared helper (internal/poll.go) — reused by run-sql.

Output: --no-wait: Execution ID: 01JG... / table: rows + footer with row count and credits / json: full result object / csv: standard CSV.

Acceptance criteria:

  • Executes and prints results as table
  • --param flags parsed and passed
  • --performance large passed to API
  • --limit limits rows
  • --no-wait prints execution ID only
  • Failed execution prints error, exits 1
  • Progress shown on stderr during polling
  • -o json and -o csv work
  • Credits shown in table footer

Tests:

  • Param parsing ("key=value" → map)
  • No-wait mode returns execution ID
  • Successful execution renders table (mock API)
  • Failed execution prints error, exits 1
  • JSON and CSV output formats

@ivpusic ivpusic marked this pull request as ready for review March 3, 2026 08:46
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 3, 2026

PR Summary

Cursor Bugbot is generating a summary for commit 8d4e437. Configure here.

@ivpusic ivpusic requested a review from va3093 March 3, 2026 08:46
@ivpusic ivpusic merged commit 0d35496 into archive_query Mar 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants