Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ dmypy.json

# Protos
sdk/python/docs/html
sdk/python/feast/protos/
#sdk/python/feast/protos/
sdk/go/protos/
go/protos/

Expand Down Expand Up @@ -223,4 +223,4 @@ ui/.vercel
**/yarn-error.log*

# Go subprocess binaries (built during feast pip package building)
sdk/python/feast/binaries/
sdk/python/feast/binaries/
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def pull_latest_from_table_or_query(
FROM (
SELECT {a_field_string},
ROW_NUMBER() OVER({partition_by_join_key_string} ORDER BY {timestamp_desc_string}) AS _feast_row
FROM ({from_expression}) a
FROM {from_expression} a
WHERE a."{timestamp_field}" BETWEEN '{start_date}'::timestamptz AND '{end_date}'::timestamptz
) b
WHERE _feast_row = 1
Expand Down
12 changes: 11 additions & 1 deletion sdk/python/feast/infra/registry/sql.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import os
import uuid
from datetime import datetime, timedelta
from enum import Enum
Expand Down Expand Up @@ -199,7 +200,16 @@ def __init__(
repo_path: Optional[Path],
):
assert registry_config is not None, "SqlRegistry needs a valid registry_config"
self.engine: Engine = create_engine(registry_config.path, echo=False)

sqlalchemy_url = registry_config.path
if "__placeholder_password__" in sqlalchemy_url:
secret_password = os.getenv("FEAST_SQL_REGISTRY_PASSWORD")
if secret_password:
sqlalchemy_url = sqlalchemy_url.replace("__placeholder_password__", secret_password)
else:
raise ValueError("'FEAST_SQL_REGISTRY_PASSWORD' is not set!")

self.engine: Engine = create_engine(sqlalchemy_url, echo=False)
metadata.create_all(self.engine)
self.cached_registry_proto = self.proto()
proto_registry_utils.init_project_metadata(self.cached_registry_proto, project)
Expand Down
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions sdk/python/feast/protos/feast/core/Aggregation_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions sdk/python/feast/protos/feast/core/Aggregation_pb2.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
"""
import builtins
import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.message
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...

class Aggregation(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
COLUMN_FIELD_NUMBER: builtins.int
FUNCTION_FIELD_NUMBER: builtins.int
TIME_WINDOW_FIELD_NUMBER: builtins.int
SLIDE_INTERVAL_FIELD_NUMBER: builtins.int
column: typing.Text = ...
function: typing.Text = ...
@property
def time_window(self) -> google.protobuf.duration_pb2.Duration: ...
@property
def slide_interval(self) -> google.protobuf.duration_pb2.Duration: ...
def __init__(self,
*,
column : typing.Text = ...,
function : typing.Text = ...,
time_window : typing.Optional[google.protobuf.duration_pb2.Duration] = ...,
slide_interval : typing.Optional[google.protobuf.duration_pb2.Duration] = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["slide_interval",b"slide_interval","time_window",b"time_window"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["column",b"column","function",b"function","slide_interval",b"slide_interval","time_window",b"time_window"]) -> None: ...
global___Aggregation = Aggregation
4 changes: 4 additions & 0 deletions sdk/python/feast/protos/feast/core/Aggregation_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

37 changes: 37 additions & 0 deletions sdk/python/feast/protos/feast/core/DataFormat_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 95 additions & 0 deletions sdk/python/feast/protos/feast/core/DataFormat_pb2.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
"""
import builtins
import google.protobuf.descriptor
import google.protobuf.message
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...

class FileFormat(google.protobuf.message.Message):
"""Defines the file format encoding the features/entity data in files"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
class ParquetFormat(google.protobuf.message.Message):
"""Defines options for the Parquet data format"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
def __init__(self,
) -> None: ...

PARQUET_FORMAT_FIELD_NUMBER: builtins.int
@property
def parquet_format(self) -> global___FileFormat.ParquetFormat: ...
def __init__(self,
*,
parquet_format : typing.Optional[global___FileFormat.ParquetFormat] = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["format",b"format","parquet_format",b"parquet_format"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["format",b"format","parquet_format",b"parquet_format"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["format",b"format"]) -> typing.Optional[typing_extensions.Literal["parquet_format"]]: ...
global___FileFormat = FileFormat

class StreamFormat(google.protobuf.message.Message):
"""Defines the data format encoding features/entity data in data streams"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
class ProtoFormat(google.protobuf.message.Message):
"""Defines options for the protobuf data format"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
CLASS_PATH_FIELD_NUMBER: builtins.int
class_path: typing.Text = ...
"""Classpath to the generated Java Protobuf class that can be used to decode
Feature data from the obtained stream message
"""

def __init__(self,
*,
class_path : typing.Text = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["class_path",b"class_path"]) -> None: ...

class AvroFormat(google.protobuf.message.Message):
"""Defines options for the avro data format"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
SCHEMA_JSON_FIELD_NUMBER: builtins.int
schema_json: typing.Text = ...
"""Optional if used in a File DataSource as schema is embedded in avro file.
Specifies the schema of the Avro message as JSON string.
"""

def __init__(self,
*,
schema_json : typing.Text = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["schema_json",b"schema_json"]) -> None: ...

class JsonFormat(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
SCHEMA_JSON_FIELD_NUMBER: builtins.int
schema_json: typing.Text = ...
def __init__(self,
*,
schema_json : typing.Text = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["schema_json",b"schema_json"]) -> None: ...

AVRO_FORMAT_FIELD_NUMBER: builtins.int
PROTO_FORMAT_FIELD_NUMBER: builtins.int
JSON_FORMAT_FIELD_NUMBER: builtins.int
@property
def avro_format(self) -> global___StreamFormat.AvroFormat: ...
@property
def proto_format(self) -> global___StreamFormat.ProtoFormat: ...
@property
def json_format(self) -> global___StreamFormat.JsonFormat: ...
def __init__(self,
*,
avro_format : typing.Optional[global___StreamFormat.AvroFormat] = ...,
proto_format : typing.Optional[global___StreamFormat.ProtoFormat] = ...,
json_format : typing.Optional[global___StreamFormat.JsonFormat] = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["avro_format",b"avro_format","format",b"format","json_format",b"json_format","proto_format",b"proto_format"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["avro_format",b"avro_format","format",b"format","json_format",b"json_format","proto_format",b"proto_format"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["format",b"format"]) -> typing.Optional[typing_extensions.Literal["avro_format","proto_format","json_format"]]: ...
global___StreamFormat = StreamFormat
4 changes: 4 additions & 0 deletions sdk/python/feast/protos/feast/core/DataFormat_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

Loading