Skip to content

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

Closed
@e-gineer

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions