diff --git a/docs/reference/data-sources/table-formats.md b/docs/reference/data-sources/table-formats.md index f00e6f80c5f..047f1771d18 100644 --- a/docs/reference/data-sources/table-formats.md +++ b/docs/reference/data-sources/table-formats.md @@ -8,6 +8,29 @@ Feast supports modern table formats to enable data lakehouse architectures with ## Supported Table Formats +### Lance + +[Lance](https://lancedb.github.io/lance/) is an Arrow-native table format with +versioned datasets and vector indexing. Install Feast's native Lance reader and +namespace client with: + +```bash +pip install 'feast[lance]' +``` + +Use `LanceFormat` to select a namespace and optionally pin reads to a dataset +version or tag: + +```python +from feast.table_format import LanceFormat + +lance_format = LanceFormat( + catalog="my_catalog", + namespace="features", + tag="candidate", +) +``` + ### Apache Iceberg [Apache Iceberg](https://iceberg.apache.org/) is an open table format designed for huge analytic datasets. It provides: @@ -354,4 +377,4 @@ Future support planned for: - [Apache Iceberg Documentation](https://iceberg.apache.org/docs/latest/) - [Delta Lake Documentation](https://docs.delta.io/latest/index.html) - [Apache Hudi Documentation](https://hudi.apache.org/docs/overview) -- [Python API Reference - TableFormat](https://rtd.feast.dev/en/master/#feast.table_format) \ No newline at end of file +- [Python API Reference - TableFormat](https://rtd.feast.dev/en/master/#feast.table_format) diff --git a/pixi.lock b/pixi.lock index 88dba53fc6c..e450527cb94 100644 --- a/pixi.lock +++ b/pixi.lock @@ -2635,6 +2635,8 @@ packages: - psutil ; extra == 'opentelemetry' - pyspark>=4.0.0 ; extra == 'spark' - pyiceberg>=0.7.0 ; extra == 'iceberg' + - pylance>=12.0.0 ; extra == 'lance' + - lance-namespace>=0.11.1 ; extra == 'lance' - trino>=0.305.0,<0.400.0 ; extra == 'trino' - regex ; extra == 'trino' - psycopg[binary,pool]>=3.2.5 ; extra == 'postgres' @@ -2676,7 +2678,7 @@ packages: - minio==7.2.11 ; extra == 'test' - python-keycloak>=4.7.3,<5 ; extra == 'test' - cryptography>=43.0 ; extra == 'test' - - feast[aws,azure,cassandra,clickhouse,couchbase,delta,docling,duckdb,elasticsearch,faiss,gcp,ge,glide,go,grpcio,hazelcast,hbase,ibis,iceberg,image,k8s,mcp,mcp-server,milvus,mlflow,mongodb,mssql,mysql,openlineage,opentelemetry,oracle,postgres,pytorch,qdrant,rag,ray,redis,scylladb,singlestore,snowflake,spark,sqlite-vec,test,trino] ; extra == 'ci' + - feast[aws,azure,cassandra,clickhouse,couchbase,delta,docling,duckdb,elasticsearch,faiss,gcp,ge,glide,go,grpcio,hazelcast,hbase,ibis,iceberg,image,k8s,lance,mcp,mcp-server,milvus,mlflow,mongodb,mssql,mysql,openlineage,opentelemetry,oracle,postgres,pytorch,qdrant,rag,ray,redis,scylladb,singlestore,snowflake,spark,sqlite-vec,test,trino] ; extra == 'ci' - build ; extra == 'ci' - virtualenv==21.14.1 ; extra == 'ci' - dbt-artifacts-parser ; extra == 'ci' diff --git a/pyproject.toml b/pyproject.toml index d004ecd4773..6ce2ba8ee2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,10 @@ openlineage = ["openlineage-python>=1.40.0"] opentelemetry = ["prometheus_client", "psutil"] spark = ["pyspark>=4.0.0"] iceberg = ["pyiceberg>=0.7.0"] +lance = [ + "pylance>=12.0.0", + "lance-namespace>=0.11.1", +] trino = ["trino>=0.305.0,<0.400.0", "regex"] postgres = ["psycopg[binary,pool]>=3.2.5"] # psycopg[c] install requires a system with a C compiler, python dev headers, & postgresql client dev headers @@ -178,7 +182,7 @@ test = [ ] ci = [ - "feast[test, aws, azure, cassandra, clickhouse, couchbase, delta, docling, duckdb, elasticsearch, faiss, gcp, ge, glide, go, grpcio, hazelcast, hbase, ibis, iceberg, image, k8s, mcp, mcp-server, milvus, mlflow, mongodb, mssql, mysql, openlineage, opentelemetry, oracle, scylladb, spark, trino, postgres, pytorch, qdrant, rag, ray, redis, singlestore, snowflake, sqlite_vec]", + "feast[test, aws, azure, cassandra, clickhouse, couchbase, delta, docling, duckdb, elasticsearch, faiss, gcp, ge, glide, go, grpcio, hazelcast, hbase, ibis, iceberg, image, k8s, lance, mcp, mcp-server, milvus, mlflow, mongodb, mssql, mysql, openlineage, opentelemetry, oracle, scylladb, spark, trino, postgres, pytorch, qdrant, rag, ray, redis, singlestore, snowflake, sqlite_vec]", "build", "virtualenv==21.14.1", "dbt-artifacts-parser", diff --git a/sdk/python/requirements/py3.10-ci-requirements.txt b/sdk/python/requirements/py3.10-ci-requirements.txt index bd2e728ce35..22e577f7be4 100644 --- a/sdk/python/requirements/py3.10-ci-requirements.txt +++ b/sdk/python/requirements/py3.10-ci-requirements.txt @@ -3368,6 +3368,16 @@ kubernetes==37.0.0 \ # feast (pyproject.toml) # codeflare-sdk # kube-authkit +lance-namespace==0.11.1 \ + --hash=sha256:07643fce9a42ad4d58cc8bf91e3f592bc7f4cbd8d0ad5233223506debf67551c \ + --hash=sha256:f67cfbbe0647b7cb42f23b673e7edf8a75b7d8a047265a916492f8d247ee1bc2 + # via + # feast (pyproject.toml) + # pylance +lance-namespace-urllib3-client==0.11.1 \ + --hash=sha256:145a9e9424d7597487249b5b95ee274423bf2910e1a9160b6a07b676b61ea46a \ + --hash=sha256:36537f529294da6d884ba0fe783704483f0a75463497c7705fd083a4d0257990 + # via lance-namespace langcodes==3.5.1 \ --hash=sha256:40bff315e01b01d11c2ae3928dd4f5cbd74dd38f9bd912c12b9a3606c143f731 \ --hash=sha256:b6a9c25c603804e2d169165091d0cdb23934610524a21d226e4f463e8e958a72 @@ -4612,6 +4622,7 @@ numpy==2.2.6 ; python_full_version < '3.11' \ # opencv-python # pandas # pandas-gbq + # pylance # qdrant-client # rapidocr # safetensors @@ -4714,6 +4725,7 @@ numpy==2.4.6 ; python_full_version == '3.11.*' \ # opencv-python # pandas # pandas-gbq + # pylance # qdrant-client # rapidocr # ray @@ -4811,6 +4823,7 @@ numpy==2.5.3 ; python_full_version >= '3.12' \ # opencv-python # pandas # pandas-gbq + # pylance # qdrant-client # rapidocr # ray @@ -5716,6 +5729,7 @@ pyarrow==23.0.1 \ # milvus-lite # mlflow # pandas-gbq + # pylance # ray # snowflake-connector-python pyarrow-hotfix==0.7 \ @@ -5836,6 +5850,7 @@ pydantic[email]==2.13.5 \ # fastmcp-slim # great-expectations # kubernetes + # lance-namespace-urllib3-client # mcp # mlflow-skinny # mlflow-tracing @@ -6039,6 +6054,14 @@ pyjwt[crypto]==2.15.1 \ # msal # singlestoredb # snowflake-connector-python +pylance==13.0.0 \ + --hash=sha256:22a37a0af446964e79cfd6046f9ea2735fcb42f8020eab63947b2bdca04989c2 \ + --hash=sha256:22e47adcc2c7300ff876fb398ee9c625973932163ec055adae14871f8a09d7b0 \ + --hash=sha256:2c94649a35161c6100ed822ac022756bfefb840b7e01cf491505c5245186f7b4 \ + --hash=sha256:38cbe8d204785e697909e8faca91adb3b00a2f6a865c425987cb232d0865c010 \ + --hash=sha256:8a340dcf750171dd6386db0b6ed303bb22594e1c1b266b7fe149ea1684bf4a9a \ + --hash=sha256:a54496c4e6c01a8c3d49479fce98474c95a265515091d173aa9e16df271d837d + # via feast (pyproject.toml) pylatexenc==2.11 \ --hash=sha256:305a072a99ce736246049c9da05841b9d718c0f7ea8888f5f596cf15cb621053 \ --hash=sha256:e78e7391d6c104f1ed150e21cfaa58016cdb50aa54406a2eecb793649ffdfdd0 @@ -6511,6 +6534,7 @@ python-dateutil==2.9.0 \ # ibis-framework # jupyter-client # kubernetes + # lance-namespace-urllib3-client # matplotlib # moto # openlineage-python @@ -8758,6 +8782,7 @@ typing-extensions==4.16.0 \ # jupyterlab # jwcrypto # kubernetes + # lance-namespace-urllib3-client # mcp # minio # mistune @@ -8837,6 +8862,7 @@ urllib3==2.8.0 \ # great-expectations # kube-authkit # kubernetes + # lance-namespace-urllib3-client # minio # qdrant-client # requests diff --git a/sdk/python/requirements/py3.11-ci-requirements.txt b/sdk/python/requirements/py3.11-ci-requirements.txt index 7d3efe4515f..c5d89e46fc1 100644 --- a/sdk/python/requirements/py3.11-ci-requirements.txt +++ b/sdk/python/requirements/py3.11-ci-requirements.txt @@ -3187,6 +3187,16 @@ kubernetes==37.0.0 \ # feast (pyproject.toml) # codeflare-sdk # kube-authkit +lance-namespace==0.11.1 \ + --hash=sha256:07643fce9a42ad4d58cc8bf91e3f592bc7f4cbd8d0ad5233223506debf67551c \ + --hash=sha256:f67cfbbe0647b7cb42f23b673e7edf8a75b7d8a047265a916492f8d247ee1bc2 + # via + # feast (pyproject.toml) + # pylance +lance-namespace-urllib3-client==0.11.1 \ + --hash=sha256:145a9e9424d7597487249b5b95ee274423bf2910e1a9160b6a07b676b61ea46a \ + --hash=sha256:36537f529294da6d884ba0fe783704483f0a75463497c7705fd083a4d0257990 + # via lance-namespace langcodes==3.5.1 \ --hash=sha256:40bff315e01b01d11c2ae3928dd4f5cbd74dd38f9bd912c12b9a3606c143f731 \ --hash=sha256:b6a9c25c603804e2d169165091d0cdb23934610524a21d226e4f463e8e958a72 @@ -4387,6 +4397,7 @@ numpy==2.4.6 ; python_full_version < '3.12' \ # opencv-python # pandas # pandas-gbq + # pylance # qdrant-client # rapidocr # ray @@ -4484,6 +4495,7 @@ numpy==2.5.3 ; python_full_version >= '3.12' \ # opencv-python # pandas # pandas-gbq + # pylance # qdrant-client # rapidocr # ray @@ -5388,6 +5400,7 @@ pyarrow==23.0.1 \ # milvus-lite # mlflow # pandas-gbq + # pylance # ray # snowflake-connector-python pyarrow-hotfix==0.7 \ @@ -5508,6 +5521,7 @@ pydantic[email]==2.13.5 \ # fastmcp-slim # great-expectations # kubernetes + # lance-namespace-urllib3-client # mcp # mlflow-skinny # mlflow-tracing @@ -5711,6 +5725,14 @@ pyjwt[crypto]==2.15.1 \ # msal # singlestoredb # snowflake-connector-python +pylance==13.0.0 \ + --hash=sha256:22a37a0af446964e79cfd6046f9ea2735fcb42f8020eab63947b2bdca04989c2 \ + --hash=sha256:22e47adcc2c7300ff876fb398ee9c625973932163ec055adae14871f8a09d7b0 \ + --hash=sha256:2c94649a35161c6100ed822ac022756bfefb840b7e01cf491505c5245186f7b4 \ + --hash=sha256:38cbe8d204785e697909e8faca91adb3b00a2f6a865c425987cb232d0865c010 \ + --hash=sha256:8a340dcf750171dd6386db0b6ed303bb22594e1c1b266b7fe149ea1684bf4a9a \ + --hash=sha256:a54496c4e6c01a8c3d49479fce98474c95a265515091d173aa9e16df271d837d + # via feast (pyproject.toml) pylatexenc==2.11 \ --hash=sha256:305a072a99ce736246049c9da05841b9d718c0f7ea8888f5f596cf15cb621053 \ --hash=sha256:e78e7391d6c104f1ed150e21cfaa58016cdb50aa54406a2eecb793649ffdfdd0 @@ -6183,6 +6205,7 @@ python-dateutil==2.9.0 \ # ibis-framework # jupyter-client # kubernetes + # lance-namespace-urllib3-client # matplotlib # moto # openlineage-python @@ -8119,6 +8142,7 @@ typing-extensions==4.16.0 \ # jupyterlab # jwcrypto # kubernetes + # lance-namespace-urllib3-client # mcp # minio # mlflow-skinny @@ -8192,6 +8216,7 @@ urllib3==2.8.0 \ # great-expectations # kube-authkit # kubernetes + # lance-namespace-urllib3-client # minio # qdrant-client # requests diff --git a/sdk/python/requirements/py3.12-ci-requirements.txt b/sdk/python/requirements/py3.12-ci-requirements.txt index 0640fe9770b..5362ad1e378 100644 --- a/sdk/python/requirements/py3.12-ci-requirements.txt +++ b/sdk/python/requirements/py3.12-ci-requirements.txt @@ -3091,6 +3091,16 @@ kubernetes==37.0.0 \ # feast (pyproject.toml) # codeflare-sdk # kube-authkit +lance-namespace==0.11.1 \ + --hash=sha256:07643fce9a42ad4d58cc8bf91e3f592bc7f4cbd8d0ad5233223506debf67551c \ + --hash=sha256:f67cfbbe0647b7cb42f23b673e7edf8a75b7d8a047265a916492f8d247ee1bc2 + # via + # feast (pyproject.toml) + # pylance +lance-namespace-urllib3-client==0.11.1 \ + --hash=sha256:145a9e9424d7597487249b5b95ee274423bf2910e1a9160b6a07b676b61ea46a \ + --hash=sha256:36537f529294da6d884ba0fe783704483f0a75463497c7705fd083a4d0257990 + # via lance-namespace langcodes==3.5.1 \ --hash=sha256:40bff315e01b01d11c2ae3928dd4f5cbd74dd38f9bd912c12b9a3606c143f731 \ --hash=sha256:b6a9c25c603804e2d169165091d0cdb23934610524a21d226e4f463e8e958a72 @@ -4281,6 +4291,7 @@ numpy==2.5.3 \ # opencv-python # pandas # pandas-gbq + # pylance # qdrant-client # rapidocr # ray @@ -5181,6 +5192,7 @@ pyarrow==23.0.1 \ # milvus-lite # mlflow # pandas-gbq + # pylance # ray # snowflake-connector-python pyarrow-hotfix==0.7 \ @@ -5301,6 +5313,7 @@ pydantic[email]==2.13.5 \ # fastmcp-slim # great-expectations # kubernetes + # lance-namespace-urllib3-client # mcp # mlflow-skinny # mlflow-tracing @@ -5504,6 +5517,14 @@ pyjwt[crypto]==2.15.1 \ # msal # singlestoredb # snowflake-connector-python +pylance==13.0.0 \ + --hash=sha256:22a37a0af446964e79cfd6046f9ea2735fcb42f8020eab63947b2bdca04989c2 \ + --hash=sha256:22e47adcc2c7300ff876fb398ee9c625973932163ec055adae14871f8a09d7b0 \ + --hash=sha256:2c94649a35161c6100ed822ac022756bfefb840b7e01cf491505c5245186f7b4 \ + --hash=sha256:38cbe8d204785e697909e8faca91adb3b00a2f6a865c425987cb232d0865c010 \ + --hash=sha256:8a340dcf750171dd6386db0b6ed303bb22594e1c1b266b7fe149ea1684bf4a9a \ + --hash=sha256:a54496c4e6c01a8c3d49479fce98474c95a265515091d173aa9e16df271d837d + # via feast (pyproject.toml) pylatexenc==2.11 \ --hash=sha256:305a072a99ce736246049c9da05841b9d718c0f7ea8888f5f596cf15cb621053 \ --hash=sha256:e78e7391d6c104f1ed150e21cfaa58016cdb50aa54406a2eecb793649ffdfdd0 @@ -5976,6 +5997,7 @@ python-dateutil==2.9.0 \ # ibis-framework # jupyter-client # kubernetes + # lance-namespace-urllib3-client # matplotlib # moto # openlineage-python @@ -7839,6 +7861,7 @@ typing-extensions==4.16.0 \ # jupyter-client # jwcrypto # kubernetes + # lance-namespace-urllib3-client # mcp # minio # mlflow-skinny @@ -7912,6 +7935,7 @@ urllib3==2.8.0 \ # great-expectations # kube-authkit # kubernetes + # lance-namespace-urllib3-client # minio # qdrant-client # requests diff --git a/sdk/python/tests/unit/infra/data_sources/test_lance_dependencies.py b/sdk/python/tests/unit/infra/data_sources/test_lance_dependencies.py new file mode 100644 index 00000000000..d3f623d430d --- /dev/null +++ b/sdk/python/tests/unit/infra/data_sources/test_lance_dependencies.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +from pathlib import Path + +import toml # type: ignore[import-untyped] + + +def test_lance_extra_installs_native_reader_and_is_included_in_ci() -> None: + pyproject_path = Path(__file__).resolve().parents[6] / "pyproject.toml" + pyproject = toml.loads(pyproject_path.read_text()) + + extras = pyproject["project"]["optional-dependencies"] + + assert extras["lance"] == [ + "pylance>=12.0.0", + "lance-namespace>=0.11.1", + ] + assert "lance" in extras["ci"][0]