query-reference-material
Run SQL queries to retrieve reference data that translates natural language requests into specific IDs and terms for querying the NPN API.
Instructions
Query an SQL database for reference material that can be used to translate natural language into specific ids and terms needed for querying the NPN API with other tools. There is no need to query the 'datasets' table unless specific observer groups are mentioned. The Tables have the following structure:
Table: species, Length: 1940, Headers: ['species_id', 'common_name', 'genus', 'genus_id', 'genus_common_name', 'species', 'kingdom', 'itis_taxonomic_sn', 'functional_type', 'class_id', 'class_common_name', 'class_name', 'order_id', 'order_common_name', 'order_name', 'family_id', 'family_name', 'family_common_name', 'species_type']
Description: Contains info on species
Table: phenophases, Length: 400, Headers: ['definition_id', 'phenophase_id', 'phenophase_name', 'definition', 'start_date', 'end_date', 'dataset_id', 'comments']
Description: Contains info on phenophases
Table: phenoclasses, Length: 230, Headers: ['phenophase_id', 'phenophase_description', 'definition_ids', 'phenophase_names']
Description: Contains info on phenoclasses (a grouping of phenophases)
Table: datasets, Length: 14, Headers: ['dataset_id', 'dataset_name', 'dataset_description', 'dataset_comments', 'dataset_documentation_url']
Description: Contains info on datasets and their contributors
Table: networks, Length: 924, Headers: ['network_id', 'network_name']
Description: Contains info on observation groups or networks (aka partner groups)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql_query | Yes | SQL query to run against the SQLite3 database to fetch relevant data. |