From 0510bd86c37733f1a0e669ded8323ffef753afb5 Mon Sep 17 00:00:00 2001 From: Anders Schwartz Date: Mon, 5 Feb 2024 16:40:38 -0500 Subject: [PATCH] update --- .../starlark-reference/exec-recipe.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/docs/api-reference/starlark-reference/exec-recipe.md b/docs/docs/api-reference/starlark-reference/exec-recipe.md index db94be4888..f82baa3560 100644 --- a/docs/docs/api-reference/starlark-reference/exec-recipe.md +++ b/docs/docs/api-reference/starlark-reference/exec-recipe.md @@ -49,18 +49,28 @@ def run(plan, args={}): ) ) cmd = ''' echo '{"key": "value"}' ''' - plan.exec( + result = plan.exec( service_name = "service", recipe = ExecRecipe( command = ["/bin/sh", "-c", cmd], extract = { - "key": "fromjson | .key" + "example_reference_key": "fromjson | .key" } ), ) + plan.print(result["output"]) + plan.print(result["extract.example_reference_key"]) ``` +will output: +``` +> print msg="{{kurtosis:1f60460f3eee4036af01b41fc2ecddc0:output.runtime_value}}" +{"key": "value"} + +> print msg="{{kurtosis:1f60460f3eee4036af01b41fc2ecddc0:extract.example_reference_key.runtime_value}}" +value +``` :::