Description
Select rows with childIds equal to concept, deduplicate their parent IDs, and return the ordered list and count.
A controlled vocabulary separates concept identifiers, labels, languages, and hierarchy edges. Distinct literal labels and repeated identical records need different consistency checks.
Select rows with childIds equal to concept, deduplicate their parent IDs, and return the ordered list and count.
When to use this tool
Use Vocabulary Polyhierarchy Parent Count when you need a scoped vocabulary-label or ancestry diagnostic.
How to use the tool and how it works
- Enter concept, childIds, parentIds. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read parentCount, parentIdsForConcept. Use the output convention below.
Require aligned childIds and parentIds. Select rows with childIds equal to concept, deduplicate their parent IDs, and return the ordered list and count.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| concept | Concept | Required. Text; maximum UTF-16 length 8192. |
| childIds | Child Ids | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| parentIds | Parent Ids | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| parentCount | Parent Count | Required. Safe integer. |
| parentIdsForConcept | Parent Ids For Concept | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
{
"input": {
"concept": "a",
"childIds": [
"a",
"a",
"a"
],
"parentIds": [
"p1",
"p2",
"p1"
]
},
"output": {
"parentCount": 2,
"parentIdsForConcept": [
"p1",
"p2"
]
}
} Limitations and assumptions
- This reports direct parents only; duplicate edges collapse and cycles or semantic relation types are not checked.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Validate the complete vocabulary model and source identifiers, including language and hierarchy policies.
References
Similar or alternative tools
- Vocabulary Concept Branch Depth
Build parent sets from aligned edge arrays and traverse ancestors with an active-path cycle check and memoized depths.
- Document Relation Self Loop Flag
Return selfLoop when source equals target exactly.