<?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 'dbutils.jobs.taskValues.get' taking debug value in workflow, instead of actual value being set in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/dbutils-jobs-taskvalues-get-taking-debug-value-in-workflow/m-p/106793#M42588</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to pass and set values from one wheel into another wheel in databricks workflow.&lt;/P&gt;&lt;P&gt;I have used&amp;nbsp;'dbutils.jobs.taskValues.get' and&amp;nbsp;'dbutils.jobs.taskValues.set'&lt;/P&gt;&lt;P&gt;I have used 'dbutils.jobs.taskValues.get' in second task and made sure to keep dependency of task 1 wheel to complete before task 2 kicks in.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is as below :&lt;/P&gt;&lt;P&gt;while trying to get the task key , in workflow by default it is considering the debug value , instead of actual value.&lt;/P&gt;&lt;P&gt;value = 'dbutils.jobs.taskValues.get'&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;taskKey&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"BatchProcessing"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;key&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;SPAN&gt;"batch_result"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;default&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;None&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;debugValue&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"samplee"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;could anyone help in fixing the issue.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 23 Jan 2025 11:19:37 GMT</pubDate>
    <dc:creator>KalyaniJaya</dc:creator>
    <dc:date>2025-01-23T11:19:37Z</dc:date>
    <item>
      <title>'dbutils.jobs.taskValues.get' taking debug value in workflow, instead of actual value being set</title>
      <link>https://community.databricks.com/t5/data-engineering/dbutils-jobs-taskvalues-get-taking-debug-value-in-workflow/m-p/106793#M42588</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to pass and set values from one wheel into another wheel in databricks workflow.&lt;/P&gt;&lt;P&gt;I have used&amp;nbsp;'dbutils.jobs.taskValues.get' and&amp;nbsp;'dbutils.jobs.taskValues.set'&lt;/P&gt;&lt;P&gt;I have used 'dbutils.jobs.taskValues.get' in second task and made sure to keep dependency of task 1 wheel to complete before task 2 kicks in.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is as below :&lt;/P&gt;&lt;P&gt;while trying to get the task key , in workflow by default it is considering the debug value , instead of actual value.&lt;/P&gt;&lt;P&gt;value = 'dbutils.jobs.taskValues.get'&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;taskKey&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"BatchProcessing"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;key&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;SPAN&gt;"batch_result"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;default&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;None&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;debugValue&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"samplee"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;could anyone help in fixing the issue.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 Jan 2025 11:19:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbutils-jobs-taskvalues-get-taking-debug-value-in-workflow/m-p/106793#M42588</guid>
      <dc:creator>KalyaniJaya</dc:creator>
      <dc:date>2025-01-23T11:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: 'dbutils.jobs.taskValues.get' taking debug value in workflow, instead of actual value being set</title>
      <link>https://community.databricks.com/t5/data-engineering/dbutils-jobs-taskvalues-get-taking-debug-value-in-workflow/m-p/106798#M42592</link>
      <description>&lt;P class="p1"&gt;It seems like the issue you're encountering is related to the debugValue parameter being used instead of the actual value when calling dbutils.jobs.taskValues.get. This behavior is expected when the notebook is run outside of a job context, as the debugValue is returned in such cases&lt;/P&gt;
&lt;P class="p2"&gt;Please try this approach:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;Task 1: Setting the value&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;dbutils.jobs.taskValues.set(key="batch_result", value="actual_value")&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;Task 2: Getting the value&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;value = dbutils.jobs.taskValues.get(taskKey="BatchProcessing", key="batch_result", default=None)&lt;/P&gt;
&lt;P class="p1"&gt;print(value)&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;# This should print "actual_value" if running within a job context&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 12:42:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbutils-jobs-taskvalues-get-taking-debug-value-in-workflow/m-p/106798#M42592</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2025-01-23T12:42:58Z</dc:date>
    </item>
  </channel>
</rss>

