<?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 implement pagination for delta table without reading entire table in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/how-to-implement-pagination-for-delta-table-without-reading/m-p/63075#M8335</link>
    <description />
    <pubDate>Fri, 08 Mar 2024 15:36:41 GMT</pubDate>
    <dc:creator>BeenA_33</dc:creator>
    <dc:date>2024-03-08T15:36:41Z</dc:date>
    <item>
      <title>How to implement pagination for delta table without reading entire table</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-implement-pagination-for-delta-table-without-reading/m-p/63075#M8335</link>
      <description />
      <pubDate>Fri, 08 Mar 2024 15:36:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-implement-pagination-for-delta-table-without-reading/m-p/63075#M8335</guid>
      <dc:creator>BeenA_33</dc:creator>
      <dc:date>2024-03-08T15:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement pagination for delta table without reading entire table</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-implement-pagination-for-delta-table-without-reading/m-p/90553#M8337</link>
      <description>&lt;P&gt;You can leverage this code base. It works as expected using &lt;STRONG&gt;"next_page_token"&lt;/STRONG&gt; parameter-&lt;/P&gt;&lt;P&gt;Don't forget to mark this solution as correct if this helped you &lt;span class="lia-unicode-emoji" title=":upside_down_face:"&gt;🙃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import requests

token = 'your token'
url = 'your URL'

params = {'expand_tasks': 'true'}
header = {'Authorization': f'Bearer {token}'}

while True:

    response = requests.get(url, headers=header, params=params)
    response_data = response.json()
    jobs = response_data.get("jobs", [])

    for job in jobs:

        settings = job.get('settings')
        task = settings.get('tasks')

        if task and task[0].get('existing_cluster_id'):
            job_name = settings.get('name')
            job_creator = job.get('creator_user_name')
            print(f'job creator name= {job_creator} &amp;amp; job name= {job_name}')
        else:
            print(f"{settings.get('name')} not running on ACL")

    next_page_token = response_data.get('next_page_token')
    if not next_page_token:
        break  

    params['page_token'] = next_page_token&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 11:08:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-implement-pagination-for-delta-table-without-reading/m-p/90553#M8337</guid>
      <dc:creator>wise_owl</dc:creator>
      <dc:date>2024-09-16T11:08:42Z</dc:date>
    </item>
  </channel>
</rss>

