<?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: using Spark SQL or particularly %SQL in a databricks notebook, is there a way to use pagination or offset or skip ? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/using-spark-sql-or-particularly-sql-in-a-databricks-notebook-is/m-p/21128#M14363</link>
    <description>&lt;P&gt;There is no offset support yet. Here are a few possible workarounds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you data is all in one partition ( rarely the case  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ) ,  you could create a column with monotonically_increasing_id and apply filter conditions.  if there are multiple partitions, monotonically_increasing_id won't be consecutive&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use except ( in your case sql equivalent of code below)  . This however would be an expensive operation&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;df1 = df.limit(10); 
df2 = df.except(df1); 
df2.limit(20);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 03:54:09 GMT</pubDate>
    <dc:creator>sajith_appukutt</dc:creator>
    <dc:date>2021-06-24T03:54:09Z</dc:date>
    <item>
      <title>using Spark SQL or particularly %SQL in a databricks notebook, is there a way to use pagination or offset or skip ?</title>
      <link>https://community.databricks.com/t5/data-engineering/using-spark-sql-or-particularly-sql-in-a-databricks-notebook-is/m-p/21126#M14361</link>
      <description>&lt;P&gt;using Spark SQL or particularly %SQL in a databricks notebook, is there a way to use pagination or offset or skip ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 21:49:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-spark-sql-or-particularly-sql-in-a-databricks-notebook-is/m-p/21126#M14361</guid>
      <dc:creator>User16783853501</dc:creator>
      <dc:date>2021-06-23T21:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: using Spark SQL or particularly %SQL in a databricks notebook, is there a way to use pagination or offset or skip ?</title>
      <link>https://community.databricks.com/t5/data-engineering/using-spark-sql-or-particularly-sql-in-a-databricks-notebook-is/m-p/21127#M14362</link>
      <description>&lt;P&gt;Can you clarify what are you looking for and what your use case is? Are you asking whether there's a preference for using Spark SQL or just direct SQL with %sql or something else?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 23:09:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-spark-sql-or-particularly-sql-in-a-databricks-notebook-is/m-p/21127#M14362</guid>
      <dc:creator>aladda</dc:creator>
      <dc:date>2021-06-23T23:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: using Spark SQL or particularly %SQL in a databricks notebook, is there a way to use pagination or offset or skip ?</title>
      <link>https://community.databricks.com/t5/data-engineering/using-spark-sql-or-particularly-sql-in-a-databricks-notebook-is/m-p/21128#M14363</link>
      <description>&lt;P&gt;There is no offset support yet. Here are a few possible workarounds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you data is all in one partition ( rarely the case  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ) ,  you could create a column with monotonically_increasing_id and apply filter conditions.  if there are multiple partitions, monotonically_increasing_id won't be consecutive&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use except ( in your case sql equivalent of code below)  . This however would be an expensive operation&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;df1 = df.limit(10); 
df2 = df.except(df1); 
df2.limit(20);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 03:54:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-spark-sql-or-particularly-sql-in-a-databricks-notebook-is/m-p/21128#M14363</guid>
      <dc:creator>sajith_appukutt</dc:creator>
      <dc:date>2021-06-24T03:54:09Z</dc:date>
    </item>
  </channel>
</rss>

