Skip to content

Static

The static step allows you to include data from local files or inline values in your collection job. This is useful for including configuration files, static data, or any content that doesn’t require a collector.

  • filepath - Optional (string)

    Filepath is a local and relative path to a file. Symlinks and directories are not allowed.

  • value - Optional Template (string)

    Value is an inline value to use as the static value.

  • parse_as - Optional (string)

    ParseAs is the format to parse the value as.

    Must be one of: json , raw .

You must specify exactly one of filepath or value.

The parse_as option controls how the data is interpreted:

  • json (default): Parses the content as JSON and includes the resulting structure in the output
  • raw: Includes the content as-is without parsing

When parse_as is not specified:

  • Files with a .json extension are automatically parsed as JSON
  • All other content defaults to JSON parsing

When using parse_as: raw:

  • For files: {"filename": "<filepath>"}
  • For inline values: {"value": "<content>"}

When using parse_as: json, the parsed JSON structure is included directly.

steps:
- id: config
static:
filepath: ./config.json
steps:
- id: metadata
static:
value: |
{"environment": "production", "version": "1.0.0"}
parse_as: json
steps:
- id: readme
static:
filepath: ./README.md
parse_as: raw