{
  "schemaVersion": "waztap.qa-report/1",
  "datasetId": "usda-foundation",
  "source": {
    "name": "USDA FoodData Central Foundation Foods",
    "release": "2026-04-30",
    "url": "https://fdc.nal.usda.gov/download-datasets/",
    "fetchedAt": "2026-10-11T22:51:35.118434Z",
    "files": [
      {
        "path": "FoodData_Central_foundation_food_csv_2026-04-30.zip",
        "sha256": "70457ee9d9342f43bda2010318c85f04210c689fdeb9cd2da4c513b0e8dbc655",
        "bytes": 3825741
      },
      {
        "path": "original-download-catalog.html",
        "sha256": "9e42f82dac3ba51ce7949affd7e2ae318ebe8bbb8c38a296e622bf1486b4b948",
        "bytes": 160418
      },
      {
        "path": "agricultural_samples.csv",
        "sha256": "413837d6b1bce0b1b934446fb9db53c690d869bff661761eddf95279e4b6526d",
        "bytes": 38059
      },
      {
        "path": "food_protein_conversion_factor.csv",
        "sha256": "4e4fa6f828f33dbf81749907e8d97d994803fce67e6e6b7d4956d6677000bb02",
        "bytes": 5516
      },
      {
        "path": "acquisition_samples.csv",
        "sha256": "3367b2037a305e77d3102776ffe46147d29e7ff5b9446194db85e124fab26196",
        "bytes": 155247
      },
      {
        "path": "sample_food.csv",
        "sha256": "576038925df0e0b1688a877019c5c6984949a59da63d029e7818c1487a1af42e",
        "bytes": 39068
      },
      {
        "path": "lab_method_nutrient.csv",
        "sha256": "dbf54f7d314f669711657fcd5b071c7ddc49cecbc87636f7d25c74e5dcd36461",
        "bytes": 9424
      },
      {
        "path": "food_attribute.csv",
        "sha256": "5a9d52b73f638d4f39e294f119aa761aa43aa2346e07afd1c9b468d176833ff4",
        "bytes": 753585
      },
      {
        "path": "sub_sample_result.csv",
        "sha256": "926a2a8e84d12a37ca5be0f128679c3da9f524a889064bcec5e420a6198dac59",
        "bytes": 5294585
      },
      {
        "path": "food_nutrient_conversion_factor.csv",
        "sha256": "fc90733ef308ea92dac1478a263c8f7fb0ac7c4193e26876362361004883880b",
        "bytes": 197078
      },
      {
        "path": "measure_unit.csv",
        "sha256": "62cde43ede7257a7748bb03d1b62f6905fab3ee0014efd41c9a040ac404da4d6",
        "bytes": 1969
      },
      {
        "path": "sub_sample_food.csv",
        "sha256": "d18c7c3a2763e1236deb3ea5ec9cbca4a3a5160637b70db124ed5f0802723dcb",
        "bytes": 1478511
      },
      {
        "path": "input_food.csv",
        "sha256": "77ee1c226c00aef0b76c80f3f8ce6720fbafe0641009afb69ea1ce2999335d3a",
        "bytes": 327265
      },
      {
        "path": "market_acquisition.csv",
        "sha256": "5ad4aff0e80d1ab0639406c0938a5132dac8577cd54938263fc314434efdd821",
        "bytes": 914133
      },
      {
        "path": "Download API Field Descriptions.xlsx",
        "sha256": "84597b955d1d0b9ea4b407b0cc24a32b84f7bbc0ee06ef38a1d24011f3a281b4",
        "bytes": 32849
      },
      {
        "path": "food_component.csv",
        "sha256": "fc3b0541c43022fa46814b31919e4c4a4826573cc896dd4ea12c8c0721ee5178",
        "bytes": 158565
      },
      {
        "path": "food.csv",
        "sha256": "c1c9a97d5bb3319dacb69d5b3183bef95bfe4c90455fe92484cf5ca72566ac2a",
        "bytes": 7229830
      },
      {
        "path": "lab_method.csv",
        "sha256": "8d3ff3b58b69afc19df1d15575ac1fef3e576a13c478abd5cf53acbe4481244b",
        "bytes": 13084
      },
      {
        "path": "foundation_food.csv",
        "sha256": "5666629a4d06bf1d6a16114e1e3890cfa7d56523ec99134545a24ba216b521cb",
        "bytes": 17257
      },
      {
        "path": "food_calorie_conversion_factor.csv",
        "sha256": "eb2390f0c47eb0361ca1e0d3dbefb11c2f34a191a3add3174b50284099845c3b",
        "bytes": 12061
      },
      {
        "path": "food_category.csv",
        "sha256": "a8e05c18cf010d44303f2a02765637a21f9ad621f90b4f811ab4a4a436cfedd9",
        "bytes": 997
      },
      {
        "path": "food_attribute_type.csv",
        "sha256": "35ac614cc9958eaa5f43402bb592b595902b5cc43dad4b947958a0057287adde",
        "bytes": 331
      },
      {
        "path": "food_portion.csv",
        "sha256": "7af765126593f2bc3ca7befff30af23c5b4921714c51848b9424150c52f68bab",
        "bytes": 714051
      },
      {
        "path": "food_nutrient.csv",
        "sha256": "2b8eeb9d1f2104f09641041a025b7ab58be1653f4c10a52e047f2024ef42c480",
        "bytes": 10089141
      },
      {
        "path": "lab_method_code.csv",
        "sha256": "02769767d96fcd57272b6a58b2aa23dd57e1678f4ff9b1f7b015246da7a447cb",
        "bytes": 4582
      },
      {
        "path": "nutrient.csv",
        "sha256": "226ba937d1a73e8c87bd7fdcdd577524699bef4025c9232ee474b7d3083498ff",
        "bytes": 21556
      },
      {
        "path": "food_update_log_entry.csv",
        "sha256": "f52cc54737543b3700782e03ad7a40414709ec9437df1326d19c18cde2aa67b3",
        "bytes": 5235383
      }
    ]
  },
  "checkedAt": "2026-10-21T10:18:21.766Z",
  "tables": [
    {
      "name": "food",
      "ours": 395,
      "source": 395,
      "match": true
    },
    {
      "name": "nutrient",
      "ours": 234,
      "source": 234,
      "match": true
    },
    {
      "name": "food_nutrient",
      "ours": 16975,
      "source": 16975,
      "match": true
    }
  ],
  "integrity": {
    "status": "pass",
    "duplicatePrimaryIds": 0,
    "orphanForeignKeys": 0,
    "requiredFieldNulls": 0,
    "checks": [
      {
        "table": "food",
        "check": "duplicatePrimaryIds",
        "field": "fdc_id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food",
        "check": "requiredFieldNulls",
        "field": "fdc_id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food",
        "check": "requiredFieldNulls",
        "field": "data_type",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food",
        "check": "requiredFieldNulls",
        "field": "description",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "nutrient",
        "check": "duplicatePrimaryIds",
        "field": "id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "nutrient",
        "check": "requiredFieldNulls",
        "field": "id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "nutrient",
        "check": "requiredFieldNulls",
        "field": "name",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "nutrient",
        "check": "requiredFieldNulls",
        "field": "unit_name",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food_nutrient",
        "check": "duplicatePrimaryIds",
        "field": "id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food_nutrient",
        "check": "requiredFieldNulls",
        "field": "id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food_nutrient",
        "check": "requiredFieldNulls",
        "field": "fdc_id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food_nutrient",
        "check": "requiredFieldNulls",
        "field": "nutrient_id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food_nutrient",
        "check": "orphanForeignKeys",
        "field": "fdc_id",
        "count": 0,
        "status": "pass"
      },
      {
        "table": "food_nutrient",
        "check": "orphanForeignKeys",
        "field": "nutrient_id",
        "count": 0,
        "status": "pass"
      }
    ]
  },
  "spotCheck": {
    "seed": "waztap-data-qa-v1",
    "sampleSize": 75,
    "method": "live-api-and-bulk",
    "sourceUrl": "https://fdc.nal.usda.gov/fdc-datasets/FoodData_Central_foundation_food_csv_2026-04-30.zip",
    "checkedAt": "2026-10-21T10:05:30.305Z",
    "files": [
      {
        "path": "live-foundation.zip",
        "sha256": "70457ee9d9342f43bda2010318c85f04210c689fdeb9cd2da4c513b0e8dbc655",
        "bytes": 3825741
      },
      {
        "path": "live-catalog.html",
        "sha256": "9e42f82dac3ba51ce7949affd7e2ae318ebe8bbb8c38a296e622bf1486b4b948",
        "bytes": 160418
      },
      {
        "path": "pilot-metadata.json",
        "sha256": "df58806225347e578bec249ba3791bf8ac400772dec8bf2cc5781aee25484ed9",
        "bytes": 848
      },
      {
        "path": "live-api-sample.json",
        "sha256": "222a00986be4a871acaa9d1fe324ac3874f112fa4745a68453502f20c9151231",
        "bytes": 5751791
      }
    ],
    "notes": "25 seeded food records checked through the live FoodData Central API (two batched GETs, 20+5); food API field names, Foundation data type and date presentation mapped to canonical CSV fields. Nutrient definitions and measurements checked against newly fetched live bulk CSV because the food API does not expose every source table column.",
    "sampleIds": {
      "food": [
        "746785",
        "2512377",
        "747693",
        "323505",
        "2747668",
        "2346399",
        "2747653",
        "2515373",
        "2759005",
        "747445",
        "790085",
        "2514743",
        "2261421",
        "2747673",
        "790146",
        "2259793",
        "1750340",
        "329596",
        "790508",
        "321358",
        "2710843",
        "2727567",
        "2647440",
        "2515382",
        "2257046"
      ],
      "nutrient": [
        "1294",
        "1278",
        "1113",
        "1340",
        "1329",
        "1414",
        "1101",
        "2047",
        "1301",
        "1298",
        "1300",
        "2068",
        "1002",
        "2005",
        "2065",
        "2000",
        "1108",
        "1408",
        "2015",
        "1232",
        "1284",
        "2069",
        "1090",
        "1004",
        "1024"
      ],
      "food_nutrient": [
        "8516097",
        "2227696",
        "21115037",
        "8515336",
        "21115115",
        "33831522",
        "2229859",
        "34494152",
        "28912833",
        "35087762",
        "8518356",
        "34968962",
        "8514437",
        "8515183",
        "35087970",
        "2254436",
        "2263087",
        "9638342",
        "8515710",
        "27793959",
        "34493877",
        "34968940",
        "21115111",
        "27795886",
        "34969151"
      ]
    },
    "fields": [
      {
        "table": "food",
        "field": "fdc_id",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food",
        "field": "data_type",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food",
        "field": "description",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food",
        "field": "food_category_id",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food",
        "field": "publication_date",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food",
        "field": "ndb_number",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food",
        "field": "footnote",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "nutrient",
        "field": "id",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "nutrient",
        "field": "name",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "nutrient",
        "field": "unit_name",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "nutrient",
        "field": "nutrient_nbr",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "nutrient",
        "field": "rank",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "id",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "fdc_id",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "nutrient_id",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "amount",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "data_points",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "derivation_id",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "min",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "max",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "median",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "footnote",
        "passed": 25,
        "failed": 0
      },
      {
        "table": "food_nutrient",
        "field": "min_year_acquired",
        "passed": 25,
        "failed": 0
      }
    ],
    "passed": 575,
    "failed": 0,
    "mismatches": []
  },
  "freshness": {
    "lastImportAt": "2026-10-11T22:53:49.940Z",
    "lastReleaseCheckAt": "2026-10-21T10:02:33.726Z",
    "nextScheduledCheckAt": "2026-10-26T04:30:00.000Z",
    "status": "pass"
  },
  "intentionalDifferences": [
    {
      "id": "foundation-membership",
      "description": "Serve only food.csv records listed in foundation_food.csv. Source table counts use this same declared membership, not all food.csv records."
    },
    {
      "id": "referenced-nutrients",
      "description": "Serve only nutrient definitions referenced by included Foundation measurements."
    },
    {
      "id": "excluded-tables",
      "description": "The three-table product excludes ancillary source tables, including market_acquisition; complete source ZIP is retained privately."
    },
    {
      "id": "reviewed-empty-undefined-nutrient",
      "description": "Exclude the existing reviewed 33 blank measurements referencing undefined nutrient 2066. Only exact measurement/food IDs in the Foundation exclusion policy qualify, with every non-identity source field blank; all other orphan references fail."
    },
    {
      "id": "field-name-normalization",
      "description": "foundation_food.NDB_number is exposed as food.ndb_number; source strings, empty optional values and SQL numeric/date representations are normalized only as declared per field."
    },
    {
      "id": "derived-fields",
      "description": "source_fields/source_sha256 preserve provenance; source_unit, basis and quality_issues are derived metadata rather than source CSV columns. Source columns remain field-compared."
    },
    {
      "id": "api-presentation-mapping",
      "description": "Live FoodData Central API food identities/presentations map fdcId to fdc_id, dataType Foundation to foundation_food, foodCategory.id to food_category_id, ndbNumber to ndb_number, and API publicationDate MM/DD/YYYY to ISO YYYY-MM-DD. Fields absent from the API are checked against the live official bulk archive."
    }
  ],
  "thresholds": {
    "rowCountDelta": 0,
    "duplicatePrimaryIds": 0,
    "orphanForeignKeys": 0,
    "requiredFieldNulls": 0,
    "spotCheckMismatches": 0
  },
  "evidence": {
    "servedVersionId": "13ef3da8-a3ff-45e3-a119-389ed4c1b5a2",
    "preparedManifestSha256": "cd6b791508db8fc76a4c6da44cdebc710ef943eefac5fb36226a915d52e00c0e",
    "rawSourceCounts": {
      "food.csv": 87990,
      "foundation_food.csv": 395,
      "food_nutrient.csv": 170469,
      "nutrient.csv": 477
    },
    "selectedExcludedMeasurements": 33,
    "liveArchiveSha256": "70457ee9d9342f43bda2010318c85f04210c689fdeb9cd2da4c513b0e8dbc655",
    "liveRawSourceCounts": {
      "food.csv": 87990,
      "foundation_food.csv": 395,
      "food_nutrient.csv": 170469,
      "nutrient.csv": 477
    },
    "liveExcludedMeasurements": 33
  },
  "status": "pass"
}
