Primary Grail tag rules in OpenPipeline derive and assign primary_tags.* from existing record fields via the Primary Grail tags configuration scope. All rules are evaluated before ingest-preprocessing time, before routing, and apply globally, to any incoming record of any type.
Use it to promote existing record fields to primary_tags.*, or as a fallback when earlier-stage enrichment and central tag configuration don't cover your use case.
Prerequisites
Review tagging best practices and ensure that other enrichment options don't cover your use case.
Permissions: settings:objects:write for the builtin:openpipeline.primary-grail-tag scope.
The source fields to map are present on incoming records as top-level fields with string or numeric single values. To normalize or transform a value after it's set, you can use the DQL processor.
Configure a new primary Grail tag rule
Go to Settings > Process and contextualize > OpenPipeline> Primary Grail tags.
Select New rule.
Define the rule.
Enter the rule name.
In the Primary Grail tag field name, enter a key after the fixed prefix primary_tags.; for example, env produces primary_tags.env.
Enter a matching condition.
The default true matches all records.
Existing primary_tags.* values are overwritten by default. To skip overwriting existing values, set the matching condition to isNull(primary_tags.<key>).
Add and order source fields. The used value is the first field that exists on the record with a non-null value.
Choose to turn on/off Keep source field.
Turn on to retain source fields on the record, alongside the new primary tag, and set primary tags on both top-level and nested fields.
Turn off to remove source fields. Primary tags won't be set on nested fields. Note that Primary Grail fields and important Semantic Dictionary fields, such as k8s.namespace.name or aws.account.id, are always retained regardless of this setting. Applies to all source fields in the rule.
Select Save and close.
The new rule is added to the list.
Next steps
Use the resulting primary_tags.* fields for routing decisions and further processing, such as bucket assignment or access control policies.
Use cases
Consolidate equivalent fields from different sources under a single primary tag—When the same tag is represented by different field names depending on the record type and sources, for example, aws.tags.env, azure.tags.env, and gcp.labels.env, a single configuration maps all variants to primary_tags.env centrally.