| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
Feast frequently has to mediate data across platforms and systems, each with its own unique type system. To make this possible, Feast itself has a type system for all the types it is able to handle natively.
Feast's type system is built on top of protobuf. The messages that make up the type system can be found here, and the corresponding python classes that wrap them can be found here.
Feast supports the following categories of data types:
For a complete reference with examples, see Type System.
Each feature or schema field in Feast is associated with a data type, which is stored in Feast's registry. These types are also used to ensure that Feast operates on values correctly (e.g. making sure that timestamp columns used for point-in-time correct joins actually have the timestamp type).
As a result, each system that Feast interacts with needs a way to translate data types from the native platform into a Feast type. E.g., Snowflake SQL types are converted to Feast types here. The onus is therefore on authors of offline or online store connectors to make sure that this type mapping happens correctly.
Map, JSON, and Struct types are supported across all major Feast backends:
| Backend | Native Type | Feast Type |
|---|---|---|
| PostgreSQL | jsonb | Map, Json, Struct |
| PostgreSQL | jsonb[] | Array(Map) |
| Snowflake | VARIANT, OBJECT | Map |
| Snowflake | JSON | Json |
| Redshift | SUPER | Map |
| Redshift | json | Json |
| BigQuery | JSON | Json |
| BigQuery | STRUCT, RECORD | Struct |
| Spark | map<string,string> | Map |
| Spark | array<map<string,string>> | Array(Map) |
| Spark | struct<...> | Struct |
| Spark | array<struct<...>> | Array(Struct(...)) |
| MSSQL | nvarchar(max) | Map, Json, Struct |
| DynamoDB | Proto bytes | Map, Json, Struct, ScalarMap |
| Redis | Proto bytes | Map, Json, Struct, ScalarMap |
| Milvus | VARCHAR (serialized) | Map, Json, Struct |
Note: When the backend native type is ambiguous (e.g., jsonb could be Map, Json, or Struct), the schema-declared Feast type takes precedence. The backend-to-Feast type mappings above are only used for schema inference when no explicit type is provided.
Note: Feast currently does not support a null type in its type system.
| Back | FazBrowse Home | New Git URL |