Description
Check literal membership of code in knownCodes and equality of actualSource with expectedSource.
Farm data records connect field, event, sensor and source identifiers with observation and verification flags. Literal keys and supported-record shares help reconcile those records without authenticating a source, identifying a physical object or establishing measurement quality. Repeated IDs may need a different denominator from repeated rows.
Check literal membership of code in knownCodes and equality of actualSource with expectedSource.
When to use this tool
Use Agricultural Unit Code Source Gap when checking the stated agricultural source, identity or record-support convention.
How to use the tool and how it works
- Enter code, expectedSource, actualSource, knownCodes. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read codeListed, sameSource, usableUnderTokens. Inspect codeListed, sameSource, usableUnderTokens before interpreting the associated values.
Check literal membership of code in knownCodes and equality of actualSource with expectedSource. usableUnderTokens is their conjunction.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| code | Literal supplied code; no external registry lookup. | Required. Text; maximum UTF-16 length 8192. |
| expectedSource | Expected Source | Required. Text; maximum UTF-16 length 8192. |
| actualSource | Actual Source | Required. Text; maximum UTF-16 length 8192. |
| knownCodes | Known Codes | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| codeListed | Code Listed | Required. Boolean. |
| sameSource | Same Source | Required. Boolean. |
| usableUnderTokens | Usable Under Tokens | Required. Boolean. |
{
"input": {
"code": "ha",
"expectedSource": "A",
"actualSource": "A",
"knownCodes": [
"ha",
"m2"
]
},
"output": {
"codeListed": true,
"sameSource": true,
"usableUnderTokens": true
}
} Limitations and assumptions
- Token membership does not validate a physical unit, conversion factor or authoritative source.
- 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
Inspect original records, authoritative identifier schemes and calibrated measurements before merging data or drawing agricultural conclusions.
References
Similar or alternative tools
- Agricultural Survey Option Code Version
Independently check allowed-code membership and exact equality of version with expectedVersion.
- Farm Sensor Channel Code Source Pair
Return exact channel-and-source concordance with supplied expected labels.