Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Schwartz committed Feb 5, 2024
1 parent c69a1cc commit 0510bd8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/docs/api-reference/starlark-reference/exec-recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

:::

Expand Down

0 comments on commit 0510bd8

Please sign in to comment.