Source
yaml
id: load-pokemon
namespace: company.team
inputs:
- id: pokemon
type: STRING
defaults: psyduck
tasks:
- id: fetch_pokemon
type: io.kestra.plugin.core.http.Request
uri: https://pokeapi.co/api/v2/pokemon/{{ inputs.pokemon }}
method: GET
- id: load
type: io.kestra.plugin.mongodb.InsertOne
connection:
uri: mongodb://host.docker.internal:27017/
database: local
collection: pokemon
document: "{{ outputs.fetch_pokemon.body }}"
About this blueprint
Ingest
This flow will load a pokemon from the PokeAPI into a MongoDB database. The Pokémon name can be provided as an input at runtime.
More Related Blueprints