Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johnsmyth opened this issue Mar 27, 2024 · 4 comments
Open

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

johnsmyth opened this issue Mar 27, 2024 · 4 comments
Labels
enhancement New feature or request stale No recent activity has been detected on this issue/PR and it will be closed

Comments

@johnsmyth
Copy link

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:

  • you may pass more than one --arg
  • args are positional and the order determines to which parameter they refer - the first --arg is $1, the second is $2, etc

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

@johnsmyth johnsmyth added the enhancement New feature or request label Mar 27, 2024
Copy link

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 github-actions bot added the stale No recent activity has been detected on this issue/PR and it will be closed label May 27, 2024
@kaidaguerre kaidaguerre removed the stale No recent activity has been detected on this issue/PR and it will be closed label Jun 3, 2024
Copy link

github-actions bot commented Aug 3, 2024

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 github-actions bot added the stale No recent activity has been detected on this issue/PR and it will be closed label Aug 3, 2024
Copy link

github-actions bot commented Sep 2, 2024

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
@pskrbasu pskrbasu removed the stale No recent activity has been detected on this issue/PR and it will be closed label Oct 1, 2024
@pskrbasu pskrbasu reopened this Oct 1, 2024
Copy link

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 github-actions bot added the stale No recent activity has been detected on this issue/PR and it will be closed label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale No recent activity has been detected on this issue/PR and it will be closed
Projects
None yet
Development

No branches or pull requests

3 participants