Function: assetLoader()
assetLoader<
R>(def):AssetLoader<R>
Defined in: src/core/releases.ts:869
A single-asset loader (no season token in its URL). An absent asset returns
no rows with a warning; a failed fetch raises AssetFetchError.
Type Parameters
R
R extends object = ReleaseRow
Parameters
def
The loader's manifest entry; def.url is fetched as-is (no season token).
minSeason is not consulted.
Returns
AssetLoader<R>
An async loader taking optional ReleaseLoaderOptions and resolving to row
objects ([] when the asset is absent) or, with format: "columns", column arrays.
Throws
SdvError (rejected) when format is neither "rows" nor "columns", when the
asset's cells exceed maxCells, or when it is not decodable parquet (cause set).
Throws
NoDataError (rejected) with onMissing: "raise", when the asset is absent (HTTP
404). Without it the loader resolves to no rows and emits one SDV_RELEASE warning.
Throws
AssetFetchError (rejected) for any failed download other than a 404 (propagated from the transport).
Remarks
Same decode, size guard and INT64 policy as seasonLoader, over a single asset.
Example
const loadTeams = assetLoader({ fn: "load_nfl_teams", url: "https://x/teams.parquet" });
const teams = await loadTeams({ columns: ["team_abbr", "team_name"] });