feast.loaders package¶
Submodules¶
feast.loaders.abstract_producer module¶
- class feast.loaders.abstract_producer.AbstractProducer(brokers: str, row_count: int, disable_progress_bar: bool)[source]¶
Bases:
object
Abstract class for Kafka producers
- class feast.loaders.abstract_producer.ConfluentProducer(brokers: str, row_count: int, disable_progress_bar: bool)[source]¶
Bases:
feast.loaders.abstract_producer.AbstractProducer
Concrete implementation of Confluent Kafka producer (confluent-kafka)
- class feast.loaders.abstract_producer.KafkaPythonProducer(brokers: str, row_count: int, disable_progress_bar: bool)[source]¶
Bases:
feast.loaders.abstract_producer.AbstractProducer
Concrete implementation of Python Kafka producer (kafka-python)
- flush(timeout: Optional[int])[source]¶
Generic flush that implements kafka-python’s flush method.
- Parameters
timeout (Optional[int]) – timeout in seconds to wait for completion.
- Returns
None
- Raises
KafkaTimeoutError – failure to flush buffered records within the provided timeout
- feast.loaders.abstract_producer.get_producer(brokers: str, row_count: int, disable_progress_bar: bool) → Union[feast.loaders.abstract_producer.ConfluentProducer, feast.loaders.abstract_producer.KafkaPythonProducer][source]¶
Simple context helper function that returns a AbstractProducer object when invoked.
This helper function will try to import confluent-kafka as a producer first.
This helper function will fallback to kafka-python if it fails to import confluent-kafka.
- Parameters
- Returns
- Concrete implementation of a Kafka producer. Ig can be:
confluent-kafka producer
kafka-python producer
- Return type
Union[ConfluentProducer, KafkaPythonProducer]
feast.loaders.file module¶
feast.loaders.ingest module¶
feast.loaders.yaml module¶
- feast.loaders.yaml.yaml_loader(yml, load_single=False)[source]¶
Loads one or more Feast resources from a YAML path or string. Multiple resources can be divided by three hyphens ‘—’
- Parameters
yml – A path ending in .yaml or .yml, or a YAML string
load_single – Expect only a single YAML resource, fail otherwise
- Returns
Either a single YAML dictionary or a list of YAML dictionaries