Skip to content

Commit

Permalink
Rename --data to --variables in snow sql (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-turbaszek committed May 10, 2024
1 parent 6e5f8b2 commit c426153
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@
## Deprecations

## New additions
* `snow sql` command supports now client-side templating of queries.

## Fixes and improvements


# v2.3.0

## Backward incompatibility

## Deprecations

## New additions
* New `snow sql` functionality:
* `-D/--variable` allows variable substitutions in a SQL input (client-side query templating)
* New `snow app deploy` functionality:
* Passing files and directories as arguments syncs these only: `snow app deploy some-file some-dir`.
* `--recursive` syncs all files and subdirectories recursively.
Expand Down
2 changes: 1 addition & 1 deletion src/snowflake/cli/plugins/sql/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def execute_sql(
),
data_override: List[str] = typer.Option(
None,
"--data",
"--variable",
"-D",
help="String in format of key=value. If provided the SQL content will "
"be treated as template and rendered using provided data.",
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/test_help_messages.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -5083,7 +5083,7 @@
│ --filename -f FILE File to execute. [default: None] │
│ --stdin -i Read the query from standard input. Use it when │
│ piping input to this command. │
│ --data -D TEXT String in format of key=value. If provided the SQL │
│ --variable -D TEXT String in format of key=value. If provided the SQL │
│ content will be treated as template and rendered │
│ using provided data. │
│ [default: None] │
Expand Down

0 comments on commit c426153

Please sign in to comment.