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

Trigger Documentation doesn't support file function #394

Closed
graza-io opened this issue May 9, 2024 · 1 comment
Closed

Trigger Documentation doesn't support file function #394

graza-io opened this issue May 9, 2024 · 1 comment
Labels
blocker bug Something isn't working

Comments

@graza-io
Copy link
Contributor

graza-io commented May 9, 2024

Context

Attempting to use documentation on a Query Trigger using a markdown file gives an error.

However it does seem to support using a string or "heredoc" approach.

Reproduction

mod.fp

mod "local" {
  title = "z"
}

trigger "query" "t" {
  title = "Trigger Title"
  description = "Trigger Description"
  documentation = file("README.md")

  enabled  = false
  schedule = "0 0 * * *"
  database = ""
  sql      = ""

  capture "insert" {
    pipeline = pipeline.p
    args = {
      items = self.inserted_rows
    }
  }
}

pipeline "p" {
  step "transform" "t" {
    value = "hi"
  }
}

Then run flowpipe server:

[flowpipe] error unable to start server: Internal Error: Failed to decode mod: Function calls not allowed: Functions may not be called here.

Working Example

mod "local" {
  title = "z"
}

trigger "query" "t" {
  title = "Trigger Title"
  description = "Trigger Description"
  documentation = <<-EOF
## Hello World

This is a markdown **text** in a heredoc!
  EOF

  enabled  = false
  schedule = "0 0 * * *"
  database = ""
  sql      = ""

  capture "insert" {
    pipeline = pipeline.p
    args = {
      items = self.inserted_rows
    }
  }
}

pipeline "p" {
  step "transform" "t" {
    value = "hi"
  }
}
[flowpipe] Loaded mod.local
[trigger.query.t] Disabled
[flowpipe] Press Ctrl C to exit
@vhadianto
Copy link
Contributor

Released in v1.2.1

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

No branches or pull requests

2 participants