Managed JavaScript Stage

This stage runs a JavaScript manipulates a query using a script from the blob store. The script must have the blob type file:js-query.

Uploading a JavaScript blob

In Fusion 4.1, JavaScript blobs must be uploaded using the Blob Store API, like this:

curl -u user:pass -X PUT -H 'Content-Type: text/javascript' --data-binary @query-pipeline-js-stage.js http://localhost:8764/api/apollo/blobs/query-pipeline-js-stage.js?resourceType=file:js-query

Open the blob manager to verify that the new blob is present:

Uploaded JavaScript blob in the blob manager

Referencing a JavaScript blob

The format for the ref/Script Reference configuration field is a urn:x-fusion:blob: prefix followed by the blob ID, as in this example:

urn:x-fusion:blob:query-pipeline-js-stage.js

Configuration

Tip
When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.