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
(
self,
*,
name: str,
record_format: StreamFormat,
region: str,
stream_name: str,
timestamp_field: Optional[str] = "",
created_timestamp_column: Optional[str] = "",
field_mapping: Optional[Dict[str, str]] = None,
description: Optional[str] = "",
tags: Optional[Dict[str, str]] = None,
owner: Optional[str] = "",
batch_source: Optional[DataSource] = None,
)
| 748 | raise NotImplementedError |
| 749 | |
| 750 | def __init__( |
| 751 | self, |
| 752 | *, |
| 753 | name: str, |
| 754 | record_format: StreamFormat, |
| 755 | region: str, |
| 756 | stream_name: str, |
| 757 | timestamp_field: Optional[str] = "", |
| 758 | created_timestamp_column: Optional[str] = "", |
| 759 | field_mapping: Optional[Dict[str, str]] = None, |
| 760 | description: Optional[str] = "", |
| 761 | tags: Optional[Dict[str, str]] = None, |
| 762 | owner: Optional[str] = "", |
| 763 | batch_source: Optional[DataSource] = None, |
| 764 | ): |
| 765 | """ |
| 766 | Args: |
| 767 | name: The unique name of the Kinesis source. |
| 768 | record_format: The record format of the Kinesis stream. |
| 769 | region: The AWS region of the Kinesis stream. |
| 770 | stream_name: The name of the Kinesis stream. |
| 771 | timestamp_field: Event timestamp field used for point-in-time joins of |
| 772 | feature values. |
| 773 | created_timestamp_column: Timestamp column indicating when the row |
| 774 | was created, used for deduplicating rows. |
| 775 | field_mapping: A dictionary mapping of column names in this data |
| 776 | source to feature names in a feature table or view. Only used for feature |
| 777 | columns, not entity or timestamp columns. |
| 778 | description: A human-readable description. |
| 779 | tags: A dictionary of key-value pairs to store arbitrary metadata. |
| 780 | owner: The owner of the Kinesis source, typically the email of the primary |
| 781 | maintainer. |
| 782 | batch_source: A DataSource backing the Kinesis stream (used for retrieving historical features). |
| 783 | """ |
| 784 | if record_format is None: |
| 785 | raise ValueError("Record format must be specified for kinesis source") |
| 786 | |
| 787 | super().__init__( |
| 788 | name=name, |
| 789 | timestamp_field=timestamp_field, |
| 790 | created_timestamp_column=created_timestamp_column, |
| 791 | field_mapping=field_mapping, |
| 792 | description=description, |
| 793 | tags=tags, |
| 794 | owner=owner, |
| 795 | ) |
| 796 | self.batch_source = batch_source |
| 797 | self.kinesis_options = KinesisOptions( |
| 798 | record_format=record_format, region=region, stream_name=stream_name |
| 799 | ) |
| 800 | |
| 801 | def __eq__(self, other): |
| 802 | if not isinstance(other, KinesisSource): |
nothing calls this directly
no test coverage detected