G2PRegisterSchema
g2p_register_schemas - JSON schemas for datasets
The G2PRegisterSchema metadata table stores JSON-based configuration schemas used by the platform to control deduplication, search results, and filtering behavior for each register.
While ORM models define the structure of the data and Pydantic schemas define validation and API contracts, this metadata table allows the platform to dynamically configure UI behavior and search functionality without requiring changes to application code.
Each register can have a corresponding schema definition that specifies:
Attributes used for duplicate detection
Attributes displayed in search results
Attributes available for UI filtering
Attributes
register_id
Identifier of the register. References g2p_register_definitions.register_id.
deduplicate_schema
JSON defining attributes used by the deduplication algorithm to detect potential duplicate records.
search_result_schema
JSON defining attributes displayed in the Search Results page (up to eight attributes per result).
filter_schema
JSON defining attributes available as filter options on the register list page.
UI Behavior
Applicable to datasets classified as REGISTER or PROGRAM_REGISTER.
search_result_schema
Attributes shown in the search results list.
filter_schema
Attributes shown in the filter panel.
Related metadata
g2p_register_definitions
Reference Implementation
A reference implementation of G2PRegisterSchema can be found here in the Farmer Extension repository.
Last updated
Was this helpful?