{"id":2916,"library":"databricks-feature-engineering","title":"Databricks Feature Engineering","description":"The `databricks-feature-engineering` library provides a Python client for interacting with Databricks Feature Engineering. It allows users to programmatically create, manage, and utilize feature tables within Databricks, streamlining the development and deployment of machine learning features. It integrates with Databricks Workflows and MLflow. The current version is 0.14.0, with frequent minor releases introducing new features, bug fixes, and occasional breaking changes due to its pre-1.0 status.","status":"active","version":"0.14.0","language":"en","source_language":"en","source_url":"https://github.com/databricks/databricks-feature-engineering-client-python","tags":["databricks","feature-engineering","ml","data-science"],"install":[{"cmd":"pip install databricks-feature-engineering","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core dependency for authentication and general Databricks API interactions.","package":"databricks-sdk","optional":false},{"reason":"Required for most feature table operations (creating, writing, reading dataframes). The client can initialize without it, but core functionality relies on a SparkSession.","package":"pyspark","optional":true}],"imports":[{"symbol":"FeatureEngineeringClient","correct":"from databricks.feature_engineering import FeatureEngineeringClient"}],"quickstart":{"code":"import os\nfrom databricks.feature_engineering import FeatureEngineeringClient\n\n# For local execution outside a Databricks notebook, ensure these\n# environment variables are set for authentication.\n# os.environ['DATABRICKS_HOST'] = os.environ.get('DATABRICKS_HOST', 'https://<your-databricks-instance>.cloud.databricks.com')\n# os.environ['DATABRICKS_TOKEN'] = os.environ.get('DATABRICKS_TOKEN', 'dapi...')\n\ntry:\n    # The client automatically picks up credentials from the Databricks environment\n    # or DATABRICKS_HOST/DATABRICKS_TOKEN environment variables.\n    fe_client = FeatureEngineeringClient()\n    print(f\"Successfully initialized Databricks Feature Engineering Client: {type(fe_client)}\")\n\n    print(\"\\nNote: Most Feature Engineering operations (like creating, writing, or reading tables)\")\n    print(\"require an active SparkSession, which is typically available in a Databricks notebook\")\n    print(\"or when using Databricks Connect (ensure it's configured locally).\")\n    print(\"\\nFor example, to create a feature table or write data, you would need a 'spark' object.\")\n\nexcept Exception as e:\n    print(f\"Failed to initialize Databricks Feature Engineering Client: {e}\")\n    print(\"Please ensure you are running in a Databricks environment or have 'DATABRICKS_HOST' and 'DATABRICKS_TOKEN' environment variables set.\")\n","lang":"python","description":"Initializes the `FeatureEngineeringClient`. This client automatically handles authentication if run within a Databricks environment or if `DATABRICKS_HOST` and `DATABRICKS_TOKEN` environment variables are set. While the client can initialize without `pyspark`, most feature table operations (like `create_feature_table` or `write_table`) require an active SparkSession."},"warnings":[{"fix":"Update calls to `write_table` to use the new parameter name: `databricks_online_table_client` instead of `online_store_client`.","message":"The `online_store_client` parameter in `fe_client.write_table()` was renamed to `databricks_online_table_client`.","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Migrate any usage of `DatabricksDbfsClient` to alternative methods for interacting with DBFS, typically using the `dbutils.fs` in Databricks notebooks or the `databricks-sdk`'s `DbfsAPI`.","message":"The `DatabricksDbfsClient` class was removed from the library.","severity":"breaking","affected_versions":">=0.11.0"},{"fix":"Remove the `online_store_client` argument from calls to `create_online_table` and `drop_online_table`. The online store client is now managed internally.","message":"The `online_store_client` argument was removed from `fe_client.create_online_table()` and `fe_client.drop_online_table()` methods.","severity":"breaking","affected_versions":">=0.14.0"},{"fix":"Ensure your code runs within a Databricks notebook/job or has Databricks Connect properly configured and initialized, providing access to an active `SparkSession`.","message":"While the `FeatureEngineeringClient` can be instantiated independently, most core functionalities like creating, writing, or reading feature tables fundamentally rely on a SparkSession. Attempting these operations without one will result in errors.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}