Loading

Process your documents with Streams

Most log data arrives as unstructured text. To filter, search, and analyze it effectively, you need to extract fields from that raw content. For example, extracted fields let you filter for log messages with an ERROR log level that occurred during a specific time period to help diagnose an issue.

The Streams Processing tab provides a single place to build and manage your document processing pipeline:

Streams uses Elasticsearch ingest pipelines underneath made up of processors and conditions to transform your data, without requiring you to switch interfaces and manually update pipelines.

  1. Open the Processing tab

    1. Open Streams from the navigation menu or use the global search field.
    2. Select your stream from the list.
    3. Go to the Processing tab.
  2. Add processors and conditions

    Use any combination of the following options to build your processing pipeline:

    • Suggest a pipeline: Let Streams analyze your sample data and generate a complete processor pipeline using AI.
    • Manually add processors: Select and configure individual processors yourself when you know which transformations you need.
    • Add conditions: Attach Boolean expressions to define when to run processors.
  3. Preview changes

    The Data preview table loads 100 documents from your existing data and updates automatically when you add or edit processors or conditions. To fetch new samples and rerun the simulation, select the refresh icon .

    For any newly created processors and conditions, the preview results are reliable, and you can freely create and reorder processors and conditions during the preview.

    If you edit the stream after saving your changes, keep the following in mind:

    • Adding processors to the end of the list works as expected.
    • Editing or reordering existing processors can cause inaccurate results. Because the pipeline might have already processed the documents used for sampling, Data preview cannot accurately simulate changes to existing data.

    You can also adjust the which documents the preview uses:

    1. From the Processing tab, select the Manage data sources icon.
    2. Select Add data source, then Add KQL search samples.
    3. Add a filter using KQL syntax and adjust the time window to include the data you want to use as a sample.

    The preview automatically uses your new data source.

  4. Detect and resolve failures and mapping conflicts

    Streams helps you catch issues before you apply your processors:

    • Failures: A processor couldn't parse or transform a document, usually due to a mismatched pattern or missing field.
    • Mapping conflicts: A processor produced a field type that conflicts with the existing index mapping.
  5. Save changes

    After adding all of your processors and conditions and addressing any issues, select Save changes. Streams parses all future data ingested into the stream according to your pipeline.

    Note

    Applied changes aren't retroactive and only affect future ingested data.

The Streams processing UI provides an interactive mode and a YAML mode for editing processors and conditions.

To switch modes, select the appropriate tab from the top of the processing page.

Streams defaults to interactive mode unless the configuration can't be represented in interactive mode (for example, when nesting levels are too deep).

Interactive mode provides a form-based interface for creating and editing processors. This mode works best for:

  • Users who prefer a guided, visual approach
  • Configurations that don't require deeply nested conditions

YAML mode provides a code editor for writing Streamlang directly. This mode works best for:

  • Users who prefer working with code
  • Advanced configurations with complex or deeply nested conditions

Refer to the Streamlang reference for the complete syntax, condition operators, and examples.

  • Streams does not support all ingest processors. Refer to the Streamlang reference for supported processors.
  • The data preview simulation might not accurately reflect the changes to the existing data when editing existing processors or re-ordering them.
  • Streams can't properly handle arrays. Although it supports basic actions like appending or renaming, it can't access individual array elements. For classic streams, the workaround is to use the manual pipeline configuration that supports Painless scripting and all ingest processors.

When you save processors in the Streams UI, Streams automatically manages the underlying ingest pipeline configuration. You don't need to edit pipeline JSON directly. Streams identifies the best-matching pipeline for your data stream, appends your processing logic to it, and maintains a dedicated managed pipeline to keep your changes isolated and reproducible. Expand the following section for more detail on how Streams applies processing changes.