Leaf Lake exposes your agronomic data through four tables. This page documents the schema of each table and provides example queries you can adapt.
Leaf Lake uses BigQuery SQL. All queries are automatically scoped to your API owner account — you only see data belonging to your Leaf users.
The points table
Each row represents a single data point from a machine file. The columns match the standardGeojson point properties produced by Leaf’s machine data pipeline. See Sample Output for the full property definitions.
Common columns (all operation types)
Planted columns
Harvested columns
Applied columns
Tillage columns
Filtering by field
Filter points to a specific Leaf field using the fieldIds column. No WKT boundary polygon needed.
You can also filter spatially using a WKT polygon with ST_Intersects, or join against the fields or states_counties tables. See the examples below.
Operations query examples
List operations on a field
See what operation types, crops, and date ranges exist for a field.
Planted: seed rate by variety and year
Planted: spatial point data
Retrieve individual planting points with coordinates for mapping.
Applied: summary by product and year
Applied: point data with product details
Harvested: yield statistics
Leaf Lake stores yield in metric units. Convert to bu/ac using crop-specific factors (corn: 62.77 kg/ha per bu/ac, soybeans: 67.25 kg/ha per bu/ac).
Harvested: outlier filtering with CTEs
Filter yield data to remove statistical outliers. Adjust the standard deviation threshold to control how aggressively outliers are removed. This replaces pipeline-level reprocessing — change the threshold and re-run the query.
Tillage: basic query
The fields table
Leaf field boundaries synced from the Fields API. Automatically scoped to your API owner account.
Join operations with field boundaries
Use the fields table to spatially join points with field boundaries instead of hardcoding WKT polygons.
The ssurgo table
The SSURGO (Soil Survey Geographic Database) table contains USDA soil map unit polygons with associated attributes.
Query soil units intersecting a field
Derive the field extent from your points using a CTE, then intersect with SSURGO.
Join harvest data with soil types
Calculate average yield by soil map unit within a field. This is a spatial join between the points table and ssurgo.
The states_counties table
US state and county boundary polygons for geographic grouping and filtering.
Filter operations by county
What to do next
Last modified on March 24, 2026