From 88b2bde7507d701dbc411d801aee1666c1d01402 Mon Sep 17 00:00:00 2001 From: Jonathan Wrede Date: Sun, 3 May 2026 08:46:43 +0000 Subject: [PATCH 1/5] feat(bigquery): Support DATE-type event timestamp columns When the event_timestamp column in BigQuery is a DATE type, the generated SQL wraps comparison values in TIMESTAMP(), causing a type mismatch error. This adds a timestamp_field_type parameter to BigQuerySource that, when set to "DATE", generates DATE() comparisons instead. Closes #2530 (part 2) Signed-off-by: Jonathan Wrede --- protos/feast/core/DataSource.proto | 6 +- sdk/python/feast/data_source.py | 7 + .../feast/infra/offline_stores/bigquery.py | 21 +- .../infra/offline_stores/bigquery_source.py | 7 + .../infra/offline_stores/offline_utils.py | 14 +- .../feast/protos/feast/core/DataSource_pb2.py | 98 ++- .../protos/feast/core/DataSource_pb2.pyi | 796 ++++++++++-------- .../protos/feast/core/DataSource_pb2_grpc.py | 20 + .../infra/offline_stores/test_bigquery.py | 111 +++ 9 files changed, 683 insertions(+), 397 deletions(-) diff --git a/protos/feast/core/DataSource.proto b/protos/feast/core/DataSource.proto index b91296dca31..2889fba042f 100644 --- a/protos/feast/core/DataSource.proto +++ b/protos/feast/core/DataSource.proto @@ -29,7 +29,7 @@ import "feast/types/Value.proto"; import "feast/core/Feature.proto"; // Defines a Data Source that can be used source Feature data -// Next available id: 28 +// Next available id: 29 message DataSource { // Field indexes should *not* be reused. Not sure if fields 6-10 were used previously or not, // but they are going to be reserved for backwards compatibility. @@ -81,6 +81,10 @@ message DataSource { // Must specify creation timestamp column name string created_timestamp_column = 5; + // (Optional) Type of the timestamp_field column ("TIMESTAMP" or "DATE"). + // When set to "DATE", SQL generation uses date-only comparisons. + string timestamp_field_type = 28; + // This is an internal field that is represents the python class for the data source object a proto object represents. // This should be set by feast, and not by users. // The field is used primarily by custom data sources and is mandatory for them to set. Feast may set it for diff --git a/sdk/python/feast/data_source.py b/sdk/python/feast/data_source.py index 2d4997ae786..e14f2a49383 100644 --- a/sdk/python/feast/data_source.py +++ b/sdk/python/feast/data_source.py @@ -205,6 +205,7 @@ class DataSource(ABC): tags: Dict[str, str] owner: str date_partition_column: str + timestamp_field_type: str created_timestamp: Optional[datetime] last_updated_timestamp: Optional[datetime] @@ -219,6 +220,7 @@ def __init__( tags: Optional[Dict[str, str]] = None, owner: Optional[str] = "", date_partition_column: Optional[str] = None, + timestamp_field_type: Optional[str] = None, ): """ Creates a DataSource object. @@ -237,6 +239,9 @@ def __init__( owner (optional): The owner of the data source, typically the email of the primary maintainer. date_partition_column (optional): Timestamp column used for partitioning. Not supported by all stores + timestamp_field_type (optional): Type of the timestamp_field column. + Defaults to "TIMESTAMP". Set to "DATE" when the event timestamp column + is a DATE type, so SQL generation uses date-only comparisons. """ self.name = name self.timestamp_field = timestamp_field or "" @@ -257,6 +262,7 @@ def __init__( self.date_partition_column = ( date_partition_column if date_partition_column else "" ) + self.timestamp_field_type = timestamp_field_type if timestamp_field_type else "" now = _utc_now() self.created_timestamp = now self.last_updated_timestamp = now @@ -280,6 +286,7 @@ def __eq__(self, other): or self.created_timestamp_column != other.created_timestamp_column or self.field_mapping != other.field_mapping or self.date_partition_column != other.date_partition_column + or self.timestamp_field_type != other.timestamp_field_type or self.description != other.description or self.tags != other.tags or self.owner != other.owner diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index 948cfcf1ff0..a85c4bcb2a5 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -161,13 +161,18 @@ def pull_latest_from_table_or_query( project=project_id, location=config.offline_store.location, ) + cast_style = ( + "date_func" + if data_source.timestamp_field_type == "DATE" + else "timestamp_func" + ) timestamp_filter = get_timestamp_filter_sql( start_date, end_date, timestamp_field, date_partition_column=data_source.date_partition_column, quote_fields=False, - cast_style="timestamp_func", + cast_style=cast_style, ) query = f""" SELECT @@ -220,13 +225,18 @@ def pull_all_from_table_or_query( + BigQueryOfflineStore._escape_query_columns(feature_name_columns) + timestamp_fields ) + cast_style = ( + "date_func" + if data_source.timestamp_field_type == "DATE" + else "timestamp_func" + ) timestamp_filter = get_timestamp_filter_sql( start_date, end_date, timestamp_field, date_partition_column=data_source.date_partition_column, quote_fields=False, - cast_style="timestamp_func", + cast_style=cast_style, ) query = f""" SELECT {field_string} @@ -934,10 +944,17 @@ def arrow_schema_to_bq_schema(arrow_schema: pyarrow.Schema) -> List[SchemaField] {% if loop.last %}{% else %}, {% endif %} {% endfor %} FROM {{ featureview.table_subquery }} + {% if featureview.timestamp_field_type == "DATE" %} + WHERE {{ featureview.timestamp_field }} <= DATE('{{ featureview.max_event_timestamp[:10] }}') + {% if featureview.ttl == 0 %}{% else %} + AND {{ featureview.timestamp_field }} >= DATE('{{ featureview.min_event_timestamp[:10] }}') + {% endif %} + {% else %} WHERE {{ featureview.timestamp_field }} <= '{{ featureview.max_event_timestamp }}' {% if featureview.ttl == 0 %}{% else %} AND {{ featureview.timestamp_field }} >= '{{ featureview.min_event_timestamp }}' {% endif %} + {% endif %} {% if featureview.date_partition_column %} AND {{ featureview.date_partition_column | backticks }} <= '{{ featureview.max_event_timestamp[:10] }}' {% if featureview.min_event_timestamp %} diff --git a/sdk/python/feast/infra/offline_stores/bigquery_source.py b/sdk/python/feast/infra/offline_stores/bigquery_source.py index 7b476afdcda..5fdc29a19fb 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery_source.py +++ b/sdk/python/feast/infra/offline_stores/bigquery_source.py @@ -35,6 +35,7 @@ def __init__( created_timestamp_column: Optional[str] = "", field_mapping: Optional[Dict[str, str]] = None, date_partition_column: Optional[str] = None, + timestamp_field_type: Optional[str] = None, query: Optional[str] = None, description: Optional[str] = "", tags: Optional[Dict[str, str]] = None, @@ -54,6 +55,9 @@ def __init__( field_mapping (optional): A dictionary mapping of column names in this data source to feature names in a feature table or view. Only used for feature columns, not entities or timestamp columns. date_partition_column (optional): Timestamp column used for partitioning. + timestamp_field_type (optional): Type of the timestamp_field column. + Set to "DATE" when the event timestamp column is a DATE type, + so SQL generation uses date-only comparisons instead of TIMESTAMP(). query (optional): The query to be executed to obtain the features. When both 'table' and 'query' are provided, 'query' takes priority for reads. description (optional): A human-readable description. @@ -81,6 +85,7 @@ def __init__( created_timestamp_column=created_timestamp_column, field_mapping=field_mapping, date_partition_column=date_partition_column, + timestamp_field_type=timestamp_field_type, description=description, tags=tags, owner=owner, @@ -121,6 +126,7 @@ def from_proto(data_source: DataSourceProto): timestamp_field=data_source.timestamp_field, created_timestamp_column=data_source.created_timestamp_column, date_partition_column=data_source.date_partition_column, + timestamp_field_type=data_source.timestamp_field_type or None, query=data_source.bigquery_options.query, description=data_source.description, tags=dict(data_source.tags), @@ -139,6 +145,7 @@ def _to_proto_impl(self) -> DataSourceProto: timestamp_field=self.timestamp_field, created_timestamp_column=self.created_timestamp_column, date_partition_column=self.date_partition_column, + timestamp_field_type=self.timestamp_field_type, ) return data_source_proto diff --git a/sdk/python/feast/infra/offline_stores/offline_utils.py b/sdk/python/feast/infra/offline_stores/offline_utils.py index 5664e6f45a6..fee87dde595 100644 --- a/sdk/python/feast/infra/offline_stores/offline_utils.py +++ b/sdk/python/feast/infra/offline_stores/offline_utils.py @@ -98,6 +98,7 @@ class FeatureViewQueryContext: date_partition_column: Optional[ str ] # this attribute is added because partition pruning affects Athena's query performance. + timestamp_field_type: Optional[str] def get_feature_view_query_context( @@ -160,6 +161,10 @@ def get_feature_view_query_context( feature_view.batch_source.date_partition_column, ) + timestamp_field_type = getattr( + feature_view.batch_source, "timestamp_field_type", "" + ) + max_event_timestamp = to_naive_utc(entity_df_timestamp_range[1]).isoformat() min_event_timestamp = None if feature_view.ttl: @@ -181,6 +186,7 @@ def get_feature_view_query_context( min_event_timestamp=min_event_timestamp, max_event_timestamp=max_event_timestamp, date_partition_column=date_partition_column, + timestamp_field_type=timestamp_field_type or None, ) query_context.append(context) @@ -340,7 +346,7 @@ def get_timestamp_filter_sql( date_partition_column: Optional[str] = None, tz: Optional[timezone] = None, cast_style: Literal[ - "timestamp", "timestamp_func", "timestamptz", "raw" + "timestamp", "timestamp_func", "timestamptz", "raw", "date_func" ] = "timestamp", date_time_separator: str = "T", quote_fields: bool = True, @@ -355,10 +361,11 @@ def get_timestamp_filter_sql( date_partition_column: optional partition column (for pruning) tz: optional timezone for datetime inputs cast_style: one of: - - "timestamp": TIMESTAMP '...' → Common Sql engine Snowflake, Redshift etc. + - "timestamp": TIMESTAMP '...' → Common Sql engine Snowflake, Redshift etc. - "timestamp_func": TIMESTAMP('...') → BigQuery, Couchbase etc. - "timestamptz": '...'::timestamptz → PostgreSQL - "raw": '...' → no cast, string only + - "date_func": DATE('...') → BigQuery DATE columns date_time_separator: separator for datetime strings (default is "T") (e.g. "2023-10-01T00:00:00" or "2023-10-01 00:00:00") quote_fields: whether to quote the timestamp and partition column names @@ -384,6 +391,9 @@ def format_casted_ts(val: Union[str, datetime]) -> str: return f"TIMESTAMP '{val_str}'" elif cast_style == "timestamp_func": return f"TIMESTAMP('{val_str}')" + elif cast_style == "date_func": + date_str = val_str[:10] if len(val_str) >= 10 else val_str + return f"DATE('{date_str}')" elif cast_style == "timestamptz": return f"'{val_str}'::{cast_style}" else: diff --git a/sdk/python/feast/protos/feast/core/DataSource_pb2.py b/sdk/python/feast/protos/feast/core/DataSource_pb2.py index f3086233584..648abb32acb 100644 --- a/sdk/python/feast/protos/feast/core/DataSource_pb2.py +++ b/sdk/python/feast/protos/feast/core/DataSource_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: feast/core/DataSource.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 6.31.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'feast/core/DataSource.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,56 +29,56 @@ from feast.protos.feast.core import Feature_pb2 as feast_dot_core_dot_Feature__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66\x65\x61st/core/DataSource.proto\x12\nfeast.core\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1b\x66\x65\x61st/core/DataFormat.proto\x1a\x17\x66\x65\x61st/types/Value.proto\x1a\x18\x66\x65\x61st/core/Feature.proto\"\x89\x18\n\nDataSource\x12\x0c\n\x04name\x18\x14 \x01(\t\x12\x0f\n\x07project\x18\x15 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x17 \x01(\t\x12.\n\x04tags\x18\x18 \x03(\x0b\x32 .feast.core.DataSource.TagsEntry\x12\r\n\x05owner\x18\x19 \x01(\t\x12/\n\x04type\x18\x01 \x01(\x0e\x32!.feast.core.DataSource.SourceType\x12?\n\rfield_mapping\x18\x02 \x03(\x0b\x32(.feast.core.DataSource.FieldMappingEntry\x12\x17\n\x0ftimestamp_field\x18\x03 \x01(\t\x12\x1d\n\x15\x64\x61te_partition_column\x18\x04 \x01(\t\x12 \n\x18\x63reated_timestamp_column\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_source_class_type\x18\x11 \x01(\t\x12,\n\x0c\x62\x61tch_source\x18\x1a \x01(\x0b\x32\x16.feast.core.DataSource\x12/\n\x04meta\x18\x32 \x01(\x0b\x32!.feast.core.DataSource.SourceMeta\x12:\n\x0c\x66ile_options\x18\x0b \x01(\x0b\x32\".feast.core.DataSource.FileOptionsH\x00\x12\x42\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32&.feast.core.DataSource.BigQueryOptionsH\x00\x12<\n\rkafka_options\x18\r \x01(\x0b\x32#.feast.core.DataSource.KafkaOptionsH\x00\x12@\n\x0fkinesis_options\x18\x0e \x01(\x0b\x32%.feast.core.DataSource.KinesisOptionsH\x00\x12\x42\n\x10redshift_options\x18\x0f \x01(\x0b\x32&.feast.core.DataSource.RedshiftOptionsH\x00\x12I\n\x14request_data_options\x18\x12 \x01(\x0b\x32).feast.core.DataSource.RequestDataOptionsH\x00\x12\x44\n\x0e\x63ustom_options\x18\x10 \x01(\x0b\x32*.feast.core.DataSource.CustomSourceOptionsH\x00\x12\x44\n\x11snowflake_options\x18\x13 \x01(\x0b\x32\'.feast.core.DataSource.SnowflakeOptionsH\x00\x12:\n\x0cpush_options\x18\x16 \x01(\x0b\x32\".feast.core.DataSource.PushOptionsH\x00\x12<\n\rspark_options\x18\x1b \x01(\x0b\x32#.feast.core.DataSource.SparkOptionsH\x00\x12<\n\rtrino_options\x18\x1e \x01(\x0b\x32#.feast.core.DataSource.TrinoOptionsH\x00\x12>\n\x0e\x61thena_options\x18# \x01(\x0b\x32$.feast.core.DataSource.AthenaOptionsH\x00\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11\x46ieldMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf5\x01\n\nSourceMeta\x12:\n\x16\x65\x61rliestEventTimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14latestEventTimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x63reated_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16last_updated_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x65\n\x0b\x46ileOptions\x12+\n\x0b\x66ile_format\x18\x01 \x01(\x0b\x32\x16.feast.core.FileFormat\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x1c\n\x14s3_endpoint_override\x18\x03 \x01(\t\x1a/\n\x0f\x42igQueryOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x1a,\n\x0cTrinoOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x1a\xae\x01\n\x0cKafkaOptions\x12\x1f\n\x17kafka_bootstrap_servers\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12\x30\n\x0emessage_format\x18\x03 \x01(\x0b\x32\x18.feast.core.StreamFormat\x12<\n\x19watermark_delay_threshold\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x66\n\x0eKinesisOptions\x12\x0e\n\x06region\x18\x01 \x01(\t\x12\x13\n\x0bstream_name\x18\x02 \x01(\t\x12/\n\rrecord_format\x18\x03 \x01(\x0b\x32\x18.feast.core.StreamFormat\x1aQ\n\x0fRedshiftOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x04 \x01(\t\x1aT\n\rAthenaOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x04 \x01(\t\x1aX\n\x10SnowflakeOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x04 \x01(\tJ\x04\x08\x05\x10\x06\x1a\xa4\x01\n\x0cSparkOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\x13\n\x0b\x66ile_format\x18\x04 \x01(\t\x12$\n\x1c\x64\x61te_partition_column_format\x18\x05 \x01(\t\x12-\n\x0ctable_format\x18\x06 \x01(\x0b\x32\x17.feast.core.TableFormat\x1a,\n\x13\x43ustomSourceOptions\x12\x15\n\rconfiguration\x18\x01 \x01(\x0c\x1a\xf7\x01\n\x12RequestDataOptions\x12Z\n\x11\x64\x65precated_schema\x18\x02 \x03(\x0b\x32?.feast.core.DataSource.RequestDataOptions.DeprecatedSchemaEntry\x12)\n\x06schema\x18\x03 \x03(\x0b\x32\x19.feast.core.FeatureSpecV2\x1aT\n\x15\x44\x65precatedSchemaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0e\x32\x1b.feast.types.ValueType.Enum:\x02\x38\x01J\x04\x08\x01\x10\x02\x1a\x13\n\x0bPushOptionsJ\x04\x08\x01\x10\x02\"\xf8\x01\n\nSourceType\x12\x0b\n\x07INVALID\x10\x00\x12\x0e\n\nBATCH_FILE\x10\x01\x12\x13\n\x0f\x42\x41TCH_SNOWFLAKE\x10\x08\x12\x12\n\x0e\x42\x41TCH_BIGQUERY\x10\x02\x12\x12\n\x0e\x42\x41TCH_REDSHIFT\x10\x05\x12\x10\n\x0cSTREAM_KAFKA\x10\x03\x12\x12\n\x0eSTREAM_KINESIS\x10\x04\x12\x11\n\rCUSTOM_SOURCE\x10\x06\x12\x12\n\x0eREQUEST_SOURCE\x10\x07\x12\x0f\n\x0bPUSH_SOURCE\x10\t\x12\x0f\n\x0b\x42\x41TCH_TRINO\x10\n\x12\x0f\n\x0b\x42\x41TCH_SPARK\x10\x0b\x12\x10\n\x0c\x42\x41TCH_ATHENA\x10\x0c\x42\t\n\x07optionsJ\x04\x08\x06\x10\x0b\"=\n\x0e\x44\x61taSourceList\x12+\n\x0b\x64\x61tasources\x18\x01 \x03(\x0b\x32\x16.feast.core.DataSourceBT\n\x10\x66\x65\x61st.proto.coreB\x0f\x44\x61taSourceProtoZ/github.com/feast-dev/feast/go/protos/feast/coreb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66\x65\x61st/core/DataSource.proto\x12\nfeast.core\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1b\x66\x65\x61st/core/DataFormat.proto\x1a\x17\x66\x65\x61st/types/Value.proto\x1a\x18\x66\x65\x61st/core/Feature.proto\"\xa7\x18\n\nDataSource\x12\x0c\n\x04name\x18\x14 \x01(\t\x12\x0f\n\x07project\x18\x15 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x17 \x01(\t\x12.\n\x04tags\x18\x18 \x03(\x0b\x32 .feast.core.DataSource.TagsEntry\x12\r\n\x05owner\x18\x19 \x01(\t\x12/\n\x04type\x18\x01 \x01(\x0e\x32!.feast.core.DataSource.SourceType\x12?\n\rfield_mapping\x18\x02 \x03(\x0b\x32(.feast.core.DataSource.FieldMappingEntry\x12\x17\n\x0ftimestamp_field\x18\x03 \x01(\t\x12\x1d\n\x15\x64\x61te_partition_column\x18\x04 \x01(\t\x12 \n\x18\x63reated_timestamp_column\x18\x05 \x01(\t\x12\x1c\n\x14timestamp_field_type\x18\x1c \x01(\t\x12\x1e\n\x16\x64\x61ta_source_class_type\x18\x11 \x01(\t\x12,\n\x0c\x62\x61tch_source\x18\x1a \x01(\x0b\x32\x16.feast.core.DataSource\x12/\n\x04meta\x18\x32 \x01(\x0b\x32!.feast.core.DataSource.SourceMeta\x12:\n\x0c\x66ile_options\x18\x0b \x01(\x0b\x32\".feast.core.DataSource.FileOptionsH\x00\x12\x42\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32&.feast.core.DataSource.BigQueryOptionsH\x00\x12<\n\rkafka_options\x18\r \x01(\x0b\x32#.feast.core.DataSource.KafkaOptionsH\x00\x12@\n\x0fkinesis_options\x18\x0e \x01(\x0b\x32%.feast.core.DataSource.KinesisOptionsH\x00\x12\x42\n\x10redshift_options\x18\x0f \x01(\x0b\x32&.feast.core.DataSource.RedshiftOptionsH\x00\x12I\n\x14request_data_options\x18\x12 \x01(\x0b\x32).feast.core.DataSource.RequestDataOptionsH\x00\x12\x44\n\x0e\x63ustom_options\x18\x10 \x01(\x0b\x32*.feast.core.DataSource.CustomSourceOptionsH\x00\x12\x44\n\x11snowflake_options\x18\x13 \x01(\x0b\x32\'.feast.core.DataSource.SnowflakeOptionsH\x00\x12:\n\x0cpush_options\x18\x16 \x01(\x0b\x32\".feast.core.DataSource.PushOptionsH\x00\x12<\n\rspark_options\x18\x1b \x01(\x0b\x32#.feast.core.DataSource.SparkOptionsH\x00\x12<\n\rtrino_options\x18\x1e \x01(\x0b\x32#.feast.core.DataSource.TrinoOptionsH\x00\x12>\n\x0e\x61thena_options\x18# \x01(\x0b\x32$.feast.core.DataSource.AthenaOptionsH\x00\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11\x46ieldMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf5\x01\n\nSourceMeta\x12:\n\x16\x65\x61rliestEventTimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14latestEventTimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x63reated_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16last_updated_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x65\n\x0b\x46ileOptions\x12+\n\x0b\x66ile_format\x18\x01 \x01(\x0b\x32\x16.feast.core.FileFormat\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x1c\n\x14s3_endpoint_override\x18\x03 \x01(\t\x1a/\n\x0f\x42igQueryOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x1a,\n\x0cTrinoOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x1a\xae\x01\n\x0cKafkaOptions\x12\x1f\n\x17kafka_bootstrap_servers\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12\x30\n\x0emessage_format\x18\x03 \x01(\x0b\x32\x18.feast.core.StreamFormat\x12<\n\x19watermark_delay_threshold\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x66\n\x0eKinesisOptions\x12\x0e\n\x06region\x18\x01 \x01(\t\x12\x13\n\x0bstream_name\x18\x02 \x01(\t\x12/\n\rrecord_format\x18\x03 \x01(\x0b\x32\x18.feast.core.StreamFormat\x1aQ\n\x0fRedshiftOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x04 \x01(\t\x1aT\n\rAthenaOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x04 \x01(\t\x1aX\n\x10SnowflakeOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x04 \x01(\tJ\x04\x08\x05\x10\x06\x1a\xa4\x01\n\x0cSparkOptions\x12\r\n\x05table\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\x13\n\x0b\x66ile_format\x18\x04 \x01(\t\x12$\n\x1c\x64\x61te_partition_column_format\x18\x05 \x01(\t\x12-\n\x0ctable_format\x18\x06 \x01(\x0b\x32\x17.feast.core.TableFormat\x1a,\n\x13\x43ustomSourceOptions\x12\x15\n\rconfiguration\x18\x01 \x01(\x0c\x1a\xf7\x01\n\x12RequestDataOptions\x12Z\n\x11\x64\x65precated_schema\x18\x02 \x03(\x0b\x32?.feast.core.DataSource.RequestDataOptions.DeprecatedSchemaEntry\x12)\n\x06schema\x18\x03 \x03(\x0b\x32\x19.feast.core.FeatureSpecV2\x1aT\n\x15\x44\x65precatedSchemaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0e\x32\x1b.feast.types.ValueType.Enum:\x02\x38\x01J\x04\x08\x01\x10\x02\x1a\x13\n\x0bPushOptionsJ\x04\x08\x01\x10\x02\"\xf8\x01\n\nSourceType\x12\x0b\n\x07INVALID\x10\x00\x12\x0e\n\nBATCH_FILE\x10\x01\x12\x13\n\x0f\x42\x41TCH_SNOWFLAKE\x10\x08\x12\x12\n\x0e\x42\x41TCH_BIGQUERY\x10\x02\x12\x12\n\x0e\x42\x41TCH_REDSHIFT\x10\x05\x12\x10\n\x0cSTREAM_KAFKA\x10\x03\x12\x12\n\x0eSTREAM_KINESIS\x10\x04\x12\x11\n\rCUSTOM_SOURCE\x10\x06\x12\x12\n\x0eREQUEST_SOURCE\x10\x07\x12\x0f\n\x0bPUSH_SOURCE\x10\t\x12\x0f\n\x0b\x42\x41TCH_TRINO\x10\n\x12\x0f\n\x0b\x42\x41TCH_SPARK\x10\x0b\x12\x10\n\x0c\x42\x41TCH_ATHENA\x10\x0c\x42\t\n\x07optionsJ\x04\x08\x06\x10\x0b\"=\n\x0e\x44\x61taSourceList\x12+\n\x0b\x64\x61tasources\x18\x01 \x03(\x0b\x32\x16.feast.core.DataSourceBT\n\x10\x66\x65\x61st.proto.coreB\x0f\x44\x61taSourceProtoZ/github.com/feast-dev/feast/go/protos/feast/coreb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'feast.core.DataSource_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\020feast.proto.coreB\017DataSourceProtoZ/github.com/feast-dev/feast/go/protos/feast/core' - _globals['_DATASOURCE_TAGSENTRY']._options = None + _globals['_DATASOURCE_TAGSENTRY']._loaded_options = None _globals['_DATASOURCE_TAGSENTRY']._serialized_options = b'8\001' - _globals['_DATASOURCE_FIELDMAPPINGENTRY']._options = None + _globals['_DATASOURCE_FIELDMAPPINGENTRY']._loaded_options = None _globals['_DATASOURCE_FIELDMAPPINGENTRY']._serialized_options = b'8\001' - _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._options = None + _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._loaded_options = None _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._serialized_options = b'8\001' _globals['_DATASOURCE']._serialized_start=189 - _globals['_DATASOURCE']._serialized_end=3270 - _globals['_DATASOURCE_TAGSENTRY']._serialized_start=1436 - _globals['_DATASOURCE_TAGSENTRY']._serialized_end=1479 - _globals['_DATASOURCE_FIELDMAPPINGENTRY']._serialized_start=1481 - _globals['_DATASOURCE_FIELDMAPPINGENTRY']._serialized_end=1532 - _globals['_DATASOURCE_SOURCEMETA']._serialized_start=1535 - _globals['_DATASOURCE_SOURCEMETA']._serialized_end=1780 - _globals['_DATASOURCE_FILEOPTIONS']._serialized_start=1782 - _globals['_DATASOURCE_FILEOPTIONS']._serialized_end=1883 - _globals['_DATASOURCE_BIGQUERYOPTIONS']._serialized_start=1885 - _globals['_DATASOURCE_BIGQUERYOPTIONS']._serialized_end=1932 - _globals['_DATASOURCE_TRINOOPTIONS']._serialized_start=1934 - _globals['_DATASOURCE_TRINOOPTIONS']._serialized_end=1978 - _globals['_DATASOURCE_KAFKAOPTIONS']._serialized_start=1981 - _globals['_DATASOURCE_KAFKAOPTIONS']._serialized_end=2155 - _globals['_DATASOURCE_KINESISOPTIONS']._serialized_start=2157 - _globals['_DATASOURCE_KINESISOPTIONS']._serialized_end=2259 - _globals['_DATASOURCE_REDSHIFTOPTIONS']._serialized_start=2261 - _globals['_DATASOURCE_REDSHIFTOPTIONS']._serialized_end=2342 - _globals['_DATASOURCE_ATHENAOPTIONS']._serialized_start=2344 - _globals['_DATASOURCE_ATHENAOPTIONS']._serialized_end=2428 - _globals['_DATASOURCE_SNOWFLAKEOPTIONS']._serialized_start=2430 - _globals['_DATASOURCE_SNOWFLAKEOPTIONS']._serialized_end=2518 - _globals['_DATASOURCE_SPARKOPTIONS']._serialized_start=2521 - _globals['_DATASOURCE_SPARKOPTIONS']._serialized_end=2685 - _globals['_DATASOURCE_CUSTOMSOURCEOPTIONS']._serialized_start=2687 - _globals['_DATASOURCE_CUSTOMSOURCEOPTIONS']._serialized_end=2731 - _globals['_DATASOURCE_REQUESTDATAOPTIONS']._serialized_start=2734 - _globals['_DATASOURCE_REQUESTDATAOPTIONS']._serialized_end=2981 - _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._serialized_start=2891 - _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._serialized_end=2975 - _globals['_DATASOURCE_PUSHOPTIONS']._serialized_start=2983 - _globals['_DATASOURCE_PUSHOPTIONS']._serialized_end=3002 - _globals['_DATASOURCE_SOURCETYPE']._serialized_start=3005 - _globals['_DATASOURCE_SOURCETYPE']._serialized_end=3253 - _globals['_DATASOURCELIST']._serialized_start=3272 - _globals['_DATASOURCELIST']._serialized_end=3333 + _globals['_DATASOURCE']._serialized_end=3300 + _globals['_DATASOURCE_TAGSENTRY']._serialized_start=1466 + _globals['_DATASOURCE_TAGSENTRY']._serialized_end=1509 + _globals['_DATASOURCE_FIELDMAPPINGENTRY']._serialized_start=1511 + _globals['_DATASOURCE_FIELDMAPPINGENTRY']._serialized_end=1562 + _globals['_DATASOURCE_SOURCEMETA']._serialized_start=1565 + _globals['_DATASOURCE_SOURCEMETA']._serialized_end=1810 + _globals['_DATASOURCE_FILEOPTIONS']._serialized_start=1812 + _globals['_DATASOURCE_FILEOPTIONS']._serialized_end=1913 + _globals['_DATASOURCE_BIGQUERYOPTIONS']._serialized_start=1915 + _globals['_DATASOURCE_BIGQUERYOPTIONS']._serialized_end=1962 + _globals['_DATASOURCE_TRINOOPTIONS']._serialized_start=1964 + _globals['_DATASOURCE_TRINOOPTIONS']._serialized_end=2008 + _globals['_DATASOURCE_KAFKAOPTIONS']._serialized_start=2011 + _globals['_DATASOURCE_KAFKAOPTIONS']._serialized_end=2185 + _globals['_DATASOURCE_KINESISOPTIONS']._serialized_start=2187 + _globals['_DATASOURCE_KINESISOPTIONS']._serialized_end=2289 + _globals['_DATASOURCE_REDSHIFTOPTIONS']._serialized_start=2291 + _globals['_DATASOURCE_REDSHIFTOPTIONS']._serialized_end=2372 + _globals['_DATASOURCE_ATHENAOPTIONS']._serialized_start=2374 + _globals['_DATASOURCE_ATHENAOPTIONS']._serialized_end=2458 + _globals['_DATASOURCE_SNOWFLAKEOPTIONS']._serialized_start=2460 + _globals['_DATASOURCE_SNOWFLAKEOPTIONS']._serialized_end=2548 + _globals['_DATASOURCE_SPARKOPTIONS']._serialized_start=2551 + _globals['_DATASOURCE_SPARKOPTIONS']._serialized_end=2715 + _globals['_DATASOURCE_CUSTOMSOURCEOPTIONS']._serialized_start=2717 + _globals['_DATASOURCE_CUSTOMSOURCEOPTIONS']._serialized_end=2761 + _globals['_DATASOURCE_REQUESTDATAOPTIONS']._serialized_start=2764 + _globals['_DATASOURCE_REQUESTDATAOPTIONS']._serialized_end=3011 + _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._serialized_start=2921 + _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._serialized_end=3005 + _globals['_DATASOURCE_PUSHOPTIONS']._serialized_start=3013 + _globals['_DATASOURCE_PUSHOPTIONS']._serialized_end=3032 + _globals['_DATASOURCE_SOURCETYPE']._serialized_start=3035 + _globals['_DATASOURCE_SOURCETYPE']._serialized_end=3283 + _globals['_DATASOURCELIST']._serialized_start=3302 + _globals['_DATASOURCELIST']._serialized_end=3363 # @@protoc_insertion_point(module_scope) diff --git a/sdk/python/feast/protos/feast/core/DataSource_pb2.pyi b/sdk/python/feast/protos/feast/core/DataSource_pb2.pyi index 7876e1adc98..6b2fe5cfad5 100644 --- a/sdk/python/feast/protos/feast/core/DataSource_pb2.pyi +++ b/sdk/python/feast/protos/feast/core/DataSource_pb2.pyi @@ -16,40 +16,42 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ -import builtins -import collections.abc -import feast.core.DataFormat_pb2 -import feast.core.Feature_pb2 -import feast.types.Value_pb2 -import google.protobuf.descriptor -import google.protobuf.duration_pb2 -import google.protobuf.internal.containers -import google.protobuf.internal.enum_type_wrapper -import google.protobuf.message -import google.protobuf.timestamp_pb2 + +from collections import abc as _abc +from feast.core import DataFormat_pb2 as _DataFormat_pb2 +from feast.core import Feature_pb2 as _Feature_pb2 +from feast.types import Value_pb2 as _Value_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import message as _message +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +import builtins as _builtins import sys -import typing +import typing as _typing -if sys.version_info >= (3, 10): - import typing as typing_extensions +if sys.version_info >= (3, 11): + from typing import TypeAlias as _TypeAlias, Never as _Never else: - import typing_extensions + from typing_extensions import TypeAlias as _TypeAlias, Never as _Never -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +DESCRIPTOR: _descriptor.FileDescriptor -class DataSource(google.protobuf.message.Message): +@_typing.final +class DataSource(_message.Message): """Defines a Data Source that can be used source Feature data - Next available id: 28 + Next available id: 29 """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor class _SourceType: - ValueType = typing.NewType("ValueType", builtins.int) - V: typing_extensions.TypeAlias = ValueType + ValueType = _typing.NewType("ValueType", _builtins.int) + V: _TypeAlias = ValueType # noqa: Y015 - class _SourceTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DataSource._SourceType.ValueType], builtins.type): # noqa: F821 - DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + class _SourceTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[DataSource._SourceType.ValueType], _builtins.type): + DESCRIPTOR: _descriptor.EnumDescriptor INVALID: DataSource._SourceType.ValueType # 0 BATCH_FILE: DataSource._SourceType.ValueType # 1 BATCH_SNOWFLAKE: DataSource._SourceType.ValueType # 8 @@ -83,510 +85,608 @@ class DataSource(google.protobuf.message.Message): BATCH_SPARK: DataSource.SourceType.ValueType # 11 BATCH_ATHENA: DataSource.SourceType.ValueType # 12 - class TagsEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class TagsEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... - - class FieldMappingEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: builtins.str + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class FieldMappingEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _builtins.str def __init__( self, *, - key: builtins.str = ..., - value: builtins.str = ..., + key: _builtins.str = ..., + value: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... - - class SourceMeta(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - EARLIESTEVENTTIMESTAMP_FIELD_NUMBER: builtins.int - LATESTEVENTTIMESTAMP_FIELD_NUMBER: builtins.int - CREATED_TIMESTAMP_FIELD_NUMBER: builtins.int - LAST_UPDATED_TIMESTAMP_FIELD_NUMBER: builtins.int - @property - def earliestEventTimestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - @property - def latestEventTimestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - @property - def created_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - @property - def last_updated_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class SourceMeta(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + EARLIESTEVENTTIMESTAMP_FIELD_NUMBER: _builtins.int + LATESTEVENTTIMESTAMP_FIELD_NUMBER: _builtins.int + CREATED_TIMESTAMP_FIELD_NUMBER: _builtins.int + LAST_UPDATED_TIMESTAMP_FIELD_NUMBER: _builtins.int + @_builtins.property + def earliestEventTimestamp(self) -> _timestamp_pb2.Timestamp: ... + @_builtins.property + def latestEventTimestamp(self) -> _timestamp_pb2.Timestamp: ... + @_builtins.property + def created_timestamp(self) -> _timestamp_pb2.Timestamp: ... + @_builtins.property + def last_updated_timestamp(self) -> _timestamp_pb2.Timestamp: ... def __init__( self, *, - earliestEventTimestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., - latestEventTimestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., - created_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., - last_updated_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., + earliestEventTimestamp: _timestamp_pb2.Timestamp | None = ..., + latestEventTimestamp: _timestamp_pb2.Timestamp | None = ..., + created_timestamp: _timestamp_pb2.Timestamp | None = ..., + last_updated_timestamp: _timestamp_pb2.Timestamp | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["created_timestamp", b"created_timestamp", "earliestEventTimestamp", b"earliestEventTimestamp", "last_updated_timestamp", b"last_updated_timestamp", "latestEventTimestamp", b"latestEventTimestamp"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["created_timestamp", b"created_timestamp", "earliestEventTimestamp", b"earliestEventTimestamp", "last_updated_timestamp", b"last_updated_timestamp", "latestEventTimestamp", b"latestEventTimestamp"]) -> None: ... - - class FileOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _typing.Literal["created_timestamp", b"created_timestamp", "earliestEventTimestamp", b"earliestEventTimestamp", "last_updated_timestamp", b"last_updated_timestamp", "latestEventTimestamp", b"latestEventTimestamp"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["created_timestamp", b"created_timestamp", "earliestEventTimestamp", b"earliestEventTimestamp", "last_updated_timestamp", b"last_updated_timestamp", "latestEventTimestamp", b"latestEventTimestamp"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class FileOptions(_message.Message): """Defines options for DataSource that sources features from a file""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - FILE_FORMAT_FIELD_NUMBER: builtins.int - URI_FIELD_NUMBER: builtins.int - S3_ENDPOINT_OVERRIDE_FIELD_NUMBER: builtins.int - @property - def file_format(self) -> feast.core.DataFormat_pb2.FileFormat: ... - uri: builtins.str + FILE_FORMAT_FIELD_NUMBER: _builtins.int + URI_FIELD_NUMBER: _builtins.int + S3_ENDPOINT_OVERRIDE_FIELD_NUMBER: _builtins.int + uri: _builtins.str """Target URL of file to retrieve and source features from. s3://path/to/file for AWS S3 storage gs://path/to/file for GCP GCS storage file:///path/to/file for local storage """ - s3_endpoint_override: builtins.str + s3_endpoint_override: _builtins.str """override AWS S3 storage endpoint with custom S3 endpoint""" + @_builtins.property + def file_format(self) -> _DataFormat_pb2.FileFormat: ... def __init__( self, *, - file_format: feast.core.DataFormat_pb2.FileFormat | None = ..., - uri: builtins.str = ..., - s3_endpoint_override: builtins.str = ..., + file_format: _DataFormat_pb2.FileFormat | None = ..., + uri: _builtins.str = ..., + s3_endpoint_override: _builtins.str = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["file_format", b"file_format"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["file_format", b"file_format", "s3_endpoint_override", b"s3_endpoint_override", "uri", b"uri"]) -> None: ... - - class BigQueryOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _typing.Literal["file_format", b"file_format"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["file_format", b"file_format", "s3_endpoint_override", b"s3_endpoint_override", "uri", b"uri"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class BigQueryOptions(_message.Message): """Defines options for DataSource that sources features from a BigQuery Query""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - TABLE_FIELD_NUMBER: builtins.int - QUERY_FIELD_NUMBER: builtins.int - table: builtins.str + TABLE_FIELD_NUMBER: _builtins.int + QUERY_FIELD_NUMBER: _builtins.int + table: _builtins.str """Full table reference in the form of [project:dataset.table]""" - query: builtins.str + query: _builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ def __init__( self, *, - table: builtins.str = ..., - query: builtins.str = ..., + table: _builtins.str = ..., + query: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["query", b"query", "table", b"table"]) -> None: ... - - class TrinoOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["query", b"query", "table", b"table"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class TrinoOptions(_message.Message): """Defines options for DataSource that sources features from a Trino Query""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - TABLE_FIELD_NUMBER: builtins.int - QUERY_FIELD_NUMBER: builtins.int - table: builtins.str + TABLE_FIELD_NUMBER: _builtins.int + QUERY_FIELD_NUMBER: _builtins.int + table: _builtins.str """Full table reference in the form of [project:dataset.table]""" - query: builtins.str + query: _builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ def __init__( self, *, - table: builtins.str = ..., - query: builtins.str = ..., + table: _builtins.str = ..., + query: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["query", b"query", "table", b"table"]) -> None: ... - - class KafkaOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["query", b"query", "table", b"table"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class KafkaOptions(_message.Message): """Defines options for DataSource that sources features from Kafka messages. Each message should be a Protobuf that can be decoded with the generated Java Protobuf class at the given class path """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - KAFKA_BOOTSTRAP_SERVERS_FIELD_NUMBER: builtins.int - TOPIC_FIELD_NUMBER: builtins.int - MESSAGE_FORMAT_FIELD_NUMBER: builtins.int - WATERMARK_DELAY_THRESHOLD_FIELD_NUMBER: builtins.int - kafka_bootstrap_servers: builtins.str + KAFKA_BOOTSTRAP_SERVERS_FIELD_NUMBER: _builtins.int + TOPIC_FIELD_NUMBER: _builtins.int + MESSAGE_FORMAT_FIELD_NUMBER: _builtins.int + WATERMARK_DELAY_THRESHOLD_FIELD_NUMBER: _builtins.int + kafka_bootstrap_servers: _builtins.str """Comma separated list of Kafka bootstrap servers. Used for feature tables without a defined source host[:port]]""" - topic: builtins.str + topic: _builtins.str """Kafka topic to collect feature data from.""" - @property - def message_format(self) -> feast.core.DataFormat_pb2.StreamFormat: + @_builtins.property + def message_format(self) -> _DataFormat_pb2.StreamFormat: """Defines the stream data format encoding feature/entity data in Kafka messages.""" - @property - def watermark_delay_threshold(self) -> google.protobuf.duration_pb2.Duration: + + @_builtins.property + def watermark_delay_threshold(self) -> _duration_pb2.Duration: """Watermark delay threshold for stream data""" + def __init__( self, *, - kafka_bootstrap_servers: builtins.str = ..., - topic: builtins.str = ..., - message_format: feast.core.DataFormat_pb2.StreamFormat | None = ..., - watermark_delay_threshold: google.protobuf.duration_pb2.Duration | None = ..., + kafka_bootstrap_servers: _builtins.str = ..., + topic: _builtins.str = ..., + message_format: _DataFormat_pb2.StreamFormat | None = ..., + watermark_delay_threshold: _duration_pb2.Duration | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["message_format", b"message_format", "watermark_delay_threshold", b"watermark_delay_threshold"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["kafka_bootstrap_servers", b"kafka_bootstrap_servers", "message_format", b"message_format", "topic", b"topic", "watermark_delay_threshold", b"watermark_delay_threshold"]) -> None: ... - - class KinesisOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _typing.Literal["message_format", b"message_format", "watermark_delay_threshold", b"watermark_delay_threshold"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["kafka_bootstrap_servers", b"kafka_bootstrap_servers", "message_format", b"message_format", "topic", b"topic", "watermark_delay_threshold", b"watermark_delay_threshold"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class KinesisOptions(_message.Message): """Defines options for DataSource that sources features from Kinesis records. Each record should be a Protobuf that can be decoded with the generated Java Protobuf class at the given class path """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - REGION_FIELD_NUMBER: builtins.int - STREAM_NAME_FIELD_NUMBER: builtins.int - RECORD_FORMAT_FIELD_NUMBER: builtins.int - region: builtins.str + REGION_FIELD_NUMBER: _builtins.int + STREAM_NAME_FIELD_NUMBER: _builtins.int + RECORD_FORMAT_FIELD_NUMBER: _builtins.int + region: _builtins.str """AWS region of the Kinesis stream""" - stream_name: builtins.str + stream_name: _builtins.str """Name of the Kinesis stream to obtain feature data from.""" - @property - def record_format(self) -> feast.core.DataFormat_pb2.StreamFormat: + @_builtins.property + def record_format(self) -> _DataFormat_pb2.StreamFormat: """Defines the data format encoding the feature/entity data in Kinesis records. Kinesis Data Sources support Avro and Proto as data formats. """ + def __init__( self, *, - region: builtins.str = ..., - stream_name: builtins.str = ..., - record_format: feast.core.DataFormat_pb2.StreamFormat | None = ..., + region: _builtins.str = ..., + stream_name: _builtins.str = ..., + record_format: _DataFormat_pb2.StreamFormat | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["record_format", b"record_format"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["record_format", b"record_format", "region", b"region", "stream_name", b"stream_name"]) -> None: ... - - class RedshiftOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _typing.Literal["record_format", b"record_format"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["record_format", b"record_format", "region", b"region", "stream_name", b"stream_name"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class RedshiftOptions(_message.Message): """Defines options for DataSource that sources features from a Redshift Query""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - TABLE_FIELD_NUMBER: builtins.int - QUERY_FIELD_NUMBER: builtins.int - SCHEMA_FIELD_NUMBER: builtins.int - DATABASE_FIELD_NUMBER: builtins.int - table: builtins.str + TABLE_FIELD_NUMBER: _builtins.int + QUERY_FIELD_NUMBER: _builtins.int + SCHEMA_FIELD_NUMBER: _builtins.int + DATABASE_FIELD_NUMBER: _builtins.int + table: _builtins.str """Redshift table name""" - query: builtins.str + query: _builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ - schema: builtins.str + schema: _builtins.str """Redshift schema name""" - database: builtins.str + database: _builtins.str """Redshift database name""" def __init__( self, *, - table: builtins.str = ..., - query: builtins.str = ..., - schema: builtins.str = ..., - database: builtins.str = ..., + table: _builtins.str = ..., + query: _builtins.str = ..., + schema: _builtins.str = ..., + database: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["database", b"database", "query", b"query", "schema", b"schema", "table", b"table"]) -> None: ... - - class AthenaOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["database", b"database", "query", b"query", "schema", b"schema", "table", b"table"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class AthenaOptions(_message.Message): """Defines options for DataSource that sources features from a Athena Query""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - TABLE_FIELD_NUMBER: builtins.int - QUERY_FIELD_NUMBER: builtins.int - DATABASE_FIELD_NUMBER: builtins.int - DATA_SOURCE_FIELD_NUMBER: builtins.int - table: builtins.str + TABLE_FIELD_NUMBER: _builtins.int + QUERY_FIELD_NUMBER: _builtins.int + DATABASE_FIELD_NUMBER: _builtins.int + DATA_SOURCE_FIELD_NUMBER: _builtins.int + table: _builtins.str """Athena table name""" - query: builtins.str + query: _builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ - database: builtins.str + database: _builtins.str """Athena database name""" - data_source: builtins.str + data_source: _builtins.str """Athena schema name""" def __init__( self, *, - table: builtins.str = ..., - query: builtins.str = ..., - database: builtins.str = ..., - data_source: builtins.str = ..., + table: _builtins.str = ..., + query: _builtins.str = ..., + database: _builtins.str = ..., + data_source: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["data_source", b"data_source", "database", b"database", "query", b"query", "table", b"table"]) -> None: ... - - class SnowflakeOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["data_source", b"data_source", "database", b"database", "query", b"query", "table", b"table"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class SnowflakeOptions(_message.Message): """Defines options for DataSource that sources features from a Snowflake Query""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - TABLE_FIELD_NUMBER: builtins.int - QUERY_FIELD_NUMBER: builtins.int - SCHEMA_FIELD_NUMBER: builtins.int - DATABASE_FIELD_NUMBER: builtins.int - table: builtins.str + TABLE_FIELD_NUMBER: _builtins.int + QUERY_FIELD_NUMBER: _builtins.int + SCHEMA_FIELD_NUMBER: _builtins.int + DATABASE_FIELD_NUMBER: _builtins.int + table: _builtins.str """Snowflake table name""" - query: builtins.str + query: _builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ - schema: builtins.str + schema: _builtins.str """Snowflake schema name""" - database: builtins.str + database: _builtins.str """Snowflake schema name""" def __init__( self, *, - table: builtins.str = ..., - query: builtins.str = ..., - schema: builtins.str = ..., - database: builtins.str = ..., + table: _builtins.str = ..., + query: _builtins.str = ..., + schema: _builtins.str = ..., + database: _builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["database", b"database", "query", b"query", "schema", b"schema", "table", b"table"]) -> None: ... - - class SparkOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["database", b"database", "query", b"query", "schema", b"schema", "table", b"table"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class SparkOptions(_message.Message): """Defines options for DataSource that sources features from a spark table/query""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - TABLE_FIELD_NUMBER: builtins.int - QUERY_FIELD_NUMBER: builtins.int - PATH_FIELD_NUMBER: builtins.int - FILE_FORMAT_FIELD_NUMBER: builtins.int - DATE_PARTITION_COLUMN_FORMAT_FIELD_NUMBER: builtins.int - TABLE_FORMAT_FIELD_NUMBER: builtins.int - table: builtins.str + TABLE_FIELD_NUMBER: _builtins.int + QUERY_FIELD_NUMBER: _builtins.int + PATH_FIELD_NUMBER: _builtins.int + FILE_FORMAT_FIELD_NUMBER: _builtins.int + DATE_PARTITION_COLUMN_FORMAT_FIELD_NUMBER: _builtins.int + TABLE_FORMAT_FIELD_NUMBER: _builtins.int + table: _builtins.str """Table name""" - query: builtins.str + query: _builtins.str """Spark SQl query that returns the table, this is an alternative to `table`""" - path: builtins.str + path: _builtins.str """Path from which spark can read the table, this is an alternative to `table`""" - file_format: builtins.str + file_format: _builtins.str """Format of files at `path` (e.g. parquet, avro, etc)""" - date_partition_column_format: builtins.str + date_partition_column_format: _builtins.str """Date Format of date partition column (e.g. %Y-%m-%d)""" - @property - def table_format(self) -> feast.core.DataFormat_pb2.TableFormat: + @_builtins.property + def table_format(self) -> _DataFormat_pb2.TableFormat: """Table Format (e.g. iceberg, delta, hudi)""" + def __init__( self, *, - table: builtins.str = ..., - query: builtins.str = ..., - path: builtins.str = ..., - file_format: builtins.str = ..., - date_partition_column_format: builtins.str = ..., - table_format: feast.core.DataFormat_pb2.TableFormat | None = ..., + table: _builtins.str = ..., + query: _builtins.str = ..., + path: _builtins.str = ..., + file_format: _builtins.str = ..., + date_partition_column_format: _builtins.str = ..., + table_format: _DataFormat_pb2.TableFormat | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["table_format", b"table_format"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["date_partition_column_format", b"date_partition_column_format", "file_format", b"file_format", "path", b"path", "query", b"query", "table", b"table", "table_format", b"table_format"]) -> None: ... - - class CustomSourceOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _typing.Literal["table_format", b"table_format"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["date_partition_column_format", b"date_partition_column_format", "file_format", b"file_format", "path", b"path", "query", b"query", "table", b"table", "table_format", b"table_format"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class CustomSourceOptions(_message.Message): """Defines configuration for custom third-party data sources.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - CONFIGURATION_FIELD_NUMBER: builtins.int - configuration: builtins.bytes + CONFIGURATION_FIELD_NUMBER: _builtins.int + configuration: _builtins.bytes """Serialized configuration information for the data source. The implementer of the custom data source is responsible for serializing and deserializing data from bytes """ def __init__( self, *, - configuration: builtins.bytes = ..., + configuration: _builtins.bytes = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["configuration", b"configuration"]) -> None: ... - - class RequestDataOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["configuration", b"configuration"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class RequestDataOptions(_message.Message): """Defines options for DataSource that sources features from request data""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor - class DeprecatedSchemaEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor + @_typing.final + class DeprecatedSchemaEntry(_message.Message): + DESCRIPTOR: _descriptor.Descriptor - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - value: feast.types.Value_pb2.ValueType.Enum.ValueType + KEY_FIELD_NUMBER: _builtins.int + VALUE_FIELD_NUMBER: _builtins.int + key: _builtins.str + value: _Value_pb2.ValueType.Enum.ValueType def __init__( self, *, - key: builtins.str = ..., - value: feast.types.Value_pb2.ValueType.Enum.ValueType = ..., + key: _builtins.str = ..., + value: _Value_pb2.ValueType.Enum.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... - - DEPRECATED_SCHEMA_FIELD_NUMBER: builtins.int - SCHEMA_FIELD_NUMBER: builtins.int - @property - def deprecated_schema(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, feast.types.Value_pb2.ValueType.Enum.ValueType]: + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + DEPRECATED_SCHEMA_FIELD_NUMBER: _builtins.int + SCHEMA_FIELD_NUMBER: _builtins.int + @_builtins.property + def deprecated_schema(self) -> _containers.ScalarMap[_builtins.str, _Value_pb2.ValueType.Enum.ValueType]: """Mapping of feature name to type""" - @property - def schema(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[feast.core.Feature_pb2.FeatureSpecV2]: ... + + @_builtins.property + def schema(self) -> _containers.RepeatedCompositeFieldContainer[_Feature_pb2.FeatureSpecV2]: ... def __init__( self, *, - deprecated_schema: collections.abc.Mapping[builtins.str, feast.types.Value_pb2.ValueType.Enum.ValueType] | None = ..., - schema: collections.abc.Iterable[feast.core.Feature_pb2.FeatureSpecV2] | None = ..., + deprecated_schema: _abc.Mapping[_builtins.str, _Value_pb2.ValueType.Enum.ValueType] | None = ..., + schema: _abc.Iterable[_Feature_pb2.FeatureSpecV2] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["deprecated_schema", b"deprecated_schema", "schema", b"schema"]) -> None: ... - - class PushOptions(google.protobuf.message.Message): + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["deprecated_schema", b"deprecated_schema", "schema", b"schema"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + @_typing.final + class PushOptions(_message.Message): """Defines options for DataSource that supports pushing data to it. This allows data to be pushed to the online store on-demand, such as by stream consumers. """ - DESCRIPTOR: google.protobuf.descriptor.Descriptor + DESCRIPTOR: _descriptor.Descriptor def __init__( self, ) -> None: ... - - NAME_FIELD_NUMBER: builtins.int - PROJECT_FIELD_NUMBER: builtins.int - DESCRIPTION_FIELD_NUMBER: builtins.int - TAGS_FIELD_NUMBER: builtins.int - OWNER_FIELD_NUMBER: builtins.int - TYPE_FIELD_NUMBER: builtins.int - FIELD_MAPPING_FIELD_NUMBER: builtins.int - TIMESTAMP_FIELD_FIELD_NUMBER: builtins.int - DATE_PARTITION_COLUMN_FIELD_NUMBER: builtins.int - CREATED_TIMESTAMP_COLUMN_FIELD_NUMBER: builtins.int - DATA_SOURCE_CLASS_TYPE_FIELD_NUMBER: builtins.int - BATCH_SOURCE_FIELD_NUMBER: builtins.int - META_FIELD_NUMBER: builtins.int - FILE_OPTIONS_FIELD_NUMBER: builtins.int - BIGQUERY_OPTIONS_FIELD_NUMBER: builtins.int - KAFKA_OPTIONS_FIELD_NUMBER: builtins.int - KINESIS_OPTIONS_FIELD_NUMBER: builtins.int - REDSHIFT_OPTIONS_FIELD_NUMBER: builtins.int - REQUEST_DATA_OPTIONS_FIELD_NUMBER: builtins.int - CUSTOM_OPTIONS_FIELD_NUMBER: builtins.int - SNOWFLAKE_OPTIONS_FIELD_NUMBER: builtins.int - PUSH_OPTIONS_FIELD_NUMBER: builtins.int - SPARK_OPTIONS_FIELD_NUMBER: builtins.int - TRINO_OPTIONS_FIELD_NUMBER: builtins.int - ATHENA_OPTIONS_FIELD_NUMBER: builtins.int - name: builtins.str + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _Never # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... + + NAME_FIELD_NUMBER: _builtins.int + PROJECT_FIELD_NUMBER: _builtins.int + DESCRIPTION_FIELD_NUMBER: _builtins.int + TAGS_FIELD_NUMBER: _builtins.int + OWNER_FIELD_NUMBER: _builtins.int + TYPE_FIELD_NUMBER: _builtins.int + FIELD_MAPPING_FIELD_NUMBER: _builtins.int + TIMESTAMP_FIELD_FIELD_NUMBER: _builtins.int + DATE_PARTITION_COLUMN_FIELD_NUMBER: _builtins.int + CREATED_TIMESTAMP_COLUMN_FIELD_NUMBER: _builtins.int + TIMESTAMP_FIELD_TYPE_FIELD_NUMBER: _builtins.int + DATA_SOURCE_CLASS_TYPE_FIELD_NUMBER: _builtins.int + BATCH_SOURCE_FIELD_NUMBER: _builtins.int + META_FIELD_NUMBER: _builtins.int + FILE_OPTIONS_FIELD_NUMBER: _builtins.int + BIGQUERY_OPTIONS_FIELD_NUMBER: _builtins.int + KAFKA_OPTIONS_FIELD_NUMBER: _builtins.int + KINESIS_OPTIONS_FIELD_NUMBER: _builtins.int + REDSHIFT_OPTIONS_FIELD_NUMBER: _builtins.int + REQUEST_DATA_OPTIONS_FIELD_NUMBER: _builtins.int + CUSTOM_OPTIONS_FIELD_NUMBER: _builtins.int + SNOWFLAKE_OPTIONS_FIELD_NUMBER: _builtins.int + PUSH_OPTIONS_FIELD_NUMBER: _builtins.int + SPARK_OPTIONS_FIELD_NUMBER: _builtins.int + TRINO_OPTIONS_FIELD_NUMBER: _builtins.int + ATHENA_OPTIONS_FIELD_NUMBER: _builtins.int + name: _builtins.str """Unique name of data source within the project""" - project: builtins.str + project: _builtins.str """Name of Feast project that this data source belongs to.""" - description: builtins.str - @property - def tags(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ... - owner: builtins.str - type: global___DataSource.SourceType.ValueType - @property - def field_mapping(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: - """Defines mapping between fields in the sourced data - and fields in parent FeatureTable. - """ - timestamp_field: builtins.str + description: _builtins.str + owner: _builtins.str + type: Global___DataSource.SourceType.ValueType + timestamp_field: _builtins.str """Must specify event timestamp column name""" - date_partition_column: builtins.str + date_partition_column: _builtins.str """(Optional) Specify partition column useful for file sources """ - created_timestamp_column: builtins.str + created_timestamp_column: _builtins.str """Must specify creation timestamp column name""" - data_source_class_type: builtins.str + timestamp_field_type: _builtins.str + """(Optional) Type of the timestamp_field column ("TIMESTAMP" or "DATE"). + When set to "DATE", SQL generation uses date-only comparisons. + """ + data_source_class_type: _builtins.str """This is an internal field that is represents the python class for the data source object a proto object represents. This should be set by feast, and not by users. The field is used primarily by custom data sources and is mandatory for them to set. Feast may set it for first party sources as well. """ - @property - def batch_source(self) -> global___DataSource: + @_builtins.property + def tags(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: ... + @_builtins.property + def field_mapping(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: + """Defines mapping between fields in the sourced data + and fields in parent FeatureTable. + """ + + @_builtins.property + def batch_source(self) -> Global___DataSource: """Optional batch source for streaming sources for historical features and materialization.""" - @property - def meta(self) -> global___DataSource.SourceMeta: ... - @property - def file_options(self) -> global___DataSource.FileOptions: ... - @property - def bigquery_options(self) -> global___DataSource.BigQueryOptions: ... - @property - def kafka_options(self) -> global___DataSource.KafkaOptions: ... - @property - def kinesis_options(self) -> global___DataSource.KinesisOptions: ... - @property - def redshift_options(self) -> global___DataSource.RedshiftOptions: ... - @property - def request_data_options(self) -> global___DataSource.RequestDataOptions: ... - @property - def custom_options(self) -> global___DataSource.CustomSourceOptions: ... - @property - def snowflake_options(self) -> global___DataSource.SnowflakeOptions: ... - @property - def push_options(self) -> global___DataSource.PushOptions: ... - @property - def spark_options(self) -> global___DataSource.SparkOptions: ... - @property - def trino_options(self) -> global___DataSource.TrinoOptions: ... - @property - def athena_options(self) -> global___DataSource.AthenaOptions: ... + + @_builtins.property + def meta(self) -> Global___DataSource.SourceMeta: ... + @_builtins.property + def file_options(self) -> Global___DataSource.FileOptions: ... + @_builtins.property + def bigquery_options(self) -> Global___DataSource.BigQueryOptions: ... + @_builtins.property + def kafka_options(self) -> Global___DataSource.KafkaOptions: ... + @_builtins.property + def kinesis_options(self) -> Global___DataSource.KinesisOptions: ... + @_builtins.property + def redshift_options(self) -> Global___DataSource.RedshiftOptions: ... + @_builtins.property + def request_data_options(self) -> Global___DataSource.RequestDataOptions: ... + @_builtins.property + def custom_options(self) -> Global___DataSource.CustomSourceOptions: ... + @_builtins.property + def snowflake_options(self) -> Global___DataSource.SnowflakeOptions: ... + @_builtins.property + def push_options(self) -> Global___DataSource.PushOptions: ... + @_builtins.property + def spark_options(self) -> Global___DataSource.SparkOptions: ... + @_builtins.property + def trino_options(self) -> Global___DataSource.TrinoOptions: ... + @_builtins.property + def athena_options(self) -> Global___DataSource.AthenaOptions: ... def __init__( self, *, - name: builtins.str = ..., - project: builtins.str = ..., - description: builtins.str = ..., - tags: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - owner: builtins.str = ..., - type: global___DataSource.SourceType.ValueType = ..., - field_mapping: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., - timestamp_field: builtins.str = ..., - date_partition_column: builtins.str = ..., - created_timestamp_column: builtins.str = ..., - data_source_class_type: builtins.str = ..., - batch_source: global___DataSource | None = ..., - meta: global___DataSource.SourceMeta | None = ..., - file_options: global___DataSource.FileOptions | None = ..., - bigquery_options: global___DataSource.BigQueryOptions | None = ..., - kafka_options: global___DataSource.KafkaOptions | None = ..., - kinesis_options: global___DataSource.KinesisOptions | None = ..., - redshift_options: global___DataSource.RedshiftOptions | None = ..., - request_data_options: global___DataSource.RequestDataOptions | None = ..., - custom_options: global___DataSource.CustomSourceOptions | None = ..., - snowflake_options: global___DataSource.SnowflakeOptions | None = ..., - push_options: global___DataSource.PushOptions | None = ..., - spark_options: global___DataSource.SparkOptions | None = ..., - trino_options: global___DataSource.TrinoOptions | None = ..., - athena_options: global___DataSource.AthenaOptions | None = ..., + name: _builtins.str = ..., + project: _builtins.str = ..., + description: _builtins.str = ..., + tags: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + owner: _builtins.str = ..., + type: Global___DataSource.SourceType.ValueType = ..., + field_mapping: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., + timestamp_field: _builtins.str = ..., + date_partition_column: _builtins.str = ..., + created_timestamp_column: _builtins.str = ..., + timestamp_field_type: _builtins.str = ..., + data_source_class_type: _builtins.str = ..., + batch_source: Global___DataSource | None = ..., + meta: Global___DataSource.SourceMeta | None = ..., + file_options: Global___DataSource.FileOptions | None = ..., + bigquery_options: Global___DataSource.BigQueryOptions | None = ..., + kafka_options: Global___DataSource.KafkaOptions | None = ..., + kinesis_options: Global___DataSource.KinesisOptions | None = ..., + redshift_options: Global___DataSource.RedshiftOptions | None = ..., + request_data_options: Global___DataSource.RequestDataOptions | None = ..., + custom_options: Global___DataSource.CustomSourceOptions | None = ..., + snowflake_options: Global___DataSource.SnowflakeOptions | None = ..., + push_options: Global___DataSource.PushOptions | None = ..., + spark_options: Global___DataSource.SparkOptions | None = ..., + trino_options: Global___DataSource.TrinoOptions | None = ..., + athena_options: Global___DataSource.AthenaOptions | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["athena_options", b"athena_options", "batch_source", b"batch_source", "bigquery_options", b"bigquery_options", "custom_options", b"custom_options", "file_options", b"file_options", "kafka_options", b"kafka_options", "kinesis_options", b"kinesis_options", "meta", b"meta", "options", b"options", "push_options", b"push_options", "redshift_options", b"redshift_options", "request_data_options", b"request_data_options", "snowflake_options", b"snowflake_options", "spark_options", b"spark_options", "trino_options", b"trino_options"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["athena_options", b"athena_options", "batch_source", b"batch_source", "bigquery_options", b"bigquery_options", "created_timestamp_column", b"created_timestamp_column", "custom_options", b"custom_options", "data_source_class_type", b"data_source_class_type", "date_partition_column", b"date_partition_column", "description", b"description", "field_mapping", b"field_mapping", "file_options", b"file_options", "kafka_options", b"kafka_options", "kinesis_options", b"kinesis_options", "meta", b"meta", "name", b"name", "options", b"options", "owner", b"owner", "project", b"project", "push_options", b"push_options", "redshift_options", b"redshift_options", "request_data_options", b"request_data_options", "snowflake_options", b"snowflake_options", "spark_options", b"spark_options", "tags", b"tags", "timestamp_field", b"timestamp_field", "trino_options", b"trino_options", "type", b"type"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["options", b"options"]) -> typing_extensions.Literal["file_options", "bigquery_options", "kafka_options", "kinesis_options", "redshift_options", "request_data_options", "custom_options", "snowflake_options", "push_options", "spark_options", "trino_options", "athena_options"] | None: ... - -global___DataSource = DataSource - -class DataSourceList(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - DATASOURCES_FIELD_NUMBER: builtins.int - @property - def datasources(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DataSource]: ... + _HasFieldArgType: _TypeAlias = _typing.Literal["athena_options", b"athena_options", "batch_source", b"batch_source", "bigquery_options", b"bigquery_options", "custom_options", b"custom_options", "file_options", b"file_options", "kafka_options", b"kafka_options", "kinesis_options", b"kinesis_options", "meta", b"meta", "options", b"options", "push_options", b"push_options", "redshift_options", b"redshift_options", "request_data_options", b"request_data_options", "snowflake_options", b"snowflake_options", "spark_options", b"spark_options", "trino_options", b"trino_options"] # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["athena_options", b"athena_options", "batch_source", b"batch_source", "bigquery_options", b"bigquery_options", "created_timestamp_column", b"created_timestamp_column", "custom_options", b"custom_options", "data_source_class_type", b"data_source_class_type", "date_partition_column", b"date_partition_column", "description", b"description", "field_mapping", b"field_mapping", "file_options", b"file_options", "kafka_options", b"kafka_options", "kinesis_options", b"kinesis_options", "meta", b"meta", "name", b"name", "options", b"options", "owner", b"owner", "project", b"project", "push_options", b"push_options", "redshift_options", b"redshift_options", "request_data_options", b"request_data_options", "snowflake_options", b"snowflake_options", "spark_options", b"spark_options", "tags", b"tags", "timestamp_field", b"timestamp_field", "timestamp_field_type", b"timestamp_field_type", "trino_options", b"trino_options", "type", b"type"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + _WhichOneofReturnType_options: _TypeAlias = _typing.Literal["file_options", "bigquery_options", "kafka_options", "kinesis_options", "redshift_options", "request_data_options", "custom_options", "snowflake_options", "push_options", "spark_options", "trino_options", "athena_options"] # noqa: Y015 + _WhichOneofArgType_options: _TypeAlias = _typing.Literal["options", b"options"] # noqa: Y015 + def WhichOneof(self, oneof_group: _WhichOneofArgType_options) -> _WhichOneofReturnType_options | None: ... + +Global___DataSource: _TypeAlias = DataSource # noqa: Y015 + +@_typing.final +class DataSourceList(_message.Message): + DESCRIPTOR: _descriptor.Descriptor + + DATASOURCES_FIELD_NUMBER: _builtins.int + @_builtins.property + def datasources(self) -> _containers.RepeatedCompositeFieldContainer[Global___DataSource]: ... def __init__( self, *, - datasources: collections.abc.Iterable[global___DataSource] | None = ..., + datasources: _abc.Iterable[Global___DataSource] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datasources", b"datasources"]) -> None: ... + _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 + def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... + _ClearFieldArgType: _TypeAlias = _typing.Literal["datasources", b"datasources"] # noqa: Y015 + def ClearField(self, field_name: _ClearFieldArgType) -> None: ... + def WhichOneof(self, oneof_group: _Never) -> None: ... -global___DataSourceList = DataSourceList +Global___DataSourceList: _TypeAlias = DataSourceList # noqa: Y015 diff --git a/sdk/python/feast/protos/feast/core/DataSource_pb2_grpc.py b/sdk/python/feast/protos/feast/core/DataSource_pb2_grpc.py index 2daafffebfc..db6552d5c59 100644 --- a/sdk/python/feast/protos/feast/core/DataSource_pb2_grpc.py +++ b/sdk/python/feast/protos/feast/core/DataSource_pb2_grpc.py @@ -1,4 +1,24 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings + +GRPC_GENERATED_VERSION = '1.80.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in feast/core/DataSource_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/sdk/python/tests/unit/infra/offline_stores/test_bigquery.py b/sdk/python/tests/unit/infra/offline_stores/test_bigquery.py index 969a9679971..5a050f60c4f 100644 --- a/sdk/python/tests/unit/infra/offline_stores/test_bigquery.py +++ b/sdk/python/tests/unit/infra/offline_stores/test_bigquery.py @@ -154,6 +154,117 @@ def test_pull_all_from_table_or_query_partition_pruning(mock_get_bigquery_client assert "partition_date <= '2021-01-02'" in actual_query +@patch("feast.infra.offline_stores.bigquery._get_bigquery_client") +def test_pull_latest_date_type_timestamp_field(mock_get_bigquery_client): + mock_get_bigquery_client.return_value = Mock() + test_repo_config = RepoConfig( + registry="gs://ml-test/repo/registry.db", + project="test", + provider="gcp", + online_store=SqliteOnlineStoreConfig(type="sqlite"), + offline_store=BigQueryOfflineStoreConfig(type="bigquery", dataset="feast"), + ) + test_data_source = BigQuerySource( + table="project:dataset.table", + timestamp_field="event_date", + timestamp_field_type="DATE", + ) + retrieval_job = BigQueryOfflineStore.pull_latest_from_table_or_query( + config=test_repo_config, + data_source=test_data_source, + join_key_columns=["driver_id"], + feature_name_columns=["feature1"], + timestamp_field="event_date", + created_timestamp_column=None, + start_date=datetime(2021, 1, 1, tzinfo=timezone.utc), + end_date=datetime(2021, 1, 2, tzinfo=timezone.utc), + ) + actual_query = retrieval_job.to_sql() + assert ( + "event_date BETWEEN DATE('2021-01-01') AND DATE('2021-01-02')" in actual_query + ) + assert "TIMESTAMP(" not in actual_query + + +@patch("feast.infra.offline_stores.bigquery._get_bigquery_client") +def test_pull_all_date_type_timestamp_field(mock_get_bigquery_client): + mock_get_bigquery_client.return_value = Mock() + test_repo_config = RepoConfig( + registry="gs://ml-test/repo/registry.db", + project="test", + provider="gcp", + online_store=SqliteOnlineStoreConfig(type="sqlite"), + offline_store=BigQueryOfflineStoreConfig(type="bigquery", dataset="feast"), + ) + test_data_source = BigQuerySource( + table="project:dataset.table", + timestamp_field="event_date", + timestamp_field_type="DATE", + ) + retrieval_job = BigQueryOfflineStore.pull_all_from_table_or_query( + config=test_repo_config, + data_source=test_data_source, + join_key_columns=["driver_id"], + feature_name_columns=["feature1"], + timestamp_field="event_date", + start_date=datetime(2021, 1, 1, tzinfo=timezone.utc), + end_date=datetime(2021, 1, 2, tzinfo=timezone.utc), + ) + actual_query = retrieval_job.to_sql() + assert ( + "event_date BETWEEN DATE('2021-01-01') AND DATE('2021-01-02')" in actual_query + ) + assert "TIMESTAMP(" not in actual_query + + +@patch("feast.infra.offline_stores.bigquery._get_bigquery_client") +def test_pull_latest_date_type_with_partition_column(mock_get_bigquery_client): + mock_get_bigquery_client.return_value = Mock() + test_repo_config = RepoConfig( + registry="gs://ml-test/repo/registry.db", + project="test", + provider="gcp", + online_store=SqliteOnlineStoreConfig(type="sqlite"), + offline_store=BigQueryOfflineStoreConfig(type="bigquery", dataset="feast"), + ) + test_data_source = BigQuerySource( + table="project:dataset.table", + timestamp_field="event_date", + timestamp_field_type="DATE", + date_partition_column="_PARTITIONDATE", + ) + retrieval_job = BigQueryOfflineStore.pull_latest_from_table_or_query( + config=test_repo_config, + data_source=test_data_source, + join_key_columns=["driver_id"], + feature_name_columns=["feature1"], + timestamp_field="event_date", + created_timestamp_column=None, + start_date=datetime(2021, 1, 1, tzinfo=timezone.utc), + end_date=datetime(2021, 1, 2, tzinfo=timezone.utc), + ) + actual_query = retrieval_job.to_sql() + assert "DATE('2021-01-01')" in actual_query + assert "DATE('2021-01-02')" in actual_query + assert "_PARTITIONDATE >= '2021-01-01'" in actual_query + assert "_PARTITIONDATE <= '2021-01-02'" in actual_query + + +def test_bigquery_source_date_type_proto_roundtrip(): + source = BigQuerySource( + table="project:dataset.table", + timestamp_field="event_date", + timestamp_field_type="DATE", + date_partition_column="_PARTITIONDATE", + ) + proto = source.to_proto() + restored = BigQuerySource.from_proto(proto) + assert restored.timestamp_field_type == "DATE" + assert restored.date_partition_column == "_PARTITIONDATE" + assert restored.timestamp_field == "event_date" + assert source == restored + + class TestBigQuerySourceGetTableQueryString: def test_table_only(self): source = BigQuerySource( From 96d056ea7b7b942d8c5b135197e82a45fba78fdf Mon Sep 17 00:00:00 2001 From: Jonathan Wrede Date: Sun, 3 May 2026 08:55:27 +0000 Subject: [PATCH 2/5] fix(bigquery): Use protobuf 4.25.x compatible generated code The proto files were regenerated with protobuf 6.31.1 / grpcio-tools 1.80.0, which imports runtime_version -- a module that does not exist in protobuf 4.25.x used by the project. Revert generated code to 4.25.1 format while keeping the new timestamp_field_type field. Signed-off-by: Jonathan Wrede --- .../feast/protos/feast/core/DataSource_pb2.py | 22 +- .../protos/feast/core/DataSource_pb2.pyi | 798 ++++++++---------- .../protos/feast/core/DataSource_pb2_grpc.py | 20 - 3 files changed, 357 insertions(+), 483 deletions(-) diff --git a/sdk/python/feast/protos/feast/core/DataSource_pb2.py b/sdk/python/feast/protos/feast/core/DataSource_pb2.py index 648abb32acb..51dee5652a2 100644 --- a/sdk/python/feast/protos/feast/core/DataSource_pb2.py +++ b/sdk/python/feast/protos/feast/core/DataSource_pb2.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: feast/core/DataSource.proto -# Protobuf Python Version: 6.31.1 +# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 6, - 31, - 1, - '', - 'feast/core/DataSource.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -34,14 +24,14 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'feast.core.DataSource_pb2', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\020feast.proto.coreB\017DataSourceProtoZ/github.com/feast-dev/feast/go/protos/feast/core' - _globals['_DATASOURCE_TAGSENTRY']._loaded_options = None + _globals['_DATASOURCE_TAGSENTRY']._options = None _globals['_DATASOURCE_TAGSENTRY']._serialized_options = b'8\001' - _globals['_DATASOURCE_FIELDMAPPINGENTRY']._loaded_options = None + _globals['_DATASOURCE_FIELDMAPPINGENTRY']._options = None _globals['_DATASOURCE_FIELDMAPPINGENTRY']._serialized_options = b'8\001' - _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._loaded_options = None + _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._options = None _globals['_DATASOURCE_REQUESTDATAOPTIONS_DEPRECATEDSCHEMAENTRY']._serialized_options = b'8\001' _globals['_DATASOURCE']._serialized_start=189 _globals['_DATASOURCE']._serialized_end=3300 diff --git a/sdk/python/feast/protos/feast/core/DataSource_pb2.pyi b/sdk/python/feast/protos/feast/core/DataSource_pb2.pyi index 6b2fe5cfad5..e38b71359fb 100644 --- a/sdk/python/feast/protos/feast/core/DataSource_pb2.pyi +++ b/sdk/python/feast/protos/feast/core/DataSource_pb2.pyi @@ -16,42 +16,40 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ - -from collections import abc as _abc -from feast.core import DataFormat_pb2 as _DataFormat_pb2 -from feast.core import Feature_pb2 as _Feature_pb2 -from feast.types import Value_pb2 as _Value_pb2 -from google.protobuf import descriptor as _descriptor -from google.protobuf import duration_pb2 as _duration_pb2 -from google.protobuf import message as _message -from google.protobuf import timestamp_pb2 as _timestamp_pb2 -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -import builtins as _builtins +import builtins +import collections.abc +import feast.core.DataFormat_pb2 +import feast.core.Feature_pb2 +import feast.types.Value_pb2 +import google.protobuf.descriptor +import google.protobuf.duration_pb2 +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import google.protobuf.timestamp_pb2 import sys -import typing as _typing +import typing -if sys.version_info >= (3, 11): - from typing import TypeAlias as _TypeAlias, Never as _Never +if sys.version_info >= (3, 10): + import typing as typing_extensions else: - from typing_extensions import TypeAlias as _TypeAlias, Never as _Never + import typing_extensions -DESCRIPTOR: _descriptor.FileDescriptor +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@_typing.final -class DataSource(_message.Message): +class DataSource(google.protobuf.message.Message): """Defines a Data Source that can be used source Feature data Next available id: 29 """ - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor class _SourceType: - ValueType = _typing.NewType("ValueType", _builtins.int) - V: _TypeAlias = ValueType # noqa: Y015 + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType - class _SourceTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[DataSource._SourceType.ValueType], _builtins.type): - DESCRIPTOR: _descriptor.EnumDescriptor + class _SourceTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DataSource._SourceType.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor INVALID: DataSource._SourceType.ValueType # 0 BATCH_FILE: DataSource._SourceType.ValueType # 1 BATCH_SNOWFLAKE: DataSource._SourceType.ValueType # 8 @@ -85,608 +83,514 @@ class DataSource(_message.Message): BATCH_SPARK: DataSource.SourceType.ValueType # 11 BATCH_ATHENA: DataSource.SourceType.ValueType # 12 - @_typing.final - class TagsEntry(_message.Message): - DESCRIPTOR: _descriptor.Descriptor + class TagsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor - KEY_FIELD_NUMBER: _builtins.int - VALUE_FIELD_NUMBER: _builtins.int - key: _builtins.str - value: _builtins.str + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.str def __init__( self, *, - key: _builtins.str = ..., - value: _builtins.str = ..., + key: builtins.str = ..., + value: builtins.str = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class FieldMappingEntry(_message.Message): - DESCRIPTOR: _descriptor.Descriptor - - KEY_FIELD_NUMBER: _builtins.int - VALUE_FIELD_NUMBER: _builtins.int - key: _builtins.str - value: _builtins.str + def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + + class FieldMappingEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.str def __init__( self, *, - key: _builtins.str = ..., - value: _builtins.str = ..., + key: builtins.str = ..., + value: builtins.str = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class SourceMeta(_message.Message): - DESCRIPTOR: _descriptor.Descriptor - - EARLIESTEVENTTIMESTAMP_FIELD_NUMBER: _builtins.int - LATESTEVENTTIMESTAMP_FIELD_NUMBER: _builtins.int - CREATED_TIMESTAMP_FIELD_NUMBER: _builtins.int - LAST_UPDATED_TIMESTAMP_FIELD_NUMBER: _builtins.int - @_builtins.property - def earliestEventTimestamp(self) -> _timestamp_pb2.Timestamp: ... - @_builtins.property - def latestEventTimestamp(self) -> _timestamp_pb2.Timestamp: ... - @_builtins.property - def created_timestamp(self) -> _timestamp_pb2.Timestamp: ... - @_builtins.property - def last_updated_timestamp(self) -> _timestamp_pb2.Timestamp: ... + def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + + class SourceMeta(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + EARLIESTEVENTTIMESTAMP_FIELD_NUMBER: builtins.int + LATESTEVENTTIMESTAMP_FIELD_NUMBER: builtins.int + CREATED_TIMESTAMP_FIELD_NUMBER: builtins.int + LAST_UPDATED_TIMESTAMP_FIELD_NUMBER: builtins.int + @property + def earliestEventTimestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def latestEventTimestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def created_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def last_updated_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ... def __init__( self, *, - earliestEventTimestamp: _timestamp_pb2.Timestamp | None = ..., - latestEventTimestamp: _timestamp_pb2.Timestamp | None = ..., - created_timestamp: _timestamp_pb2.Timestamp | None = ..., - last_updated_timestamp: _timestamp_pb2.Timestamp | None = ..., + earliestEventTimestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., + latestEventTimestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., + created_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., + last_updated_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _typing.Literal["created_timestamp", b"created_timestamp", "earliestEventTimestamp", b"earliestEventTimestamp", "last_updated_timestamp", b"last_updated_timestamp", "latestEventTimestamp", b"latestEventTimestamp"] # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["created_timestamp", b"created_timestamp", "earliestEventTimestamp", b"earliestEventTimestamp", "last_updated_timestamp", b"last_updated_timestamp", "latestEventTimestamp", b"latestEventTimestamp"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class FileOptions(_message.Message): + def HasField(self, field_name: typing_extensions.Literal["created_timestamp", b"created_timestamp", "earliestEventTimestamp", b"earliestEventTimestamp", "last_updated_timestamp", b"last_updated_timestamp", "latestEventTimestamp", b"latestEventTimestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["created_timestamp", b"created_timestamp", "earliestEventTimestamp", b"earliestEventTimestamp", "last_updated_timestamp", b"last_updated_timestamp", "latestEventTimestamp", b"latestEventTimestamp"]) -> None: ... + + class FileOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from a file""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - FILE_FORMAT_FIELD_NUMBER: _builtins.int - URI_FIELD_NUMBER: _builtins.int - S3_ENDPOINT_OVERRIDE_FIELD_NUMBER: _builtins.int - uri: _builtins.str + FILE_FORMAT_FIELD_NUMBER: builtins.int + URI_FIELD_NUMBER: builtins.int + S3_ENDPOINT_OVERRIDE_FIELD_NUMBER: builtins.int + @property + def file_format(self) -> feast.core.DataFormat_pb2.FileFormat: ... + uri: builtins.str """Target URL of file to retrieve and source features from. s3://path/to/file for AWS S3 storage gs://path/to/file for GCP GCS storage file:///path/to/file for local storage """ - s3_endpoint_override: _builtins.str + s3_endpoint_override: builtins.str """override AWS S3 storage endpoint with custom S3 endpoint""" - @_builtins.property - def file_format(self) -> _DataFormat_pb2.FileFormat: ... def __init__( self, *, - file_format: _DataFormat_pb2.FileFormat | None = ..., - uri: _builtins.str = ..., - s3_endpoint_override: _builtins.str = ..., + file_format: feast.core.DataFormat_pb2.FileFormat | None = ..., + uri: builtins.str = ..., + s3_endpoint_override: builtins.str = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _typing.Literal["file_format", b"file_format"] # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["file_format", b"file_format", "s3_endpoint_override", b"s3_endpoint_override", "uri", b"uri"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class BigQueryOptions(_message.Message): + def HasField(self, field_name: typing_extensions.Literal["file_format", b"file_format"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["file_format", b"file_format", "s3_endpoint_override", b"s3_endpoint_override", "uri", b"uri"]) -> None: ... + + class BigQueryOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from a BigQuery Query""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - TABLE_FIELD_NUMBER: _builtins.int - QUERY_FIELD_NUMBER: _builtins.int - table: _builtins.str + TABLE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + table: builtins.str """Full table reference in the form of [project:dataset.table]""" - query: _builtins.str + query: builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ def __init__( self, *, - table: _builtins.str = ..., - query: _builtins.str = ..., + table: builtins.str = ..., + query: builtins.str = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["query", b"query", "table", b"table"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class TrinoOptions(_message.Message): + def ClearField(self, field_name: typing_extensions.Literal["query", b"query", "table", b"table"]) -> None: ... + + class TrinoOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from a Trino Query""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - TABLE_FIELD_NUMBER: _builtins.int - QUERY_FIELD_NUMBER: _builtins.int - table: _builtins.str + TABLE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + table: builtins.str """Full table reference in the form of [project:dataset.table]""" - query: _builtins.str + query: builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ def __init__( self, *, - table: _builtins.str = ..., - query: _builtins.str = ..., + table: builtins.str = ..., + query: builtins.str = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["query", b"query", "table", b"table"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class KafkaOptions(_message.Message): + def ClearField(self, field_name: typing_extensions.Literal["query", b"query", "table", b"table"]) -> None: ... + + class KafkaOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from Kafka messages. Each message should be a Protobuf that can be decoded with the generated Java Protobuf class at the given class path """ - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - KAFKA_BOOTSTRAP_SERVERS_FIELD_NUMBER: _builtins.int - TOPIC_FIELD_NUMBER: _builtins.int - MESSAGE_FORMAT_FIELD_NUMBER: _builtins.int - WATERMARK_DELAY_THRESHOLD_FIELD_NUMBER: _builtins.int - kafka_bootstrap_servers: _builtins.str + KAFKA_BOOTSTRAP_SERVERS_FIELD_NUMBER: builtins.int + TOPIC_FIELD_NUMBER: builtins.int + MESSAGE_FORMAT_FIELD_NUMBER: builtins.int + WATERMARK_DELAY_THRESHOLD_FIELD_NUMBER: builtins.int + kafka_bootstrap_servers: builtins.str """Comma separated list of Kafka bootstrap servers. Used for feature tables without a defined source host[:port]]""" - topic: _builtins.str + topic: builtins.str """Kafka topic to collect feature data from.""" - @_builtins.property - def message_format(self) -> _DataFormat_pb2.StreamFormat: + @property + def message_format(self) -> feast.core.DataFormat_pb2.StreamFormat: """Defines the stream data format encoding feature/entity data in Kafka messages.""" - - @_builtins.property - def watermark_delay_threshold(self) -> _duration_pb2.Duration: + @property + def watermark_delay_threshold(self) -> google.protobuf.duration_pb2.Duration: """Watermark delay threshold for stream data""" - def __init__( self, *, - kafka_bootstrap_servers: _builtins.str = ..., - topic: _builtins.str = ..., - message_format: _DataFormat_pb2.StreamFormat | None = ..., - watermark_delay_threshold: _duration_pb2.Duration | None = ..., + kafka_bootstrap_servers: builtins.str = ..., + topic: builtins.str = ..., + message_format: feast.core.DataFormat_pb2.StreamFormat | None = ..., + watermark_delay_threshold: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _typing.Literal["message_format", b"message_format", "watermark_delay_threshold", b"watermark_delay_threshold"] # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["kafka_bootstrap_servers", b"kafka_bootstrap_servers", "message_format", b"message_format", "topic", b"topic", "watermark_delay_threshold", b"watermark_delay_threshold"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class KinesisOptions(_message.Message): + def HasField(self, field_name: typing_extensions.Literal["message_format", b"message_format", "watermark_delay_threshold", b"watermark_delay_threshold"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["kafka_bootstrap_servers", b"kafka_bootstrap_servers", "message_format", b"message_format", "topic", b"topic", "watermark_delay_threshold", b"watermark_delay_threshold"]) -> None: ... + + class KinesisOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from Kinesis records. Each record should be a Protobuf that can be decoded with the generated Java Protobuf class at the given class path """ - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - REGION_FIELD_NUMBER: _builtins.int - STREAM_NAME_FIELD_NUMBER: _builtins.int - RECORD_FORMAT_FIELD_NUMBER: _builtins.int - region: _builtins.str + REGION_FIELD_NUMBER: builtins.int + STREAM_NAME_FIELD_NUMBER: builtins.int + RECORD_FORMAT_FIELD_NUMBER: builtins.int + region: builtins.str """AWS region of the Kinesis stream""" - stream_name: _builtins.str + stream_name: builtins.str """Name of the Kinesis stream to obtain feature data from.""" - @_builtins.property - def record_format(self) -> _DataFormat_pb2.StreamFormat: + @property + def record_format(self) -> feast.core.DataFormat_pb2.StreamFormat: """Defines the data format encoding the feature/entity data in Kinesis records. Kinesis Data Sources support Avro and Proto as data formats. """ - def __init__( self, *, - region: _builtins.str = ..., - stream_name: _builtins.str = ..., - record_format: _DataFormat_pb2.StreamFormat | None = ..., + region: builtins.str = ..., + stream_name: builtins.str = ..., + record_format: feast.core.DataFormat_pb2.StreamFormat | None = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _typing.Literal["record_format", b"record_format"] # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["record_format", b"record_format", "region", b"region", "stream_name", b"stream_name"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class RedshiftOptions(_message.Message): + def HasField(self, field_name: typing_extensions.Literal["record_format", b"record_format"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["record_format", b"record_format", "region", b"region", "stream_name", b"stream_name"]) -> None: ... + + class RedshiftOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from a Redshift Query""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - TABLE_FIELD_NUMBER: _builtins.int - QUERY_FIELD_NUMBER: _builtins.int - SCHEMA_FIELD_NUMBER: _builtins.int - DATABASE_FIELD_NUMBER: _builtins.int - table: _builtins.str + TABLE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + SCHEMA_FIELD_NUMBER: builtins.int + DATABASE_FIELD_NUMBER: builtins.int + table: builtins.str """Redshift table name""" - query: _builtins.str + query: builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ - schema: _builtins.str + schema: builtins.str """Redshift schema name""" - database: _builtins.str + database: builtins.str """Redshift database name""" def __init__( self, *, - table: _builtins.str = ..., - query: _builtins.str = ..., - schema: _builtins.str = ..., - database: _builtins.str = ..., + table: builtins.str = ..., + query: builtins.str = ..., + schema: builtins.str = ..., + database: builtins.str = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["database", b"database", "query", b"query", "schema", b"schema", "table", b"table"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class AthenaOptions(_message.Message): + def ClearField(self, field_name: typing_extensions.Literal["database", b"database", "query", b"query", "schema", b"schema", "table", b"table"]) -> None: ... + + class AthenaOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from a Athena Query""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - TABLE_FIELD_NUMBER: _builtins.int - QUERY_FIELD_NUMBER: _builtins.int - DATABASE_FIELD_NUMBER: _builtins.int - DATA_SOURCE_FIELD_NUMBER: _builtins.int - table: _builtins.str + TABLE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + DATABASE_FIELD_NUMBER: builtins.int + DATA_SOURCE_FIELD_NUMBER: builtins.int + table: builtins.str """Athena table name""" - query: _builtins.str + query: builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ - database: _builtins.str + database: builtins.str """Athena database name""" - data_source: _builtins.str + data_source: builtins.str """Athena schema name""" def __init__( self, *, - table: _builtins.str = ..., - query: _builtins.str = ..., - database: _builtins.str = ..., - data_source: _builtins.str = ..., + table: builtins.str = ..., + query: builtins.str = ..., + database: builtins.str = ..., + data_source: builtins.str = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["data_source", b"data_source", "database", b"database", "query", b"query", "table", b"table"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class SnowflakeOptions(_message.Message): + def ClearField(self, field_name: typing_extensions.Literal["data_source", b"data_source", "database", b"database", "query", b"query", "table", b"table"]) -> None: ... + + class SnowflakeOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from a Snowflake Query""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - TABLE_FIELD_NUMBER: _builtins.int - QUERY_FIELD_NUMBER: _builtins.int - SCHEMA_FIELD_NUMBER: _builtins.int - DATABASE_FIELD_NUMBER: _builtins.int - table: _builtins.str + TABLE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + SCHEMA_FIELD_NUMBER: builtins.int + DATABASE_FIELD_NUMBER: builtins.int + table: builtins.str """Snowflake table name""" - query: _builtins.str + query: builtins.str """SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective entity columns """ - schema: _builtins.str + schema: builtins.str """Snowflake schema name""" - database: _builtins.str + database: builtins.str """Snowflake schema name""" def __init__( self, *, - table: _builtins.str = ..., - query: _builtins.str = ..., - schema: _builtins.str = ..., - database: _builtins.str = ..., + table: builtins.str = ..., + query: builtins.str = ..., + schema: builtins.str = ..., + database: builtins.str = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["database", b"database", "query", b"query", "schema", b"schema", "table", b"table"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class SparkOptions(_message.Message): + def ClearField(self, field_name: typing_extensions.Literal["database", b"database", "query", b"query", "schema", b"schema", "table", b"table"]) -> None: ... + + class SparkOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from a spark table/query""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - TABLE_FIELD_NUMBER: _builtins.int - QUERY_FIELD_NUMBER: _builtins.int - PATH_FIELD_NUMBER: _builtins.int - FILE_FORMAT_FIELD_NUMBER: _builtins.int - DATE_PARTITION_COLUMN_FORMAT_FIELD_NUMBER: _builtins.int - TABLE_FORMAT_FIELD_NUMBER: _builtins.int - table: _builtins.str + TABLE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + PATH_FIELD_NUMBER: builtins.int + FILE_FORMAT_FIELD_NUMBER: builtins.int + DATE_PARTITION_COLUMN_FORMAT_FIELD_NUMBER: builtins.int + TABLE_FORMAT_FIELD_NUMBER: builtins.int + table: builtins.str """Table name""" - query: _builtins.str + query: builtins.str """Spark SQl query that returns the table, this is an alternative to `table`""" - path: _builtins.str + path: builtins.str """Path from which spark can read the table, this is an alternative to `table`""" - file_format: _builtins.str + file_format: builtins.str """Format of files at `path` (e.g. parquet, avro, etc)""" - date_partition_column_format: _builtins.str + date_partition_column_format: builtins.str """Date Format of date partition column (e.g. %Y-%m-%d)""" - @_builtins.property - def table_format(self) -> _DataFormat_pb2.TableFormat: + @property + def table_format(self) -> feast.core.DataFormat_pb2.TableFormat: """Table Format (e.g. iceberg, delta, hudi)""" - def __init__( self, *, - table: _builtins.str = ..., - query: _builtins.str = ..., - path: _builtins.str = ..., - file_format: _builtins.str = ..., - date_partition_column_format: _builtins.str = ..., - table_format: _DataFormat_pb2.TableFormat | None = ..., + table: builtins.str = ..., + query: builtins.str = ..., + path: builtins.str = ..., + file_format: builtins.str = ..., + date_partition_column_format: builtins.str = ..., + table_format: feast.core.DataFormat_pb2.TableFormat | None = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _typing.Literal["table_format", b"table_format"] # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["date_partition_column_format", b"date_partition_column_format", "file_format", b"file_format", "path", b"path", "query", b"query", "table", b"table", "table_format", b"table_format"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class CustomSourceOptions(_message.Message): + def HasField(self, field_name: typing_extensions.Literal["table_format", b"table_format"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["date_partition_column_format", b"date_partition_column_format", "file_format", b"file_format", "path", b"path", "query", b"query", "table", b"table", "table_format", b"table_format"]) -> None: ... + + class CustomSourceOptions(google.protobuf.message.Message): """Defines configuration for custom third-party data sources.""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - CONFIGURATION_FIELD_NUMBER: _builtins.int - configuration: _builtins.bytes + CONFIGURATION_FIELD_NUMBER: builtins.int + configuration: builtins.bytes """Serialized configuration information for the data source. The implementer of the custom data source is responsible for serializing and deserializing data from bytes """ def __init__( self, *, - configuration: _builtins.bytes = ..., + configuration: builtins.bytes = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["configuration", b"configuration"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class RequestDataOptions(_message.Message): + def ClearField(self, field_name: typing_extensions.Literal["configuration", b"configuration"]) -> None: ... + + class RequestDataOptions(google.protobuf.message.Message): """Defines options for DataSource that sources features from request data""" - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor - @_typing.final - class DeprecatedSchemaEntry(_message.Message): - DESCRIPTOR: _descriptor.Descriptor + class DeprecatedSchemaEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor - KEY_FIELD_NUMBER: _builtins.int - VALUE_FIELD_NUMBER: _builtins.int - key: _builtins.str - value: _Value_pb2.ValueType.Enum.ValueType + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: feast.types.Value_pb2.ValueType.Enum.ValueType def __init__( self, *, - key: _builtins.str = ..., - value: _Value_pb2.ValueType.Enum.ValueType = ..., + key: builtins.str = ..., + value: feast.types.Value_pb2.ValueType.Enum.ValueType = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - DEPRECATED_SCHEMA_FIELD_NUMBER: _builtins.int - SCHEMA_FIELD_NUMBER: _builtins.int - @_builtins.property - def deprecated_schema(self) -> _containers.ScalarMap[_builtins.str, _Value_pb2.ValueType.Enum.ValueType]: - """Mapping of feature name to type""" + def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... - @_builtins.property - def schema(self) -> _containers.RepeatedCompositeFieldContainer[_Feature_pb2.FeatureSpecV2]: ... + DEPRECATED_SCHEMA_FIELD_NUMBER: builtins.int + SCHEMA_FIELD_NUMBER: builtins.int + @property + def deprecated_schema(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, feast.types.Value_pb2.ValueType.Enum.ValueType]: + """Mapping of feature name to type""" + @property + def schema(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[feast.core.Feature_pb2.FeatureSpecV2]: ... def __init__( self, *, - deprecated_schema: _abc.Mapping[_builtins.str, _Value_pb2.ValueType.Enum.ValueType] | None = ..., - schema: _abc.Iterable[_Feature_pb2.FeatureSpecV2] | None = ..., + deprecated_schema: collections.abc.Mapping[builtins.str, feast.types.Value_pb2.ValueType.Enum.ValueType] | None = ..., + schema: collections.abc.Iterable[feast.core.Feature_pb2.FeatureSpecV2] | None = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["deprecated_schema", b"deprecated_schema", "schema", b"schema"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - @_typing.final - class PushOptions(_message.Message): + def ClearField(self, field_name: typing_extensions.Literal["deprecated_schema", b"deprecated_schema", "schema", b"schema"]) -> None: ... + + class PushOptions(google.protobuf.message.Message): """Defines options for DataSource that supports pushing data to it. This allows data to be pushed to the online store on-demand, such as by stream consumers. """ - DESCRIPTOR: _descriptor.Descriptor + DESCRIPTOR: google.protobuf.descriptor.Descriptor def __init__( self, ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _Never # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... - - NAME_FIELD_NUMBER: _builtins.int - PROJECT_FIELD_NUMBER: _builtins.int - DESCRIPTION_FIELD_NUMBER: _builtins.int - TAGS_FIELD_NUMBER: _builtins.int - OWNER_FIELD_NUMBER: _builtins.int - TYPE_FIELD_NUMBER: _builtins.int - FIELD_MAPPING_FIELD_NUMBER: _builtins.int - TIMESTAMP_FIELD_FIELD_NUMBER: _builtins.int - DATE_PARTITION_COLUMN_FIELD_NUMBER: _builtins.int - CREATED_TIMESTAMP_COLUMN_FIELD_NUMBER: _builtins.int - TIMESTAMP_FIELD_TYPE_FIELD_NUMBER: _builtins.int - DATA_SOURCE_CLASS_TYPE_FIELD_NUMBER: _builtins.int - BATCH_SOURCE_FIELD_NUMBER: _builtins.int - META_FIELD_NUMBER: _builtins.int - FILE_OPTIONS_FIELD_NUMBER: _builtins.int - BIGQUERY_OPTIONS_FIELD_NUMBER: _builtins.int - KAFKA_OPTIONS_FIELD_NUMBER: _builtins.int - KINESIS_OPTIONS_FIELD_NUMBER: _builtins.int - REDSHIFT_OPTIONS_FIELD_NUMBER: _builtins.int - REQUEST_DATA_OPTIONS_FIELD_NUMBER: _builtins.int - CUSTOM_OPTIONS_FIELD_NUMBER: _builtins.int - SNOWFLAKE_OPTIONS_FIELD_NUMBER: _builtins.int - PUSH_OPTIONS_FIELD_NUMBER: _builtins.int - SPARK_OPTIONS_FIELD_NUMBER: _builtins.int - TRINO_OPTIONS_FIELD_NUMBER: _builtins.int - ATHENA_OPTIONS_FIELD_NUMBER: _builtins.int - name: _builtins.str + + NAME_FIELD_NUMBER: builtins.int + PROJECT_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + TAGS_FIELD_NUMBER: builtins.int + OWNER_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + FIELD_MAPPING_FIELD_NUMBER: builtins.int + TIMESTAMP_FIELD_FIELD_NUMBER: builtins.int + DATE_PARTITION_COLUMN_FIELD_NUMBER: builtins.int + CREATED_TIMESTAMP_COLUMN_FIELD_NUMBER: builtins.int + DATA_SOURCE_CLASS_TYPE_FIELD_NUMBER: builtins.int + BATCH_SOURCE_FIELD_NUMBER: builtins.int + META_FIELD_NUMBER: builtins.int + FILE_OPTIONS_FIELD_NUMBER: builtins.int + BIGQUERY_OPTIONS_FIELD_NUMBER: builtins.int + KAFKA_OPTIONS_FIELD_NUMBER: builtins.int + KINESIS_OPTIONS_FIELD_NUMBER: builtins.int + REDSHIFT_OPTIONS_FIELD_NUMBER: builtins.int + REQUEST_DATA_OPTIONS_FIELD_NUMBER: builtins.int + CUSTOM_OPTIONS_FIELD_NUMBER: builtins.int + SNOWFLAKE_OPTIONS_FIELD_NUMBER: builtins.int + PUSH_OPTIONS_FIELD_NUMBER: builtins.int + SPARK_OPTIONS_FIELD_NUMBER: builtins.int + TRINO_OPTIONS_FIELD_NUMBER: builtins.int + ATHENA_OPTIONS_FIELD_NUMBER: builtins.int + TIMESTAMP_FIELD_TYPE_FIELD_NUMBER: builtins.int + name: builtins.str """Unique name of data source within the project""" - project: _builtins.str + project: builtins.str """Name of Feast project that this data source belongs to.""" - description: _builtins.str - owner: _builtins.str - type: Global___DataSource.SourceType.ValueType - timestamp_field: _builtins.str + description: builtins.str + @property + def tags(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ... + owner: builtins.str + type: global___DataSource.SourceType.ValueType + @property + def field_mapping(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + """Defines mapping between fields in the sourced data + and fields in parent FeatureTable. + """ + timestamp_field: builtins.str """Must specify event timestamp column name""" - date_partition_column: _builtins.str + date_partition_column: builtins.str """(Optional) Specify partition column useful for file sources """ - created_timestamp_column: _builtins.str + created_timestamp_column: builtins.str """Must specify creation timestamp column name""" - timestamp_field_type: _builtins.str - """(Optional) Type of the timestamp_field column ("TIMESTAMP" or "DATE"). - When set to "DATE", SQL generation uses date-only comparisons. - """ - data_source_class_type: _builtins.str + timestamp_field_type: builtins.str + """Optional type of the timestamp field (e.g. DATE)""" + data_source_class_type: builtins.str """This is an internal field that is represents the python class for the data source object a proto object represents. This should be set by feast, and not by users. The field is used primarily by custom data sources and is mandatory for them to set. Feast may set it for first party sources as well. """ - @_builtins.property - def tags(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: ... - @_builtins.property - def field_mapping(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: - """Defines mapping between fields in the sourced data - and fields in parent FeatureTable. - """ - - @_builtins.property - def batch_source(self) -> Global___DataSource: + @property + def batch_source(self) -> global___DataSource: """Optional batch source for streaming sources for historical features and materialization.""" - - @_builtins.property - def meta(self) -> Global___DataSource.SourceMeta: ... - @_builtins.property - def file_options(self) -> Global___DataSource.FileOptions: ... - @_builtins.property - def bigquery_options(self) -> Global___DataSource.BigQueryOptions: ... - @_builtins.property - def kafka_options(self) -> Global___DataSource.KafkaOptions: ... - @_builtins.property - def kinesis_options(self) -> Global___DataSource.KinesisOptions: ... - @_builtins.property - def redshift_options(self) -> Global___DataSource.RedshiftOptions: ... - @_builtins.property - def request_data_options(self) -> Global___DataSource.RequestDataOptions: ... - @_builtins.property - def custom_options(self) -> Global___DataSource.CustomSourceOptions: ... - @_builtins.property - def snowflake_options(self) -> Global___DataSource.SnowflakeOptions: ... - @_builtins.property - def push_options(self) -> Global___DataSource.PushOptions: ... - @_builtins.property - def spark_options(self) -> Global___DataSource.SparkOptions: ... - @_builtins.property - def trino_options(self) -> Global___DataSource.TrinoOptions: ... - @_builtins.property - def athena_options(self) -> Global___DataSource.AthenaOptions: ... + @property + def meta(self) -> global___DataSource.SourceMeta: ... + @property + def file_options(self) -> global___DataSource.FileOptions: ... + @property + def bigquery_options(self) -> global___DataSource.BigQueryOptions: ... + @property + def kafka_options(self) -> global___DataSource.KafkaOptions: ... + @property + def kinesis_options(self) -> global___DataSource.KinesisOptions: ... + @property + def redshift_options(self) -> global___DataSource.RedshiftOptions: ... + @property + def request_data_options(self) -> global___DataSource.RequestDataOptions: ... + @property + def custom_options(self) -> global___DataSource.CustomSourceOptions: ... + @property + def snowflake_options(self) -> global___DataSource.SnowflakeOptions: ... + @property + def push_options(self) -> global___DataSource.PushOptions: ... + @property + def spark_options(self) -> global___DataSource.SparkOptions: ... + @property + def trino_options(self) -> global___DataSource.TrinoOptions: ... + @property + def athena_options(self) -> global___DataSource.AthenaOptions: ... def __init__( self, *, - name: _builtins.str = ..., - project: _builtins.str = ..., - description: _builtins.str = ..., - tags: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., - owner: _builtins.str = ..., - type: Global___DataSource.SourceType.ValueType = ..., - field_mapping: _abc.Mapping[_builtins.str, _builtins.str] | None = ..., - timestamp_field: _builtins.str = ..., - date_partition_column: _builtins.str = ..., - created_timestamp_column: _builtins.str = ..., - timestamp_field_type: _builtins.str = ..., - data_source_class_type: _builtins.str = ..., - batch_source: Global___DataSource | None = ..., - meta: Global___DataSource.SourceMeta | None = ..., - file_options: Global___DataSource.FileOptions | None = ..., - bigquery_options: Global___DataSource.BigQueryOptions | None = ..., - kafka_options: Global___DataSource.KafkaOptions | None = ..., - kinesis_options: Global___DataSource.KinesisOptions | None = ..., - redshift_options: Global___DataSource.RedshiftOptions | None = ..., - request_data_options: Global___DataSource.RequestDataOptions | None = ..., - custom_options: Global___DataSource.CustomSourceOptions | None = ..., - snowflake_options: Global___DataSource.SnowflakeOptions | None = ..., - push_options: Global___DataSource.PushOptions | None = ..., - spark_options: Global___DataSource.SparkOptions | None = ..., - trino_options: Global___DataSource.TrinoOptions | None = ..., - athena_options: Global___DataSource.AthenaOptions | None = ..., + name: builtins.str = ..., + project: builtins.str = ..., + description: builtins.str = ..., + tags: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + owner: builtins.str = ..., + type: global___DataSource.SourceType.ValueType = ..., + field_mapping: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + timestamp_field: builtins.str = ..., + date_partition_column: builtins.str = ..., + created_timestamp_column: builtins.str = ..., + timestamp_field_type: builtins.str = ..., + data_source_class_type: builtins.str = ..., + batch_source: global___DataSource | None = ..., + meta: global___DataSource.SourceMeta | None = ..., + file_options: global___DataSource.FileOptions | None = ..., + bigquery_options: global___DataSource.BigQueryOptions | None = ..., + kafka_options: global___DataSource.KafkaOptions | None = ..., + kinesis_options: global___DataSource.KinesisOptions | None = ..., + redshift_options: global___DataSource.RedshiftOptions | None = ..., + request_data_options: global___DataSource.RequestDataOptions | None = ..., + custom_options: global___DataSource.CustomSourceOptions | None = ..., + snowflake_options: global___DataSource.SnowflakeOptions | None = ..., + push_options: global___DataSource.PushOptions | None = ..., + spark_options: global___DataSource.SparkOptions | None = ..., + trino_options: global___DataSource.TrinoOptions | None = ..., + athena_options: global___DataSource.AthenaOptions | None = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _typing.Literal["athena_options", b"athena_options", "batch_source", b"batch_source", "bigquery_options", b"bigquery_options", "custom_options", b"custom_options", "file_options", b"file_options", "kafka_options", b"kafka_options", "kinesis_options", b"kinesis_options", "meta", b"meta", "options", b"options", "push_options", b"push_options", "redshift_options", b"redshift_options", "request_data_options", b"request_data_options", "snowflake_options", b"snowflake_options", "spark_options", b"spark_options", "trino_options", b"trino_options"] # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["athena_options", b"athena_options", "batch_source", b"batch_source", "bigquery_options", b"bigquery_options", "created_timestamp_column", b"created_timestamp_column", "custom_options", b"custom_options", "data_source_class_type", b"data_source_class_type", "date_partition_column", b"date_partition_column", "description", b"description", "field_mapping", b"field_mapping", "file_options", b"file_options", "kafka_options", b"kafka_options", "kinesis_options", b"kinesis_options", "meta", b"meta", "name", b"name", "options", b"options", "owner", b"owner", "project", b"project", "push_options", b"push_options", "redshift_options", b"redshift_options", "request_data_options", b"request_data_options", "snowflake_options", b"snowflake_options", "spark_options", b"spark_options", "tags", b"tags", "timestamp_field", b"timestamp_field", "timestamp_field_type", b"timestamp_field_type", "trino_options", b"trino_options", "type", b"type"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - _WhichOneofReturnType_options: _TypeAlias = _typing.Literal["file_options", "bigquery_options", "kafka_options", "kinesis_options", "redshift_options", "request_data_options", "custom_options", "snowflake_options", "push_options", "spark_options", "trino_options", "athena_options"] # noqa: Y015 - _WhichOneofArgType_options: _TypeAlias = _typing.Literal["options", b"options"] # noqa: Y015 - def WhichOneof(self, oneof_group: _WhichOneofArgType_options) -> _WhichOneofReturnType_options | None: ... - -Global___DataSource: _TypeAlias = DataSource # noqa: Y015 - -@_typing.final -class DataSourceList(_message.Message): - DESCRIPTOR: _descriptor.Descriptor - - DATASOURCES_FIELD_NUMBER: _builtins.int - @_builtins.property - def datasources(self) -> _containers.RepeatedCompositeFieldContainer[Global___DataSource]: ... + def HasField(self, field_name: typing_extensions.Literal["athena_options", b"athena_options", "batch_source", b"batch_source", "bigquery_options", b"bigquery_options", "custom_options", b"custom_options", "file_options", b"file_options", "kafka_options", b"kafka_options", "kinesis_options", b"kinesis_options", "meta", b"meta", "options", b"options", "push_options", b"push_options", "redshift_options", b"redshift_options", "request_data_options", b"request_data_options", "snowflake_options", b"snowflake_options", "spark_options", b"spark_options", "trino_options", b"trino_options"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["athena_options", b"athena_options", "batch_source", b"batch_source", "bigquery_options", b"bigquery_options", "created_timestamp_column", b"created_timestamp_column", "custom_options", b"custom_options", "data_source_class_type", b"data_source_class_type", "date_partition_column", b"date_partition_column", "description", b"description", "field_mapping", b"field_mapping", "file_options", b"file_options", "kafka_options", b"kafka_options", "kinesis_options", b"kinesis_options", "meta", b"meta", "name", b"name", "options", b"options", "owner", b"owner", "project", b"project", "push_options", b"push_options", "redshift_options", b"redshift_options", "request_data_options", b"request_data_options", "snowflake_options", b"snowflake_options", "spark_options", b"spark_options", "tags", b"tags", "timestamp_field", b"timestamp_field", "timestamp_field_type", b"timestamp_field_type", "trino_options", b"trino_options", "type", b"type"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["options", b"options"]) -> typing_extensions.Literal["file_options", "bigquery_options", "kafka_options", "kinesis_options", "redshift_options", "request_data_options", "custom_options", "snowflake_options", "push_options", "spark_options", "trino_options", "athena_options"] | None: ... + +global___DataSource = DataSource + +class DataSourceList(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DATASOURCES_FIELD_NUMBER: builtins.int + @property + def datasources(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DataSource]: ... def __init__( self, *, - datasources: _abc.Iterable[Global___DataSource] | None = ..., + datasources: collections.abc.Iterable[global___DataSource] | None = ..., ) -> None: ... - _HasFieldArgType: _TypeAlias = _Never # noqa: Y015 - def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ... - _ClearFieldArgType: _TypeAlias = _typing.Literal["datasources", b"datasources"] # noqa: Y015 - def ClearField(self, field_name: _ClearFieldArgType) -> None: ... - def WhichOneof(self, oneof_group: _Never) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["datasources", b"datasources"]) -> None: ... -Global___DataSourceList: _TypeAlias = DataSourceList # noqa: Y015 +global___DataSourceList = DataSourceList diff --git a/sdk/python/feast/protos/feast/core/DataSource_pb2_grpc.py b/sdk/python/feast/protos/feast/core/DataSource_pb2_grpc.py index db6552d5c59..2daafffebfc 100644 --- a/sdk/python/feast/protos/feast/core/DataSource_pb2_grpc.py +++ b/sdk/python/feast/protos/feast/core/DataSource_pb2_grpc.py @@ -1,24 +1,4 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import warnings - -GRPC_GENERATED_VERSION = '1.80.0' -GRPC_VERSION = grpc.__version__ -_version_not_supported = False - -try: - from grpc._utilities import first_version_is_lower - _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) -except ImportError: - _version_not_supported = True - -if _version_not_supported: - raise RuntimeError( - f'The grpc package installed is at version {GRPC_VERSION},' - + ' but the generated code in feast/core/DataSource_pb2_grpc.py depends on' - + f' grpcio>={GRPC_GENERATED_VERSION}.' - + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' - + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' - ) From 5d8b5668832c3ac668631c27f404a42b7908692a Mon Sep 17 00:00:00 2001 From: Jonathan Wrede Date: Sun, 3 May 2026 09:01:10 +0000 Subject: [PATCH 3/5] fix(bigquery): Add Literal type annotation for cast_style Mypy infers str from the ternary expression; annotate with the exact Literal union so the call to get_timestamp_filter_sql passes type checking. Signed-off-by: Jonathan Wrede --- sdk/python/feast/infra/offline_stores/bigquery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index a85c4bcb2a5..eda17a34cd0 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -161,7 +161,7 @@ def pull_latest_from_table_or_query( project=project_id, location=config.offline_store.location, ) - cast_style = ( + cast_style: Literal["date_func", "timestamp_func"] = ( "date_func" if data_source.timestamp_field_type == "DATE" else "timestamp_func" @@ -225,7 +225,7 @@ def pull_all_from_table_or_query( + BigQueryOfflineStore._escape_query_columns(feature_name_columns) + timestamp_fields ) - cast_style = ( + cast_style: Literal["date_func", "timestamp_func"] = ( "date_func" if data_source.timestamp_field_type == "DATE" else "timestamp_func" From cfb3dad9c862447b5a0afa779a5efbe031df4791 Mon Sep 17 00:00:00 2001 From: Jonathan Wrede Date: Sun, 3 May 2026 18:04:25 +0000 Subject: [PATCH 4/5] fix: Make timestamp_field_type default to None in FeatureViewQueryContext Callers that do not use DATE-typed timestamp fields (e.g. Spark offline store tests) should not be forced to pass timestamp_field_type. Adding a default keeps the new field backward-compatible. Signed-off-by: Jonathan Wrede --- sdk/python/feast/infra/offline_stores/offline_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/offline_utils.py b/sdk/python/feast/infra/offline_stores/offline_utils.py index fee87dde595..58dfaba692d 100644 --- a/sdk/python/feast/infra/offline_stores/offline_utils.py +++ b/sdk/python/feast/infra/offline_stores/offline_utils.py @@ -98,7 +98,7 @@ class FeatureViewQueryContext: date_partition_column: Optional[ str ] # this attribute is added because partition pruning affects Athena's query performance. - timestamp_field_type: Optional[str] + timestamp_field_type: Optional[str] = None def get_feature_view_query_context( From dfde59284845365d170528efad81243de0520e1d Mon Sep 17 00:00:00 2001 From: Jonathan Wrede Date: Sun, 3 May 2026 18:21:22 +0000 Subject: [PATCH 5/5] fix: Keep timestamp_field_type required in FeatureViewQueryContext A default value on timestamp_field_type breaks the SparkFeatureViewQueryContext subclass because its non-default fields (min_date_partition, max_date_partition) would follow a field with a default. Instead, keep it required and update the Spark test to pass it. Signed-off-by: Jonathan Wrede --- sdk/python/feast/infra/offline_stores/offline_utils.py | 2 +- .../spark_offline_store/test_spark_bfv_compute_on_read.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/offline_utils.py b/sdk/python/feast/infra/offline_stores/offline_utils.py index 58dfaba692d..fee87dde595 100644 --- a/sdk/python/feast/infra/offline_stores/offline_utils.py +++ b/sdk/python/feast/infra/offline_stores/offline_utils.py @@ -98,7 +98,7 @@ class FeatureViewQueryContext: date_partition_column: Optional[ str ] # this attribute is added because partition pruning affects Athena's query performance. - timestamp_field_type: Optional[str] = None + timestamp_field_type: Optional[str] def get_feature_view_query_context( diff --git a/sdk/python/tests/unit/infra/offline_stores/contrib/spark_offline_store/test_spark_bfv_compute_on_read.py b/sdk/python/tests/unit/infra/offline_stores/contrib/spark_offline_store/test_spark_bfv_compute_on_read.py index 0bcc282ae83..130583a13b1 100644 --- a/sdk/python/tests/unit/infra/offline_stores/contrib/spark_offline_store/test_spark_bfv_compute_on_read.py +++ b/sdk/python/tests/unit/infra/offline_stores/contrib/spark_offline_store/test_spark_bfv_compute_on_read.py @@ -52,6 +52,7 @@ def base_query_context(): min_event_timestamp="2023-01-01T00:00:00", max_event_timestamp="2024-01-01T00:00:00", date_partition_column=None, + timestamp_field_type=None, )