<?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 to get the last time ( previous ) databricks job run time? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26326#M18409</link>
    <description>&lt;P&gt;How to get the last databricks job run time? I have a requirement where i need to pass last job runtime as an argument in SQL and this SQL get the records from snowflake database based on this  timestamp. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2022 05:27:22 GMT</pubDate>
    <dc:creator>sgannavaram</dc:creator>
    <dc:date>2022-03-07T05:27:22Z</dc:date>
    <item>
      <title>How to get the last time ( previous ) databricks job run time?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26326#M18409</link>
      <description>&lt;P&gt;How to get the last databricks job run time? I have a requirement where i need to pass last job runtime as an argument in SQL and this SQL get the records from snowflake database based on this  timestamp. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 05:27:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26326#M18409</guid>
      <dc:creator>sgannavaram</dc:creator>
      <dc:date>2022-03-07T05:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the last time ( previous ) databricks job run time?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26327#M18410</link>
      <description>&lt;P&gt;You can get last job run time using Jobs API: &lt;A href="https://docs.databricks.com/dev-tools/api/latest/jobs.html#operation/JobsRunsList" target="test_blank"&gt;https://docs.databricks.com/dev-tools/api/latest/jobs.html#operation/JobsRunsList&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://&amp;lt;databricks-instance&amp;gt;/api/2.1/jobs/runs/list" target="test_blank"&gt;https://&amp;lt;databricks-instance&amp;gt;/api/2.1/jobs/runs/list&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://&amp;lt;databricks-instance&amp;gt;/api/2.1/jobs/runs/get" target="test_blank"&gt;https://&amp;lt;databricks-instance&amp;gt;/api/2.1/jobs/runs/get&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 10:39:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26327#M18410</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-03-07T10:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the last time ( previous ) databricks job run time?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26328#M18411</link>
      <description>&lt;P&gt;Thank you very much for your response Hubert.  How can we call these api in databricks code? it would be really help if you have any sample code. &lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 14:53:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26328#M18411</guid>
      <dc:creator>sgannavaram</dc:creator>
      <dc:date>2022-03-07T14:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the last time ( previous ) databricks job run time?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26329#M18412</link>
      <description>&lt;P&gt;@Srinivas Gannavaram​&amp;nbsp;: Sample python pseudocode for jobs API. Hope this helps you to build your Logic&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;import requests
import json
 
databricks_instance ="&amp;lt;databricks-instances&amp;gt;"
url_list = f"{databricks_instance}/api/2.1/jobs/runs/get?run_id=&amp;lt;Your Job RunID&amp;gt;"
 
headers = {
 'Authorization': 'Bearer &amp;lt;databricks-access-token&amp;gt;',
 'Content-Type': 'application/json'
}
 
response = requests.request("GET", url_list, headers=headers).json()
print(response)
print(response['job_id'])
print(response['start_time'])
print(response['end_time'])&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 03:21:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26329#M18412</guid>
      <dc:creator>RKNutalapati</dc:creator>
      <dc:date>2022-03-08T03:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the last time ( previous ) databricks job run time?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26330#M18413</link>
      <description>&lt;P&gt;Thank you so much. I will test it.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 04:05:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26330#M18413</guid>
      <dc:creator>sgannavaram</dc:creator>
      <dc:date>2022-03-08T04:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the last time ( previous ) databricks job run time?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26331#M18414</link>
      <description>&lt;P&gt;@Srinivas Gannavaram​&amp;nbsp;- Please let us know how it goes! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 21:20:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26331#M18414</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-08T21:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the last time ( previous ) databricks job run time?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26332#M18415</link>
      <description>&lt;P&gt;Hey there @Srinivas Gannavaram​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you are well. Just wanted to see if you were able to find an answer to your question and would you like to mark an answer as best? It would be really helpful for the other members.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 14:08:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-the-last-time-previous-databricks-job-run-time/m-p/26332#M18415</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-22T14:08:18Z</dc:date>
    </item>
  </channel>
</rss>

