Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions workflows/data/rss-feed-ingest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ steps:
# - References current item in foreach loop
# -------------------------------------------------------------------------
- name: index_article
type: elasticsearch.request
type: elasticsearch.bulk
with:
method: "POST"
path: "/logs/_bulk"
headers:
content-type: application/x-ndjson
body: |
{ "create": {} }
{"rss.title": {{ foreach.items[foreach.index].title | json }}, "@timestamp": {{ foreach.items[foreach.index].pubDate | date: "%Y-%m-%dT%H:%M:%S%z" | json }}, "rss.link": {{ foreach.items[foreach.index].link | json }}, "rss.message": {{ foreach.items[foreach.index].description | json }}}
index: "logs"
operations:
- create: {}
- name: "{{ foreach.items[foreach.index].title }}"
rss.title: "{{ foreach.items[foreach.index].title | json }}"
"@timestamp": '{{ foreach.items[foreach.index].pubDate | date: "%Y-%m-%dT%H:%M:%S%z" | json }}'
rss.link: "{{ foreach.items[foreach.index].link | json }}"
rss.message: "{{ foreach.items[foreach.index].description | json }}"
7 changes: 6 additions & 1 deletion workflows/examples/national-parks-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# Created: 2025-11-09
# Tags: demo, getting-started
# =============================================================================
version: 1
name: 🏔️ National Parks Demo
description: Creates an Elasticsearch index, loads sample national park data using bulk operations, searches for parks by category, and displays the results.
enabled: true
Expand Down Expand Up @@ -150,13 +149,15 @@ steps:
type: elasticsearch.bulk
with:
index: "{{ consts.indexName }}"
refresh: wait_for # wait for documents to be available for search, so the next step can find them
operations:

# -------------------------------------------------------------------------
# STEP 8: Yellowstone National Park
# -------------------------------------------------------------------------
# Executes the specified action with the configured parameters.
# -------------------------------------------------------------------------
- create: {}
- name: "Yellowstone National Park"
category: "geothermal"
description: "America's first national park, established in 1872, famous for Old Faithful geyser and diverse wildlife including grizzly bears, wolves, and herds of bison and elk."
Expand All @@ -168,6 +169,7 @@ steps:
# -------------------------------------------------------------------------
# Executes the specified action with the configured parameters.
# -------------------------------------------------------------------------
- create: {}
- name: "Grand Canyon National Park"
category: "canyon"
description: "Home to the immense Grand Canyon, a mile deep gorge carved by the Colorado River, revealing millions of years of geological history in its colorful rock layers."
Expand All @@ -179,6 +181,7 @@ steps:
# -------------------------------------------------------------------------
# Executes the specified action with the configured parameters.
# -------------------------------------------------------------------------
- create: {}
- name: "Yosemite National Park"
category: "mountain"
description: "Known for its granite cliffs, waterfalls, clear streams, giant sequoia groves, and biological diversity. El Capitan and Half Dome are iconic rock formations."
Expand All @@ -189,6 +192,7 @@ steps:
# -------------------------------------------------------------------------
# Executes the specified action with the configured parameters.
# -------------------------------------------------------------------------
- create: {}
- name: "Zion National Park"
category: "canyon"
description: "Utah's first national park featuring cream, pink, and red sandstone cliffs soaring into a blue sky. Famous for the Narrows wade through the Virgin River."
Expand All @@ -199,6 +203,7 @@ steps:
# -------------------------------------------------------------------------
# Executes the specified action with the configured parameters.
# -------------------------------------------------------------------------
- create: {}
- name: "Rocky Mountain National Park"
category: "mountain"
description: "Features mountain environments, from wooded forests to mountain tundra, with over 150 riparian lakes and diverse wildlife at various elevations."
Expand Down