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.7.tar.gz (57.6 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.7-py3-none-any.whl (85.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: feast-spark-0.2.7.tar.gz
  • Upload date:
  • Size: 57.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for feast-spark-0.2.7.tar.gz
Algorithm Hash digest
SHA256 a63b3dc03dfaefba3215c08c74ba0f5676fae927661aa97555f29c1cb059ea1b
MD5 b1a83777e98ba1bb8900567ef7df06ec
BLAKE2b-256 8a05fe8f2a44bd5b9d31a6bb8e5126a222d446c43bb010430bc2176de9ec10d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: feast_spark-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 85.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for feast_spark-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e9d786dff57a6700a5042d5dd577816a786f5197b742b56102e5436bf497e14b
MD5 bbdc3fb58d5fba39c1c94438fc85e2d9
BLAKE2b-256 d50e3bded5a6cb55638265173fae514bafeb5d3234346d31ff5ed40a0679f4b5

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