diff --git a/sdk/python/feast/data_source.py b/sdk/python/feast/data_source.py index f7881c5045..bffa9ef74a 100644 --- a/sdk/python/feast/data_source.py +++ b/sdk/python/feast/data_source.py @@ -343,6 +343,8 @@ def get_table_query_string(self) -> str: @typechecked class KafkaSource(DataSource): + """A KafkaSource allow users to register Kafka streams as data sources.""" + def __init__( self, *, @@ -616,6 +618,8 @@ def source_datatype_to_feast_value_type() -> Callable[[str], ValueType]: @typechecked class KinesisSource(DataSource): + """A KinesisSource allows users to register Kinesis streams as data sources.""" + def validate(self, config: RepoConfig): raise NotImplementedError @@ -666,6 +670,25 @@ def __init__( owner: Optional[str] = "", batch_source: Optional[DataSource] = None, ): + """ + Args: + name: The unique name of the Kinesis source. + record_format: The record format of the Kinesis stream. + region: The AWS region of the Kinesis stream. + stream_name: The name of the Kinesis stream. + timestamp_field: Event timestamp field used for point-in-time joins of + feature values. + created_timestamp_column: Timestamp column indicating when the row + was created, used for deduplicating rows. + field_mapping: 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 entity or timestamp columns. + description: A human-readable description. + tags: A dictionary of key-value pairs to store arbitrary metadata. + owner: The owner of the Kinesis source, typically the email of the primary + maintainer. + batch_source: A DataSource backing the Kinesis stream (used for retrieving historical features). + """ if record_format is None: raise ValueError("Record format must be specified for kinesis source") diff --git a/sdk/python/feast/infra/offline_stores/bigquery_source.py b/sdk/python/feast/infra/offline_stores/bigquery_source.py index 1f667d6600..ebb8dc09e2 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery_source.py +++ b/sdk/python/feast/infra/offline_stores/bigquery_source.py @@ -21,6 +21,8 @@ @typechecked class BigQuerySource(DataSource): + """A BigQuerySource object defines a data source that a BigQueryOfflineStore class can use.""" + def __init__( self, *, diff --git a/sdk/python/feast/infra/offline_stores/contrib/mssql_offline_store/mssqlserver_source.py b/sdk/python/feast/infra/offline_stores/contrib/mssql_offline_store/mssqlserver_source.py index 39abd1c9e7..6bfdb39264 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/mssql_offline_store/mssqlserver_source.py +++ b/sdk/python/feast/infra/offline_stores/contrib/mssql_offline_store/mssqlserver_source.py @@ -111,6 +111,8 @@ def to_proto(self) -> DataSourceProto.CustomSourceOptions: class MsSqlServerSource(DataSource): + """A MsSqlServerSource object defines a data source that a MsSqlServerOfflineStore class can use.""" + def __init__( self, name: str, @@ -124,6 +126,23 @@ def __init__( tags: Optional[Dict[str, str]] = None, owner: Optional[str] = None, ): + """Creates a MsSqlServerSource object. + + Args: + name: Name of the source, which should be unique within a project. + table_ref: The table reference. + event_timestamp_column: The event timestamp column (used for point-in-time joins of feature values). + created_timestamp_column: Timestamp column indicating when the row was created + (used for deduplicating rows). + field_mapping: 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 entity or timestamp columns. + date_partition_column: The date partition column. + connection_str: The connection string. + description: A human-readable description. + tags: A dictionary of key-value pairs to store arbitrary metadata. + owner: The owner of the data source, typically the email of the primary maintainer. + """ # warnings.warn( # "The Azure Synapse + Azure SQL data source is an experimental feature in alpha development. " # "Some functionality may still be unstable so functionality can change in the future.", diff --git a/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres_source.py b/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres_source.py index c216328b8d..dcb85fe1a3 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres_source.py +++ b/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres_source.py @@ -18,6 +18,8 @@ @typechecked class PostgreSQLSource(DataSource): + """A PostgreSQLSource object defines a data source that a PostgreSQLOfflineStore class can use.""" + def __init__( self, name: Optional[str] = None, @@ -30,6 +32,24 @@ def __init__( tags: Optional[Dict[str, str]] = None, owner: Optional[str] = "", ): + """Creates a PostgreSQLSource object. + + Args: + name: Name of PostgreSQLSource, which should be unique within a project. + query: SQL query that will be used to fetch the data. + table: Table name. + timestamp_field (optional): Event timestamp field used for point-in-time joins of + feature values. + created_timestamp_column (optional): Timestamp column indicating when the row + was created, used for deduplicating rows. + 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 entity or timestamp columns. + description (optional): A human-readable description. + tags (optional): A dictionary of key-value pairs to store arbitrary metadata. + owner (optional): The owner of the data source, typically the email of the primary + maintainer. + """ self._postgres_options = PostgreSQLOptions(name=name, query=query, table=table) # If no name, use the table as the default name. diff --git a/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino_source.py b/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino_source.py index 73d40d902e..3a00277f0b 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino_source.py +++ b/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino_source.py @@ -84,6 +84,8 @@ def to_proto(self) -> DataSourceProto.TrinoOptions: class TrinoSource(DataSource): + """A TrinoSource object defines a data source that a TrinoOfflineStore class can use.""" + def __init__( self, *, diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 9557b8077d..5912cbdf3f 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -26,6 +26,8 @@ @typechecked class FileSource(DataSource): + """A FileSource object defines a data source that a DaskOfflineStore or DuckDBOfflineStore class can use.""" + def __init__( self, *, diff --git a/sdk/python/feast/infra/offline_stores/redshift_source.py b/sdk/python/feast/infra/offline_stores/redshift_source.py index f8cd53b246..0de84982e4 100644 --- a/sdk/python/feast/infra/offline_stores/redshift_source.py +++ b/sdk/python/feast/infra/offline_stores/redshift_source.py @@ -24,6 +24,8 @@ @typechecked class RedshiftSource(DataSource): + """A RedshiftSource object defines a data source that a RedshiftOfflineStore class can use.""" + def __init__( self, *, diff --git a/sdk/python/feast/infra/offline_stores/snowflake_source.py b/sdk/python/feast/infra/offline_stores/snowflake_source.py index 7ef2dbd6af..1d43fecc03 100644 --- a/sdk/python/feast/infra/offline_stores/snowflake_source.py +++ b/sdk/python/feast/infra/offline_stores/snowflake_source.py @@ -21,6 +21,8 @@ @typechecked class SnowflakeSource(DataSource): + """A SnowflakeSource object defines a data source that a SnowflakeOfflineStore class can use.""" + def __init__( self, *,