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

Params don't work in args attribute of query step? #830

Closed
e-gineer opened this issue Apr 9, 2024 · 2 comments
Closed

Params don't work in args attribute of query step? #830

e-gineer opened this issue Apr 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@e-gineer
Copy link
Contributor

e-gineer commented Apr 9, 2024

Consider this test mod:

mod "local" {
  title = "flowpipe-mod-issues"
}

pipeline "query_with_args" {

    param "i" {
      type = number
      default = 1
    }

    step "query" "foo_param_fails_unexepectedly" {
      database = "postgres://steampipe@localhost:9193/steampipe"
      sql = "SELECT $1"
      args = [param.i]
    }

    step "query" "foo_constant_works" {
      database = "postgres://steampipe@localhost:9193/steampipe"
      sql = "SELECT $1"
      args = [2]
    }

}

It fails with this error:

src/flowpipe-mod-issues $ flowpipe pipeline run query_with_args --verbose
[flowpipe] Execution ID: exec_coaoqlco47mndn6comrg
[query_with_args] Starting pipeline
[query_with_args] Bad Request: foo_param_fails_unexepectedly: unable to parse args attribute to map[string]interface{}: expected map type
[query_with_args] Failed 3ms
@e-gineer e-gineer added the bug Something isn't working label Apr 9, 2024
@vhadianto
Copy link
Contributor

Fixed in pipe-fittings: turbot/pipe-fittings@71d080e

@vhadianto
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants