<?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 How can I pass job parameters to a dbt task? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-can-i-pass-job-parameters-to-a-dbt-task/m-p/62375#M31956</link>
    <description>&lt;P&gt;I have a dbt task that will use dynamic parameters from the job: {"start_time": "{{job.start_time.[timestamp_ms]}}"}&lt;/P&gt;&lt;P&gt;My SQL is edited like this:&lt;BR /&gt;select 1 as id&lt;BR /&gt;union all&lt;BR /&gt;select null as id&lt;BR /&gt;union all&lt;BR /&gt;select {start_time} as id&lt;/P&gt;&lt;P&gt;This causes the task to fail. How can I pass the start_time parameter correctly?&lt;/P&gt;</description>
    <pubDate>Thu, 29 Feb 2024 16:43:25 GMT</pubDate>
    <dc:creator>jabori</dc:creator>
    <dc:date>2024-02-29T16:43:25Z</dc:date>
    <item>
      <title>How can I pass job parameters to a dbt task?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-pass-job-parameters-to-a-dbt-task/m-p/62375#M31956</link>
      <description>&lt;P&gt;I have a dbt task that will use dynamic parameters from the job: {"start_time": "{{job.start_time.[timestamp_ms]}}"}&lt;/P&gt;&lt;P&gt;My SQL is edited like this:&lt;BR /&gt;select 1 as id&lt;BR /&gt;union all&lt;BR /&gt;select null as id&lt;BR /&gt;union all&lt;BR /&gt;select {start_time} as id&lt;/P&gt;&lt;P&gt;This causes the task to fail. How can I pass the start_time parameter correctly?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 16:43:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-pass-job-parameters-to-a-dbt-task/m-p/62375#M31956</guid>
      <dc:creator>jabori</dc:creator>
      <dc:date>2024-02-29T16:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I pass job parameters to a dbt task?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-pass-job-parameters-to-a-dbt-task/m-p/105492#M42158</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/101302"&gt;@jabori&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you try using the var() function to see if it fix the issue?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;select 1 as id
union all
select null as id
union all
select {{ var('start_time') }} as id
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 13 Jan 2025 20:39:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-pass-job-parameters-to-a-dbt-task/m-p/105492#M42158</guid>
      <dc:creator>MathieuDB</dc:creator>
      <dc:date>2025-01-13T20:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I pass job parameters to a dbt task?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-pass-job-parameters-to-a-dbt-task/m-p/105493#M42159</link>
      <description>&lt;P&gt;Also, you need to pass the parameters using the --vars flag like that:&lt;/P&gt;
&lt;P&gt;dbt run --vars '{"start_time": "{{job.start_time.[timestamp_ms]}}"}'&lt;/P&gt;
&lt;P&gt;You will need to modify the 3rd dbt command in your job.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 20:41:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-pass-job-parameters-to-a-dbt-task/m-p/105493#M42159</guid>
      <dc:creator>MathieuDB</dc:creator>
      <dc:date>2025-01-13T20:41:08Z</dc:date>
    </item>
  </channel>
</rss>

