<?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: How to capture dlt pipeline id / name using dynamic value reference in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/110489#M43592</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/127955"&gt;@mourakshit&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;I tried all the three methods you mentioned . None of them worked&lt;BR /&gt;&lt;BR /&gt;method_1 returne pipeline_name or pipelin_id as printed value : {{dlt_pipeline.name}} {{dlt_pipeline.id}} not the actual values&lt;BR /&gt;&lt;BR /&gt;methond_2 returned not conf like spark.databricks.pipeline.name exists&lt;BR /&gt;method_3 same error like method_1&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It would be really helpfull if you can show a demo example or screenshot by using any of the methods will be really helpful.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 14:18:22 GMT</pubDate>
    <dc:creator>ashraf1395</dc:creator>
    <dc:date>2025-02-18T14:18:22Z</dc:date>
    <item>
      <title>How to capture dlt pipeline id / name using dynamic value reference</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/109724#M43372</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have a usecase where I want to set the dlt pipeline id in the configuration parameters of that dlt pipeline.&lt;/P&gt;&lt;P&gt;The way we can use workspace ids or task id in notebook task task_id = {{task.id}}/ {{task.name}} and can save them as parameters and can call later as dbutils.widgets.get("task_id").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we do something similar in dlt pipeline.&lt;/P&gt;&lt;P&gt;like dlt_pipeline_id = {{dlt_pipeline.name}} in the configurations and then use it spark.conf.get("dlt_pipeline_id").&lt;/P&gt;&lt;P&gt;or is there any other way to achieve this&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 07:03:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/109724#M43372</guid>
      <dc:creator>ashraf1395</dc:creator>
      <dc:date>2025-02-11T07:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture dlt pipeline id / name using dynamic value reference</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/110080#M43483</link>
      <description>&lt;P&gt;Any ideas on this&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/34618"&gt;@VZLA&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/106294"&gt;@Alberto_Umana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 06:08:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/110080#M43483</guid>
      <dc:creator>ashraf1395</dc:creator>
      <dc:date>2025-02-13T06:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture dlt pipeline id / name using dynamic value reference</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/110146#M43497</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;The answer is yes, you can achieve this in a DLT (Delta Live Tables) pipeline. Here are a few ways to do it:&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;&lt;STRONG&gt;Method 1: Using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="du-bois-light-typography css-v80wf5"&gt;&lt;CODE&gt;{{dlt_pipeline.name}}&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the configuration&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;You can use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="du-bois-light-typography css-v80wf5"&gt;&lt;CODE&gt;{{dlt_pipeline.name}}&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;syntax in your DLT pipeline configuration, just like you would in a notebook task. This will replace the placeholder with the actual name of the DLT pipeline.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;In your DLT pipeline configuration, add a parameter like this:&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="css-1raywsy"&gt;
