<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic FeatureEngineeringClient.write_table fails with 403 Invalid access in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/featureengineeringclient-write-table-fails-with-403-invalid/m-p/178382#M4780</link>
    <description>&lt;DIV&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt; DBR 16.4 (job cluster, single user), databricks-feature-engineering unpinned from PyPI (also checked 0.14.0 and 0.18.4), MLflow bundled with the DBR.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Symptom:&lt;/STRONG&gt; A continuous Structured Streaming job calls FeatureEngineeringClient.write_table(mode="merge") per micro-batch inside foreachBatch. About every 30-32 days (observed twice: ~31.9d and ~32.6d of run time) the write fails with 403 Invalid access token on GET /api/2.1/unity-catalog/tables/.... Spark-native reads and writes to the same UC tables in the same process keep working. Rebuilding FeatureEngineeringClient does not help.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;What we found reading the source (not tested on a cluster):&lt;/STRONG&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;write_table calls UC get_table over REST (_databricks_client.get_uc_table), with credentials from mlflow.utils.databricks_utils.get_databricks_host_creds(), resolved on every request.&lt;/LI&gt;&lt;LI&gt;On Databricks, that provider returns the REPL command-context apiToken first. getNonUcApiToken is only tried if that is empty, and refreshableTokenNotFound is logged on the fallback. As far as we can tell the command-context token isn't refreshed for the life of a long-lived process.&lt;/LI&gt;&lt;LI&gt;FE's REST helper only sends Authorization from host_creds.token or username/password. With DATABRICKS_CLIENT_ID/SECRET env vars (OAuth M2M), MLflow's env provider matches first with token=None, so the FE call appears to go out with no Authorization header.&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;What is the lifetime of the REPL command-context token, and is the ~30d expiry expected? Is there a supported way to make FE use a refreshable credential (OAuth M2M or the Databricks SDK default chain) for these REST calls?&lt;/LI&gt;&lt;LI&gt;Does write_table officially support being called from foreachBatch in a continuous stream? If not, what is the supported pattern for streaming writes to a UC feature table?&lt;/LI&gt;&lt;LI&gt;We're replacing write_table in the streaming path with a native Delta MERGE. write_table does schema evolution for us (new feature columns are added to the table on write). Is there a public API (or documented behavior) for that evolution step that doesn't need the REST call, or is raw ALTER TABLE ... ADD COLUMNS plus feature metadata updates the supported route? What else does write_table do on the Delta table that we'd lose (producer registration, OPTIMIZE per call, lineage)?&lt;/LI&gt;&lt;LI&gt;Is this fixed in a specific DBR or databricks-feature-engineering version?&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Tue, 01 Dec 2026 19:48:35 GMT</pubDate>
    <dc:creator>luis-patino</dc:creator>
    <dc:date>2026-12-01T19:48:35Z</dc:date>
    <item>
      <title>FeatureEngineeringClient.write_table fails with 403 Invalid access</title>
      <link>https://community.databricks.com/t5/machine-learning/featureengineeringclient-write-table-fails-with-403-invalid/m-p/178382#M4780</link>
      <description>&lt;DIV&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt; DBR 16.4 (job cluster, single user), databricks-feature-engineering unpinned from PyPI (also checked 0.14.0 and 0.18.4), MLflow bundled with the DBR.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Symptom:&lt;/STRONG&gt; A continuous Structured Streaming job calls FeatureEngineeringClient.write_table(mode="merge") per micro-batch inside foreachBatch. About every 30-32 days (observed twice: ~31.9d and ~32.6d of run time) the write fails with 403 Invalid access token on GET /api/2.1/unity-catalog/tables/.... Spark-native reads and writes to the same UC tables in the same process keep working. Rebuilding FeatureEngineeringClient does not help.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;What we found reading the source (not tested on a cluster):&lt;/STRONG&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;write_table calls UC get_table over REST (_databricks_client.get_uc_table), with credentials from mlflow.utils.databricks_utils.get_databricks_host_creds(), resolved on every request.&lt;/LI&gt;&lt;LI&gt;On Databricks, that provider returns the REPL command-context apiToken first. getNonUcApiToken is only tried if that is empty, and refreshableTokenNotFound is logged on the fallback. As far as we can tell the command-context token isn't refreshed for the life of a long-lived process.&lt;/LI&gt;&lt;LI&gt;FE's REST helper only sends Authorization from host_creds.token or username/password. With DATABRICKS_CLIENT_ID/SECRET env vars (OAuth M2M), MLflow's env provider matches first with token=None, so the FE call appears to go out with no Authorization header.&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;What is the lifetime of the REPL command-context token, and is the ~30d expiry expected? Is there a supported way to make FE use a refreshable credential (OAuth M2M or the Databricks SDK default chain) for these REST calls?&lt;/LI&gt;&lt;LI&gt;Does write_table officially support being called from foreachBatch in a continuous stream? If not, what is the supported pattern for streaming writes to a UC feature table?&lt;/LI&gt;&lt;LI&gt;We're replacing write_table in the streaming path with a native Delta MERGE. write_table does schema evolution for us (new feature columns are added to the table on write). Is there a public API (or documented behavior) for that evolution step that doesn't need the REST call, or is raw ALTER TABLE ... ADD COLUMNS plus feature metadata updates the supported route? What else does write_table do on the Delta table that we'd lose (producer registration, OPTIMIZE per call, lineage)?&lt;/LI&gt;&lt;LI&gt;Is this fixed in a specific DBR or databricks-feature-engineering version?&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 01 Dec 2026 19:48:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/featureengineeringclient-write-table-fails-with-403-invalid/m-p/178382#M4780</guid>
      <dc:creator>luis-patino</dc:creator>
      <dc:date>2026-12-01T19:48:35Z</dc:date>
    </item>
  </channel>
</rss>

