Skip to main content

Spark extensions for Feast

Project description

Feast Spark

Contains

  • Spark ingestion jobs for Feast versions 0.9 and below
  • Feast Job Service
  • Feast Python SDK Spark extensions

Usage:

import feast_spark
import feast

client = feast.Client()

client.set_project("project1")
entity = feast.Entity(
    name="driver_car_id",
    description="Car driver id",
    value_type=ValueType.STRING,
    labels={"team": "matchmaking"},
)

# Create Feature Tables using Feast SDK
batch_source = feast.FileSource(
    file_format=ParquetFormat(),
    file_url="file://feast/*",
    event_timestamp_column="ts_col",
    created_timestamp_column="timestamp",
    date_partition_column="date_partition_col",
)

stream_source = feast.KafkaSource(
    bootstrap_servers="localhost:9094",
    message_format=ProtoFormat("class.path"),
    topic="test_topic",
    event_timestamp_column="ts_col",
)

ft = feast.FeatureTable(
    name="my-feature-table-1",
    features=[
        Feature(name="fs1-my-feature-1", dtype=ValueType.INT64),
        Feature(name="fs1-my-feature-2", dtype=ValueType.STRING),
        Feature(name="fs1-my-feature-3", dtype=ValueType.STRING_LIST),
        Feature(name="fs1-my-feature-4", dtype=ValueType.BYTES_LIST),
    ],
    entities=["fs1-my-entity-1"],
    labels={"team": "matchmaking"},
    batch_source=batch_source,
    stream_source=stream_source,
)

# Register objects in Feast
client.apply(entity, ft)

# Start spark streaming ingestion job that reads from kafka and writes to the online store
feast_spark.Client(client).start_stream_to_online_ingestion(ft)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feast-spark-0.2.37.tar.gz (62.1 kB view details)

Uploaded Source

Built Distribution

feast_spark-0.2.37-py3-none-any.whl (88.6 kB view details)

Uploaded Python 3

File details

Details for the file feast-spark-0.2.37.tar.gz.

File metadata

  • Download URL: feast-spark-0.2.37.tar.gz
  • Upload date:
  • Size: 62.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for feast-spark-0.2.37.tar.gz
Algorithm Hash digest
SHA256 8d1d6690693b5e19140b8b2641a495178e02c6bc184938e46770fc2dafdfccb9
MD5 e1486835bfabff42a748bcdc293350a7
BLAKE2b-256 927379d254cb4a8b57db935ba56fffd7b9edf9086490f1bc0009f2383a3eddbf

See more details on using hashes here.

File details

Details for the file feast_spark-0.2.37-py3-none-any.whl.

File metadata

File hashes

Hashes for feast_spark-0.2.37-py3-none-any.whl
Algorithm Hash digest
SHA256 84a520aea39d42802ab44ff24aa17d0f62abbb9997e8858895def56a53ff78d8
MD5 16573a95502377bdf5d923717a7ae8d2
BLAKE2b-256 591fd5fb360461b472ddaf78ff7ce5ba94ed1d83574080911b84908800621e88

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page