steampipe
steampipe copied to clipboard
Variables in Batch Queries
Is your feature request related to a problem? Please describe.
Add CLI parameter --variable to interpolate in the SQL query. Like psql --variable.
Describe the solution you'd like
SELECT *
FROM jira_issue AS ji
WHERE AND ji.updated >= $1
steampipe query -v '2025-01-01' jira.sql
Describe alternatives you've considered
As workaround start steampipe service and use psql or usql.
Additional context
Steampipe v1.1.0.
Hey @artemklevtsov, thanks for the feature request.
However, the support for passing of variables to batch queries has not been added intentionally. Since we can run multiple SQL files or SQL statements in the steampipe batch query, it would be difficult to specify the variables.
(We can run multiple sql queries by passing multiple sql files/queries - e.g. steampipe query jira1.sql jira2.sql)
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.