MacroHealth Internal

Shovel Expression Language Tester

The Shovel Expression Language Tester allows evaluating and formatting shovel expressions against a runtime context uploaded or pasted into the tester, directly in a web interface.

Accessing

The Shovel Expression Language Tester can be accessed directly through the MacroHealth Platform by clicking the </> icon in the upper right corner. The Tester will open in a new tab in your browser.

Accessing.png
Testing a Shovel Expression
  1. Click the Shovel Expression Tester icon.

    ClickIcon.png
    ShovelExpTesterInterface.png
  2. Write your expression in the Expressions text box on the left. It is possible to evaluate more than one Shovel Expression, but only one can be written per text box.

    ExpressionWritten.png
  3. Click </> to format the Shovel Expression so it is easier to read and edit if needed.

    ShovelExpFormated.png
  4. Click Upload Context File. You can get the Context File directly from NiFi.

    ClickUploadContextFile.png
  5. Retrieve the Context File.

    RetrieveContextFile.png
  6. Click Open.

    ContextFileOpen.png
  7. The Context File will be displayed under Context.

    ContextFileDisplayed.png
  8. Click Evaluate Expressions.

    ClickEvaluateExpressions.png
  9. The response to the evaluation will be displayed under Results.

    If the Shovel Expression is correct, the result will display a green check and the list of segments that were required in order for the Shovel Expression to be valid.

    Results.png

    If the Shovel Expression is incorrect, the result will display a red X and will inform you of the issue that is causing the Shovel Expression to be invalid.

    ErrorResult.png
Adding a Shovel Expression to Test
  1. Click Add Expression.

    ClickAddExpression.png
    AddExpressionClicked.png
  2. Copy and paste the Shovel Expression in the expression-2 box.

    AddShovelExpCopied.png
  3. Click</> to format the Shovel Expression.

    AddExpClickFormat.png
  4. The Shovel Expression will be formatted.

    AddExpFormatted.png
  5. Proceed to Step 4 of the previous section.