Skip to main content

Spark extensions for Feast

Project description

Feast Spark

Contains

  • Spark ingestion jobs for Feast
  • 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.3.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

feast_spark-0.2.3-py3-none-any.whl (84.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: feast-spark-0.2.3.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for feast-spark-0.2.3.tar.gz
Algorithm Hash digest
SHA256 691bafb1c1891d53b742b8f413462d284bfef2ff0eb3f7f68d0cf2206c2227f2
MD5 8b8bce3aa3f2a99da5332290f315163f
BLAKE2b-256 ea53e97d91ce1c7da151597849ccd5ee6b599a74c88eddcc9278d28449714f0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: feast_spark-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 84.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for feast_spark-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8f1c92c774335c1ebc5ade5f971dcc71de320cc6987fc09573a37cf3512dc83c
MD5 0ebeac4ba20400c50b715fe43d10a0a5
BLAKE2b-256 cc3de08e58c0508730de9bd4e91d96738bbb1ba23154b912ff0e620ee6601531

See more details on using hashes here.

Supported by

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