turbot / steampipe

Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.
https://steampipe.io
GNU Affero General Public License v3.0
6.92k stars 274 forks source link

Add support for passing args to non-interactive queries #4221

Open johnsmyth opened 7 months ago

johnsmyth commented 7 months ago

Is your feature request related to a problem? Please describe.

At present, there is no way to pass arguments to parameterized queries when running steampipe query non-interactively. In the past, you could use a named query as a workaround, but this capability is being removed in a future version (mod support is being removed as part of the unbundling of Powerpipe).

Describe the solution you'd like Add support for passing --args to be passed into the query.

steampipe query my_query.sql --arg "arg 1" --arg "second arg"

This should work for both .sql files and queries in the command, and should behave the same as Powerpipe:

Unlike powerpipe, steampipe allows more than one query to be passed to a single command. In this case, the same set of args should be passed to all the queries, in the same order.

Additional context https://turbot-community.slack.com/archives/C01UECB59A7/p1710947264260629

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 90 days with no activity.