pipeline_create
Create ingest pipelines to transform and enrich data before indexing. Define processors for field manipulation, parsing, and error handling in Easysearch.
Instructions
创建 Ingest Pipeline
参数:
id: Pipeline ID
description: 描述
processors: 处理器列表
on_failure: 失败处理器列表
示例:
pipeline_create("my-pipeline", "Add timestamp", processors=[
{"set": {"field": "@timestamp", "value": "{{_ingest.timestamp}}"}}
])
常用处理器:
- set: 设置字段值
- remove: 删除字段
- rename: 重命名字段
- convert: 类型转换
- grok: 正则解析
- date: 日期解析
- json: JSON 解析
- split: 字符串分割
- trim: 去除空白
- lowercase/uppercase: 大小写转换
- script: 脚本处理
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| description | Yes | ||
| processors | Yes | ||
| on_failure | No |