Home
Overview
Fundamentals
Glossary
Cheatsheet
API Reference
Quick Recipes
Deep Dive
Common Pitfalls and Gotchas
Persistent Storage
Operators that work on DataBags.
kd.bags.enriched(*bags)Aliases:
Creates a new immutable DataBag enriched by `bags`.
It adds `bags` as fallbacks rather than merging the underlying data thus
the cost is O(1).
Databags earlier in the list have higher priority.
`enriched_bag(bag1, bag2, bag3)` is equivalent to
`enriched_bag(enriched_bag(bag1, bag2), bag3)`, and so on for additional
DataBag args.
Args:
*bags: DataBag(s) for enriching.
Returns:
An immutable DataBag enriched by `bags`.
kd.bags.is_null_bag(bag)Aliases:
Returns `present` if DataBag `bag` is a NullDataBag.
kd.bags.new()Alias for kd.types.DataBag.empty
kd.bags.updated(*bags)Aliases:
Creates a new immutable DataBag updated by `bags`.
It adds `bags` as fallbacks rather than merging the underlying data thus
the cost is O(1).
Databags later in the list have higher priority.
`updated_bag(bag1, bag2, bag3)` is equivalent to
`updated_bag(bag1, updated_bag(bag2, bag3))`, and so on for additional
DataBag args.
Args:
*bags: DataBag(s) for updating.
Returns:
An immutable DataBag updated by `bags`.