InferRow<T> is a utility type that extracts the TypeScript type for a single row from a datasource definition. This enables type-safe data ingestion and manipulation.
Type Signature
Usage
Basic Example
With Nullable Fields
Type-Safe Data Ingestion
Related Types
InferEvent<T>
Alias for InferRow (used for event ingestion)
PartialRow<T>
Makes all properties of InferRow optional
InferEvent
InferEvent<T> is an alias for InferRow<T>, providing semantic clarity when working with event ingestion:
Type Mapping
The inferred TypeScript types correspond to Tinybird column types:| Tinybird Type | TypeScript Type |
|---|---|
t.string() | string |
t.int32(), t.uint64() | number |
t.float64() | number |
t.bool() | boolean |
t.dateTime() | string |
t.date() | string |
t.array(T) | T[] |
t.string().nullable() | string | null |
t.string().lowCardinality() | string |