&lt;DIV class="css-lk6vs6"&gt;&lt;SPAN&gt;&lt;SPAN title="Example"&gt;Example&lt;/SPAN&gt;&lt;SPAN class="css-ka22ly"&gt;JSON :&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BUTTON class="du-bois-light-btn du-bois-light-btn-icon-only css-1kw049j" type="button" data-testid="read-only-code-block_copy-button" data-state="closed" data-component-id="read-only-code-block_copy-button" data-component-type="button"&gt;&lt;/BUTTON&gt;&lt;SPAN&gt;{ "name": "my_dlt_pipeline", "parameters": { "dlt_pipeline_id": "{{dlt_pipeline.name}}" } }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;Then, in your Spark code, you can access this parameter using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="du-bois-light-typography css-v80wf5"&gt;&lt;CODE&gt;spark.conf.get("dlt_pipeline_id")&lt;/CODE&gt;&lt;/SPAN&gt;.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;&lt;STRONG&gt;Method 2: Using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="du-bois-light-typography css-v80wf5"&gt;&lt;CODE&gt;spark.conf.set&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the DLT pipeline&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;Alternatively, you can use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="du-bois-light-typography css-v80wf5"&gt;&lt;CODE&gt;spark.conf.set&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method to set the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="du-bois-light-typography css-v80wf5"&gt;&lt;CODE&gt;dlt_pipeline_id&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;configuration parameter in your DLT pipeline.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;In your DLT pipeline code, add the following line:&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="css-1raywsy"&gt;
&lt;DIV class="css-lk6vs6"&gt;&lt;SPAN&gt;&lt;SPAN title="Example"&gt;Example&lt;/SPAN&gt;&lt;SPAN class="css-ka22ly"&gt;Python:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="css-1n0qty9" tabindex="0" role="tab" data-testid="read-only-code-block_code-container"&gt;
&lt;DIV class="css-zjik7"&gt;
&lt;DIV class=" databricks" data-testid="read-only-code-block_code" data-lang="python"&gt;spark.conf.set("dlt_pipeline_id", spark.conf.get("spark.databricks.pipeline.name"))&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;This sets the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="du-bois-light-typography css-v80wf5"&gt;&lt;CODE&gt;dlt_pipeline_id&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;configuration parameter to the name of the current DLT pipeline.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;&lt;STRONG&gt;Method 3: Using a widget&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;You can also use a widget to store the DLT pipeline ID and access it later.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;In your DLT pipeline configuration, add a widget like this:&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="css-1raywsy"&gt;
&lt;DIV class="css-lk6vs6"&gt;&lt;SPAN&gt;&lt;SPAN title="Example"&gt;Example&lt;/SPAN&gt;&lt;SPAN class="css-ka22ly"&gt;JSON:&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BUTTON class="du-bois-light-btn du-bois-light-btn-icon-only css-1kw049j" type="button" data-testid="read-only-code-block_copy-button" data-state="closed" data-component-id="read-only-code-block_copy-button" data-component-type="button"&gt;&lt;/BUTTON&gt;&lt;SPAN&gt;{ "name": "my_dlt_pipeline", "widgets": { "dlt_pipeline_id": { "type": "string", "value": "{{dlt_pipeline.name}}" } } }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="css-lk6vs6"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="css-lk6vs6"&gt;&lt;SPAN&gt;Then, in your Spark code, you can access the widget value using&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="du-bois-light-typography css-v80wf5"&gt;&lt;CODE&gt;dbutils.widgets.get("dlt_pipeline_id")&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-ooisui"&gt;All of these methods should work, but Method 1 is probably the most straightforward. Let me know if you have any further questions!&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Feb 2025 19:02:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/110146#M43497</guid>
      <dc:creator>mourakshit</dc:creator>
      <dc:date>2025-02-13T19:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture dlt pipeline id / name using dynamic value reference</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/110489#M43592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/127955"&gt;@mourakshit&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;I tried all the three methods you mentioned . None of them worked&lt;BR /&gt;&lt;BR /&gt;method_1 returne pipeline_name or pipelin_id as printed value : {{dlt_pipeline.name}} {{dlt_pipeline.id}} not the actual values&lt;BR /&gt;&lt;BR /&gt;methond_2 returned not conf like spark.databricks.pipeline.name exists&lt;BR /&gt;method_3 same error like method_1&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It would be really helpfull if you can show a demo example or screenshot by using any of the methods will be really helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 14:18:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/110489#M43592</guid>
      <dc:creator>ashraf1395</dc:creator>
      <dc:date>2025-02-18T14:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture dlt pipeline id / name using dynamic value reference</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/136471#M50572</link>
      <description>&lt;P&gt;Did someone was able to get pipeline_id programaticaly?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 21:16:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-capture-dlt-pipeline-id-name-using-dynamic-value/m-p/136471#M50572</guid>
      <dc:creator>CaptainJack</dc:creator>
      <dc:date>2025-10-28T21:16:10Z</dc:date>
    </item>
  </channel>
</rss>

