Checked for duplicates
Yes - I've already checked
π§βπ¬ User Persona(s)
Data User, New PDS User, Data Engineer, LLM/AI Systems
πͺ Motivation
...so that I can discover available fields, search for field names, and validate my queries without needing to memorize complex PDS4 field naming conventions or consult external documentation.
π Additional Details
Current Behavior:
- β
fields() method allows selecting specific fields
- β No way to discover what fields are available
- β No validation of field names before query execution
- β Typos in field names result in silent failures or runtime errors
- β Must consult external PDS4 documentation
Proposed Solution:
Provide tools to discover, search, and validate field names:
# Discover available fields from sample results
available = products.has_target("Mars").list_fields(sample_size=10)
# Returns: ["lidvid", "pds:Identification_Area.pds:title", ...]
# Search for fields by keyword
products.search_fields("citation")
# Returns: ["pds:Citation_Information.pds:doi", ...]
# Search fields by category
products.search_fields(category="temporal")
# Returns: ["pds:Time_Coordinates.pds:start_date_time", ...]
# Validate field names with suggestions
products.fields(["pds:Title", "pds:start_date"]).validate()
# Suggests: "pds:Title" not found. Did you mean "pds:Identification_Area.pds:title"?
# Get field description
products.describe_field("pds:Citation_Information.pds:doi")
# Returns: {"description": "Digital Object Identifier...", "type": "string"}
# List common fields
products.common_fields(category="spatial")
Implementation Approach:
list_fields(sample_size) - discover available fields via sampling
search_fields(keyword, category) - keyword/category search with fuzzy matching
validate() - validate field names with suggestions using RapidFuzz (existing dependency)
common_fields(category) - return predefined common fields
describe_field(name) - return field documentation
- Field categories: spatial, temporal, identification, citation, processing
Benefits:
- Reduce need for external PDS4 documentation
- Catch typos early with helpful suggestions
- Lower barrier to entry for new users
- Enable LLM/AI systems to discover fields dynamically
Related:
For Internal Dev Team To Complete
Acceptance Criteria
Given a user wants to find temporal-related fields
When I perform products.search_fields(category="temporal")
Then I expect a list of temporal field names like pds:Time_Coordinates.pds:start_date_time
βοΈ Engineering Details
To be filled by Engineering Node Team
π I&T
To be filled by Engineering Node Team
Checked for duplicates
Yes - I've already checked
π§βπ¬ User Persona(s)
Data User, New PDS User, Data Engineer, LLM/AI Systems
πͺ Motivation
...so that I can discover available fields, search for field names, and validate my queries without needing to memorize complex PDS4 field naming conventions or consult external documentation.
π Additional Details
Current Behavior:
fields()method allows selecting specific fieldsProposed Solution:
Provide tools to discover, search, and validate field names:
Implementation Approach:
list_fields(sample_size)- discover available fields via samplingsearch_fields(keyword, category)- keyword/category search with fuzzy matchingvalidate()- validate field names with suggestions using RapidFuzz (existing dependency)common_fields(category)- return predefined common fieldsdescribe_field(name)- return field documentationBenefits:
Related:
fields()method (As a user, I want to limit the number of fields returnedΒ #64)For Internal Dev Team To Complete
Acceptance Criteria
Given a user wants to find temporal-related fields
When I perform
products.search_fields(category="temporal")Then I expect a list of temporal field names like
pds:Time_Coordinates.pds:start_date_timeβοΈ Engineering Details
To be filled by Engineering Node Team
π I&T
To be filled by Engineering Node Team