<?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: Notebook Kusto connection fails when run as action in pipeline in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4252018#M4724</link>
    <description>&lt;P&gt;Hi Jing, my region is Sweden. Pipeline, notebook and Kusto database are all within the same workspace in Fabric. I get this connection error message with both the trial and paid (F2 or F16) subscription. I also recreated the pipeline but that does make a difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Marc (Sperotech)&lt;/P&gt;</description>
    <pubDate>Tue, 22 Oct 2024 06:40:25 GMT</pubDate>
    <dc:creator>Sperotech</dc:creator>
    <dc:date>2024-10-22T06:40:25Z</dc:date>
    <item>
      <title>Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4246315#M4663</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a notebook that saves data to a Kusto database anfd just runs fine with the Run All command in the notebook pane. However as an action within a pipeline I get the error message:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Notebook execution failed at Notebook service with http status code - '200', please check the Run logs on Notebook, additional details - 'Error name - Py4JJavaError, Error value - An error occurred while calling z:mssparkutils.credentials.getToken.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;: java.io.IOException: 500 {"code":"TM_INTERNAL_ERROR","subCode":0,"message":"An internal error occurred.","timeStamp":"2024-10-16T12:33:50.8328415Z","httpStatusCode":500,"hresult":-2147467259,"details":[{"code":"RootActivityId","message":"a1e5ed04-3da7-43ec-a6ab-5c250757e571"}]}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Iin the notebook I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Kusto conncetion and database settings
from notebookutils import mssparkutils

# The Kusto cluster uri 
kustoUri = "https://****************.z2.kusto.fabric.microsoft.com"

# The access credentials for the write
accessToken = mssparkutils.credentials.getToken(kustoUri)

# The database to read the data from
database = "*******"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The notebook uses a Sandard Spark session&amp;nbsp;&lt;SPAN&gt;runtime 1.2 (Spark 3.4, Delta 2.4).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the stdout log I see the following suspicious in the trace:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;File ~/cluster-env/trident_env/lib/python3.10/site-packages/notebookutils/mssparkutils/credentials.py:8, in getToken(audience, name)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;7 def getToken(audience, name=''):&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;----&amp;gt; 8 return creds.getToken(audience, name)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Anyone knows hwat could be the cause of this?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Marc&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 09:37:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4246315#M4663</guid>
      <dc:creator>Sperotech</dc:creator>
      <dc:date>2024-10-17T09:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4246890#M4669</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="775320" data-lia-user-login="Sperotech" class="lia-mention lia-mention-user"&gt;Sperotech&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you check the owner of both the data pipeline and the notebook? I've run across a similar problem when the owner of the notebook was removed from the workspace. You could also check whether the owner of the pipeline and notebook has access to all required items for your run.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 15:54:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4246890#M4669</guid>
      <dc:creator>FabianSchut</dc:creator>
      <dc:date>2024-10-17T15:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4247202#M4673</link>
      <description>&lt;P&gt;There's another topic with a similar issue. Please check that topic and see if a solution will be provided:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Pipeline-Cant-Query-KQL-but-Manual-Notebook-Run-Can/m-p/4246335#M500" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Pipeline-Cant-Query-KQL-but-Manual-Notebook-Run-Can/m-p/4246335#M500&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 19:53:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4247202#M4673</guid>
      <dc:creator>FabianSchut</dc:creator>
      <dc:date>2024-10-17T19:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4250742#M4707</link>
      <description>&lt;P&gt;Hi&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/701977" target="_self"&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="701977" data-lia-user-login="FabianSchut" class="lia-mention lia-mention-user"&gt;FabianSchut&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Both pipeline and notebook have the same owner and are in the same workspace. B.t.w. this post is a duplicate of &lt;A href="https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4246890#M4669" target="_self"&gt;this post&lt;/A&gt;&amp;nbsp;(my posts were marked as spam, but that is now fixed) and similar to &lt;A href="https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Pipeline-Cant-Query-KQL-but-Manual-Notebook-Run-Can/m-p/4246335#M500" target="_self"&gt;this post&lt;/A&gt;&amp;nbsp;with a slightly wrong title because you can just run KQL fine as a pipeline action, but not within a notebook action.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 12:12:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4250742#M4707</guid>
      <dc:creator>Sperotech</dc:creator>
      <dc:date>2024-10-21T12:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4251899#M4721</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="775320" data-lia-user-login="Sperotech" class="lia-mention lia-mention-user"&gt;Sperotech&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the late response. I will have a test to check if I can reproduce it. May I know your Fabric data region and service version? Did you experience this failure before? Are you connecting to a free Kusto cluster or a paid one under an Azure subscription?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jing&lt;BR /&gt;Community Support Team&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 05:27:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4251899#M4721</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-22T05:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4252018#M4724</link>
      <description>&lt;P&gt;Hi Jing, my region is Sweden. Pipeline, notebook and Kusto database are all within the same workspace in Fabric. I get this connection error message with both the trial and paid (F2 or F16) subscription. I also recreated the pipeline but that does make a difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Marc (Sperotech)&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 06:40:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4252018#M4724</guid>
      <dc:creator>Sperotech</dc:creator>
      <dc:date>2024-10-22T06:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4252346#M4726</link>
      <description>&lt;P&gt;Thank you for these information. I got the same error message in my testing. I have reported this issue internally. It may take some time to receive a feedback. I will keep you updated on any progress. Thank you again.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 09:29:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4252346#M4726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-22T09:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4255586#M4758</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="775320" data-lia-user-login="Sperotech" class="lia-mention lia-mention-user"&gt;Sperotech&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try using 'kusto' instead of providing a cluster uri. This should work both when running the notebook by itself and in a pipeline.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;accessToken = mssparkutils.credentials.getToken('kusto') # enter 'kusto' instead of a specific cluster uri&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/microsoft-spark-utilities#get-token" target="_blank" rel="noopener"&gt;Microsoft Spark Utilities (MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My testing result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jing&lt;BR /&gt;&lt;EM&gt;If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos! &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 06:05:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4255586#M4758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-24T06:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4255908#M4773</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See &lt;A href="https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Pipeline-Cant-Query-KQL-but-Manual-Notebook-Run-Can/m-p/4255877#M522" target="_self"&gt;my post&lt;/A&gt; in this topic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 08:24:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4255908#M4773</guid>
      <dc:creator>Sperotech</dc:creator>
      <dc:date>2024-10-24T08:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook Kusto connection fails when run as action in pipeline</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4256000#M4775</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="775320" data-lia-user-login="Sperotech" class="lia-mention lia-mention-user"&gt;Sperotech&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess there might have been some update happening in the Fabric. The sample code in &lt;A href="https://learn.microsoft.com/en-us/fabric/real-time-intelligence/notebooks" target="_blank" rel="noopener"&gt;this article&lt;/A&gt;&amp;nbsp;in&amp;nbsp;&lt;A style="background-color: #ffffff;" href="https://learn.microsoft.com/en-us/fabric/real-time-intelligence/" target="_blank" rel="noopener"&gt;Real-Time Intelligence&lt;/A&gt;&amp;nbsp;documentation might need to be updated. Or there should be some documentations introducing the different behaviors of these codes between in notebook itself and in pipeline.&amp;nbsp;Otherwise, it would mislead users.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could provide your feedbacks about official documents through the Feedback feature on that article's page.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jing&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 08:53:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Kusto-connection-fails-when-run-as-action-in-pipeline/m-p/4256000#M4775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-24T08:53:53Z</dc:date>
    </item>
  </channel>
</rss>

