Skip to content

file

Read file off of the local filesystem

input:
    file:
        filename: path_to_file
input:
    file:
        filename: path_to_file
        codec: Tail
        position_filename: path_to_position_file

Fields

filename

Path to the file to consume
Type: string
Required: true

codec

Enum to outline the type of file reader to implement
Type: string
Accepted values:
    Lines: Read the file line by line [default]
    ToEnd: Read the file in its entirity
    Tail: Read the file line by line, waiting for new data to be written

position_filename

Filename to track the position of tailed files Type: string Required: with codec: Tail

retry

Retry policy for failed reads. When present, the runtime retries failed reads with backoff.

Type: object Required: false

Field Type Default Description
max_retries integer 3 Maximum retry attempts
initial_wait string "1s" Wait before first retry
max_wait string "30s" Maximum wait cap
backoff string "exponential" Strategy: constant, linear, or exponential
input:
  retry:
    max_retries: 3
    initial_wait: "1s"
    backoff: "exponential"
  file:
    filename: path_to_file