Build pipeline
Step-by-step guide to build a new Grepr pipeline from scratch. Use this when creating new pipelines or significantly modifying existing ones.From its SKILL.md
npx -y skills add grepr/cli --skill build-pipelineAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
7.6 KB, as published. Nobody here has run it
Building a Grepr Pipeline
This workflow guides you through creating a Grepr pipeline from requirements to production deployment.
Config handling
Resolve the org config once and reuse it on every command — see the grepr:cli skill.
Workflow Overview
- Gather requirements - Understand data source, processing needs, destinations
- Check existing resources - Datasets, integrations, reference pipelines
- Design job graph - Select operations, define data flow
- Test with sample data - Validate with LogsValuesSource
- Test with live data - Use sync streaming with sampler
- Deploy to production - Create async streaming job
- Validate in production - Query output dataset
Step 1: Gather Requirements
Ask the user these questions:
Data Source
- What is the data source? (Datadog, Splunk, OTEL, etc.)
- Is there an existing integration configured?
- What services/hosts should be included?
Processing Needs
- Does the data need parsing? (Grok patterns for unstructured logs)
- Are there JSON logs that need field extraction?
- Should logs be filtered? (Remove debug, exclude certain services)
- Should logs be reduced/deduplicated? (Cost optimization)
Destinations
- Where should processed data go?
- Data lake only (archival, querying)
- Vendor only (forward to observability platform)
- Both (archive + forward)
Special Requirements
- Any specific log formats to parse? → Use
grepr:build-grok - Need to route different logs differently? → Use branching pattern
- Multiple sources to consolidate? → Use multi-source pattern
Step 2: Check Existing Resources
# List available integrations
grepr integration:list --format table
# List existing datasets (for sink or reference)
grepr dataset:list --format table
# List existing pipelines for reference patterns
grepr job:list --processing STREAMING --format table
# Get an existing pipeline config as reference
grepr job:get <job-id> --format raw
Key information to gather:
- Integration IDs for sources and sinks
- Dataset IDs for data lake sinks
- Patterns from existing pipelines
Step 3: Design Job Graph
Use grepr:job-graph-patterns to select the appropriate pattern.
Common Pipeline Structure
source → filter → json-processor → remapper → [custom parsing] → reducer → sinks
Selecting Operations
Source (use grepr:operations-reference):
datadog-log-agent-sourcefor Datadogsplunk-log-agent-sourcefor Splunkotlp-log-agent-sourcefor OpenTelemetry
Processing chain:
logs-filter- Remove unwanted logs earlyjson-log-processor- Parse JSON in message fieldlog-attributes-remapper- Standardize field locationsgrok-parser- Parse unstructured logs (if needed)log-reducer- Deduplicate similar logs (if cost optimization needed)
Sinks:
logs-iceberg-table-sinkfor data lakedatadog-log-sink,splunk-log-sink, etc. for vendors
Building the Job JSON
Create a job definition file:
{
"name": "my_pipeline",
"execution": "ASYNCHRONOUS",
"processing": "STREAMING",
"desiredState": "RUNNING",
"jobGraph": {
"vertices": [
// Add vertices here
],
"edges": [
// Add edges here
]
},
"tags": {
"team": "my-team",
"environment": "production"
}
}
Step 4: Test with Sample Data
Before using live data, test with inline samples using logs-values-source:
{
"name": "test_pipeline_samples",
"execution": "SYNCHRONOUS",
"processing": "BATCH",
"jobGraph": {
"vertices": [
{
"name": "source",
"type": "logs-values-source",
"values": [
{
"message": "Sample log message matching expected format",
"tags": { "service": ["test-service"] },
"severity": 9
}
]
},
// ... rest of your pipeline transforms ...
{
"name": "sink",
"type": "logs-sync-sink"
}
],
"edges": [
// ... your edges, ending at logs-sync-sink ...
]
}
}
# Create and run the test job (job file is a positional arg)
grepr job:create test-pipeline-samples.json
Validate:
- Are logs being parsed correctly?
- Are fields extracted to the right locations?
- Are filters working as expected?
Step 5: Test with Live Data
Once sample data works, test with live streaming data (rate-limited):
{
"name": "test_pipeline_live",
"execution": "SYNCHRONOUS",
"processing": "STREAMING",
"jobGraph": {
"vertices": [
{
"name": "source",
"type": "datadog-log-agent-source",
"integrationId": "<integration-id>"
},
{
"name": "sampler",
"type": "logs-event-sampler",
"maxAllowedRate": 5.0,
"maxBurstLimit": 50,
"filter": {
"type": "datadog-query",
"query": "service:target-service"
}
},
// ... rest of your pipeline transforms ...
{
"name": "sink",
"type": "logs-sync-sink"
}
],
"edges": [
"source -> sampler",
// ... rest ending at logs-sync-sink ...
]
}
}
# Run live test (will stream results until cancelled)
grepr job:create test-pipeline-live.json
# Press Ctrl+C to stop
Validate with real data:
- Check a variety of log formats
- Verify edge cases are handled
- Confirm no unexpected errors
Step 6: Deploy to Production
Convert to production configuration:
- Change
executiontoASYNCHRONOUS - Remove
logs-event-sampler - Replace
logs-sync-sinkwith actual sinks - Add
desiredState: "RUNNING"
{
"name": "production_pipeline",
"execution": "ASYNCHRONOUS",
"processing": "STREAMING",
"desiredState": "RUNNING",
"jobGraph": {
"vertices": [
// ... production vertices with real sinks ...
],
"edges": [
// ... production edges ...
]
},
"tags": {
"environment": "production"
}
}
# Create the production pipeline
grepr job:create production-pipeline.json
# Verify it started
grepr job:list --state RUNNING --format table
Step 7: Validate in Production
After a few minutes, verify data is flowing:
# Check job status
grepr job:get <job-id> --format table
# Query the output dataset
grepr query --dataset-id <output-dataset-id> --limit 10 --format table
# Check for expected fields
grepr query --dataset-id <output-dataset-id> --query "service:target-service" --limit 5 -q --format raw -o output-sample.ndjson
Validation checklist:
- Job is in RUNNING state
- Data appearing in output dataset
- Fields are correctly parsed
- Reduction working as expected (if enabled)
Troubleshooting
Job FAILED
- Contact Grepr support at [email protected] with the job ID.
No data in output
- Verify filter predicates aren't too restrictive
- Check source integration is receiving data
- Query raw data first to confirm data exists
Parsing not working
- Use
grepr:build-grokto test patterns - Check predicate is matching target logs
- Verify pattern escaping in JSON
Quick Reference
| Phase | Execution | Processing | Sink |
|---|---|---|---|
| Sample test | SYNCHRONOUS | BATCH | logs-sync-sink |
| Live test | SYNCHRONOUS | STREAMING | logs-sync-sink + sampler |
| Production | ASYNCHRONOUS | STREAMING | real sinks |