Repository navigation
feat(query): read SQL from @file or stdin (@-) - #163
Merged
Merged
Conversation
leonkenneth
approved these changes
Oct 20, 2026
Member
|
@utay Should we reuse the altertable query @report.sql
cat report.sql | altertable query @-This would keep file input consistent across commands, preserve the required positional argument, and avoid introducing |
robinvrd
approved these changes
Oct 20, 2026
Member
Author
Yes good idea, here Cursor spotted the |
Replace --file with the @file convention shared with append and api -F. Move @path/@- handling into a shared readFileArgument helper, which also lets append read from stdin with @-. Co-authored-by: Cursor <cursoragent@cursor.com>
francoischalifour
approved these changes
Oct 20, 2026
utay
enabled auto-merge (squash)
October 20, 2026 14:17
utay
pushed a commit
that referenced
this pull request
Oct 20, 2026
🤖 I have created a release *beep* *boop* --- ## [1.13.0](v1.12.0...v1.13.0) (2026-10-20) ### Features * **app:** adopt split data-app packages ([#160](#160)) ([7725d45](7725d45)) * **apps:** preview single-file data apps with app dev --file ([#141](#141)) ([7dbc130](7dbc130)) * **query:** read SQL from [@file](https://github.com/file) or stdin (@-) ([#163](#163)) ([1b0a5e9](1b0a5e9)) ### Bug Fixes * **config:** keep credential storage independent of working directories ([#158](#158)) ([4902463](4902463)) * **query:** surface engine errors and preserve stream failures ([#159](#159)) ([f892be8](f892be8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
altertable querynow accepts the@fileconvention already used byappendandapi -F:@pathreads the statement from a file;@-reads stdin. The positional statement stays required.File not found: <path>. An empty file or empty stdin is rejected.Notes
@path/@-handling moves into a sharedreadFileArgumenthelper used byquery,append, andapi -F, soappendnow also accepts@-.README.md,COMMANDS.md, andcli-reference.jsonare updated to match.