fix: address CLI UX feedback — file input, region hints, comment handling#12
Merged
rahim-bhojani merged 2 commits intomainfrom Apr 7, 2026
Merged
fix: address CLI UX feedback — file input, region hints, comment handling#12rahim-bhojani merged 2 commits intomainfrom
rahim-bhojani merged 2 commits intomainfrom
Conversation
…ling - Add --file flag and stdin support to `dremio query run` so multi-line SQL no longer requires shell escaping (supports --file path, piped stdin, and '-' argument) - Enrich 401 errors with a region hint when the default US endpoint is used, saving EU users from a confusing debugging loop - Put breadcrumb comment on its own line so SQL with -- inline comments is no longer swallowed by the prepended comment - Show config file path and region info in `dremio setup --help` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02ada65efa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address review feedback: leverage typer's exists/file_okay/dir_okay/ readable/allow_dash options instead of manual checks. This gives proper error messages for directories, missing files, and unreadable files out of the box, and simplifies the input resolution logic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aniket-s-kulkarni
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses CLI feedback from a marketing data engineer building a semantic layer with Dremio Cloud EU + Claude Code:
--fileand stdin support fordremio query run— Multi-line SQL (CREATE VIEW, CTEs) no longer requires shell escaping. Supports--file query.sql, piped stdin, anddremio query run -for reading from stdin.api.dremio.cloud), the error now suggests checking the EU endpoint. Previously took ~45 min to diagnose.--SQL comments being swallowed — The breadcrumb comment (/* dremio-cli: submitter=cli */) is now on its own line, so--inline comments in user SQL no longer comment out the rest of the query.dremio setup --help— Help text now shows where the config file is written and that region (US/EU) is prompted.Test plan
dremio query run "SELECT 1"— inline arg still worksdremio query run --file query.sql— reads and executes SQL from fileecho "SELECT 1" | dremio query run -— reads from stdindremio query runwith no args — shows helpful errordremio query run --file missing.sql— shows file-not-found errordremio query run "-- comment\nSELECT 1"— comment doesn't break querydremio setup --helpshows config file path and region info🤖 Generated with Claude Code