<?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: Run Query from another notebook in streaming job in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/run-query-from-another-notebook-in-streaming-job/m-p/54915#M30197</link>
    <description>&lt;P&gt;Query Parameters means that you have to pass all parameters as a part of URL after question mark not in the body&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"/api/1.2/commands/status?clusterId=&lt;/SPAN&gt;&lt;SPAN class=""&gt;$cid&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;contextId=&lt;/SPAN&gt;&lt;SPAN class=""&gt;$ec_id&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;commandId=&lt;/SPAN&gt;&lt;SPAN class=""&gt;$command_id"&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 12:28:32 GMT</pubDate>
    <dc:creator>norbitek</dc:creator>
    <dc:date>2023-12-08T12:28:32Z</dc:date>
    <item>
      <title>Run Query from another notebook in streaming job</title>
      <link>https://community.databricks.com/t5/data-engineering/run-query-from-another-notebook-in-streaming-job/m-p/54102#M29987</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;We want to run query located in another notebook every streaming microbatch.&lt;BR /&gt;We were trying dbutils.run.notebook but we always get error&lt;/P&gt;&lt;PRE&gt;Context not valid. If you are calling this outside the main thread, you must set the Notebook context via dbutils.notebook.setContext(ctx), where ctx is a value retrieved from the main thread (and the same cell) via dbutils.notebook.getContext().&lt;/PRE&gt;&lt;P&gt;We tried to do what is mentioned in command, but it still doesn't seem to work.&lt;BR /&gt;We decided to test using old &lt;A href="https://docs.databricks.com/api/workspace/commandexecution/execute" target="_self"&gt;command execution API,&lt;/A&gt;&amp;nbsp;but I am not able to get the status of command using&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/api/1.2/commands/status as it always fails with error:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;'error_code': 'INVALID_PARAMETER_VALUE', 'message': 'Cluster id cannot be null', 'error': 'DatabricksServiceException: INVALID_PARAMETER_VALUE: Cluster id cannot be null'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however I am providing cluster id.&lt;BR /&gt;Maybe there are other options of running query from external notebook?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:34:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/run-query-from-another-notebook-in-streaming-job/m-p/54102#M29987</guid>
      <dc:creator>deng_dev</dc:creator>
      <dc:date>2023-11-28T13:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Run Query from another notebook in streaming job</title>
      <link>https://community.databricks.com/t5/data-engineering/run-query-from-another-notebook-in-streaming-job/m-p/54915#M30197</link>
      <description>&lt;P&gt;Query Parameters means that you have to pass all parameters as a part of URL after question mark not in the body&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"/api/1.2/commands/status?clusterId=&lt;/SPAN&gt;&lt;SPAN class=""&gt;$cid&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;contextId=&lt;/SPAN&gt;&lt;SPAN class=""&gt;$ec_id&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;commandId=&lt;/SPAN&gt;&lt;SPAN class=""&gt;$command_id"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 12:28:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/run-query-from-another-notebook-in-streaming-job/m-p/54915#M30197</guid>
      <dc:creator>norbitek</dc:creator>
      <dc:date>2023-12-08T12:28:32Z</dc:date>
    </item>
  </channel>
</rss>

