<?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 Re: FeatureEngineeringClient workspace id error in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116232#M4035</link>
    <description>&lt;P&gt;I just checked client._catalog_client._local_workspace_id in a Databricks notebook, and it’s actually not equal to https://&amp;lt;workspace-id&amp;gt;.cloud.databricks.com.&lt;/P&gt;&lt;P&gt;I used the value retrieved from the Databricks notebook in my local notebook with your code, and it worked perfectly. Thanks a lot for your help!&lt;/P&gt;</description>
    <pubDate>Tue, 22 Apr 2025 18:50:31 GMT</pubDate>
    <dc:creator>Kabi</dc:creator>
    <dc:date>2025-04-22T18:50:31Z</dc:date>
    <item>
      <title>FeatureEngineeringClient workspace id error</title>
      <link>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/115658#M4021</link>
      <description>&lt;P&gt;Hi, I am working from local notebook using vscode databricks extension.&lt;/P&gt;&lt;P&gt;I am trying to use&amp;nbsp;&lt;SPAN&gt;FeatureEngineeringClient, when I create data set&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    training_set = fe.create_training_set(
        df=filtered_data_train,
        feature_lookups=payments_feature_lookups,
        label="churn",
        exclude_columns=exclude_columns,
    )&lt;/LI-CODE&gt;&lt;P&gt;I receive error&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;	"name": "TypeError",
	"message": "'NoneType' object cannot be interpreted as an integer",&lt;/LI-CODE&gt;&lt;P&gt;but looking at logs I see error related with&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;File ~/projects/databricks_hwm_churn/.venv/lib/python3.12/site-packages/databricks/ml_features_common/entities/feature_spec.py:243, in FeatureSpec.to_proto(self)
    241     proto_feature_spec.input_functions.append(function_info.to_proto())
    242 proto_feature_spec.serialization_version = self.serialization_version
--&amp;gt; 243 proto_feature_spec.workspace_id = self.workspace_id
    244 proto_feature_spec.feature_store_client_version = (
    245     self._feature_store_client_version
    246 )
    247 return proto_feature_spec&lt;/LI-CODE&gt;&lt;P&gt;Could someone explain how can I fix problem with&amp;nbsp;self.workspace_id working from local notebook?&lt;/P&gt;&lt;P&gt;Same code is working if I run it from databricks browser notebook.&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 14:26:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/115658#M4021</guid>
      <dc:creator>Kabi</dc:creator>
      <dc:date>2025-04-16T14:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureEngineeringClient workspace id error</title>
      <link>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116085#M4032</link>
      <description>&lt;DIV class="paragraph"&gt;The error you're encountering, &lt;CODE&gt;TypeError: 'NoneType' object cannot be interpreted as an integer&lt;/CODE&gt;, arises because the &lt;CODE&gt;workspace_id&lt;/CODE&gt; is not properly set when running the &lt;CODE&gt;FeatureEngineeringClient&lt;/CODE&gt; in a local notebook using Visual Studio Code. This issue likely stems from the absence of a correctly initialized workspace context required by the Databricks Feature Engineering Client.&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;Here's how you can address this issue:&lt;/DIV&gt;
&lt;OL start="1"&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Set the Workspace ID Manually:&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;The &lt;CODE&gt;FeatureEngineeringClient&lt;/CODE&gt; expects the &lt;CODE&gt;workspace_id&lt;/CODE&gt; to be set. If the automatic fetch fails in the local environment, you can assign it manually. To do so, retrieve your workspace ID (available in your Databricks workspace URL, e.g., &lt;CODE&gt;https://&amp;lt;workspace-id&amp;gt;.cloud.databricks.com&lt;/CODE&gt;) and set it using code like this:&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-python"&gt;  from databricks.feature_engineering import FeatureEngineeringClient

  client = FeatureEngineeringClient()
  workspace_id = "&amp;lt;your_workspace_id&amp;gt;"  # Replace with your actual workspace ID
  client._catalog_client._local_workspace_id = workspace_id
  client._catalog_client._feature_store_workspace_id = workspace_id
  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="paragraph"&gt;This method has been used successfully by others encountering similar issues.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Ensure Proper Environment Configuration:&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;Verify that the required environment variables or Spark configurations are set up properly. Common variables to check in your local setup include:
&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;WORKSPACE_ID&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;_DATABRICKS_WORKSPACE_HOST&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;_DATABRICKS_WORKSPACE_ID&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;In some cases, however, even setting these variables might not resolve the issue, as observed in similar scenarios.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Check Databricks Connect Integration:&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;If you are using the Databricks extension for Visual Studio Code, ensure that Databricks Connect is configured properly. This includes installing the necessary dependencies and configuring access credentials. Refer to the &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/vscode-ext/notebooks" target="_blank"&gt;Databricks Connect documentation&lt;/A&gt; for detailed steps.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 21 Apr 2025 14:38:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116085#M4032</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2025-04-21T14:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureEngineeringClient workspace id error</title>
      <link>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116225#M4034</link>
      <description>&lt;P class=""&gt;Hi, thank you for your response. However, I’m still stuck with the solution:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P class=""&gt;I tried manually setting the workspace_id, but I encountered the same error on the same line of code. The only difference is that now it says: 'str' object cannot be interpreted as an integer (I used string for&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;workspace_id variable)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Could you please share the link where you found all the variables that need to be configured for the extension?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;I read the &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/vscode-ext/notebooks" target="_blank" rel="nofollow noopener noreferrer"&gt;Databricks Connect documentation&lt;/A&gt;&amp;nbsp;&amp;nbsp;but I didn’t find any specific information about configuration, especially considering that other Databricks tools like Spark are working fine. I’m confused why only the feature engineering part is failing.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P class=""&gt;If you have any other ideas or suggestions on what I could check, I’d be happy to try them. Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 16:45:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116225#M4034</guid>
      <dc:creator>Kabi</dc:creator>
      <dc:date>2025-04-22T16:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureEngineeringClient workspace id error</title>
      <link>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116232#M4035</link>
      <description>&lt;P&gt;I just checked client._catalog_client._local_workspace_id in a Databricks notebook, and it’s actually not equal to https://&amp;lt;workspace-id&amp;gt;.cloud.databricks.com.&lt;/P&gt;&lt;P&gt;I used the value retrieved from the Databricks notebook in my local notebook with your code, and it worked perfectly. Thanks a lot for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 18:50:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116232#M4035</guid>
      <dc:creator>Kabi</dc:creator>
      <dc:date>2025-04-22T18:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureEngineeringClient workspace id error</title>
      <link>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116236#M4036</link>
      <description>&lt;P class="p1"&gt;I’ve done some additional research and found that the &lt;SPAN class="s2"&gt;FeatureStoreClient&lt;/SPAN&gt; is not officially supported when accessing a managed Databricks environment from an external IDE, even when using Databricks Connect. The client library is designed to operate within the Databricks Runtime and does not currently support direct access to feature tables from external environments.&lt;/P&gt;
&lt;P class="p1"&gt;That said, this limitation may change in the near future. I hope this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 18:54:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/featureengineeringclient-workspace-id-error/m-p/116236#M4036</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2025-04-22T18:54:13Z</dc:date>
    </item>
  </channel>
</rss>

