json-url-output

Sequence that pulls data from JSON url every x seconds and writes it to Instance output endpoint.

Description

  • Name: @scramjet/json-url-output
  • Version: 0.23.0
  • Language: javascript
  • Author: a-tylenda
  • Tags: easy,API,data collection,Big Data/BI,Data Producer

This is a simple Sequence that pulls data from JSON url every x seconds and writes it to Instance stdout endpoint. The Sequence takes two arguments:

Running

❗ Remember to setup transform-hub locally or use the platform's environment for the sequence deployment.

Sequence is ready to use, id doesn't use any external modules so no dependencies need to be installed.

Open the terminal and run the following commands:

# go to 'javascript' directory cd javascript # deploy 'json-url-output' Sequence si seq deploy json-url-output --args [\"https://api.agify.io?name=bella\",10000] # see the Instance output si inst output -

Output

Result:

$ si inst output - { name: 'bella', age: 35, count: 40138 } { name: 'bella', age: 35, count: 40138 }

The request is sent to API every 10 seconds, so the result will be printed out after every request until the Instance is stopped.