<?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: When using Delta Live Tables, how do I set a table to be incremental vs complete using Python? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/when-using-delta-live-tables-how-do-i-set-a-table-to-be/m-p/19019#M12694</link>
    <description>&lt;P&gt;The documentation at &lt;A href="https://docs.databricks.com/data-engineering/delta-live-tables/delta-live-tables-user-guide.html#mixing-complete-tables-and-incremental-tables" target="test_blank"&gt;https://docs.databricks.com/data-engineering/delta-live-tables/delta-live-tables-user-guide.html#mixing-complete-tables-and-incremental-tables&lt;/A&gt;  has an example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first two functions load data incrementally and the last one loads it fully &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@dlt.view
def incremental_bronze():
  return (
    # Since this is a streaming source, this table is incremental.
    spark.readStream.format("cloudFiles")
      .option("cloudFiles.format", "json")
      .load("s3://path/to/raw/data")
  )
&amp;nbsp;
@dlt.table
def incremental_silver():
  # Since we read the bronze table as a stream, this silver table is also
  # updated incrementally.
  return dlt.read_stream("incremental_bronze").where(...)
&amp;nbsp;
@dlt.table
def complete_gold():
  # This table will be recomputed completely by reading the whole silver table
  # when it is updated.
  return dlt.read("incremental_silver").groupBy("user_id").count()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jun 2021 22:00:20 GMT</pubDate>
    <dc:creator>sajith_appukutt</dc:creator>
    <dc:date>2021-06-25T22:00:20Z</dc:date>
    <item>
      <title>When using Delta Live Tables, how do I set a table to be incremental vs complete using Python?</title>
      <link>https://community.databricks.com/t5/data-engineering/when-using-delta-live-tables-how-do-i-set-a-table-to-be/m-p/19018#M12693</link>
      <description>&lt;P&gt;When using SQL, I can use the Create Live Table command and the Create Incremental Live Table command to set the run type I want the table to use. But I don't seem to have that same syntax for python. How can I set this table type while using Python?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 18:59:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/when-using-delta-live-tables-how-do-i-set-a-table-to-be/m-p/19018#M12693</guid>
      <dc:creator>User16826992666</dc:creator>
      <dc:date>2021-06-25T18:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: When using Delta Live Tables, how do I set a table to be incremental vs complete using Python?</title>
      <link>https://community.databricks.com/t5/data-engineering/when-using-delta-live-tables-how-do-i-set-a-table-to-be/m-p/19019#M12694</link>
      <description>&lt;P&gt;The documentation at &lt;A href="https://docs.databricks.com/data-engineering/delta-live-tables/delta-live-tables-user-guide.html#mixing-complete-tables-and-incremental-tables" target="test_blank"&gt;https://docs.databricks.com/data-engineering/delta-live-tables/delta-live-tables-user-guide.html#mixing-complete-tables-and-incremental-tables&lt;/A&gt;  has an example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first two functions load data incrementally and the last one loads it fully &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@dlt.view
def incremental_bronze():
  return (
    # Since this is a streaming source, this table is incremental.
    spark.readStream.format("cloudFiles")
      .option("cloudFiles.format", "json")
      .load("s3://path/to/raw/data")
  )
&amp;nbsp;
@dlt.table
def incremental_silver():
  # Since we read the bronze table as a stream, this silver table is also
  # updated incrementally.
  return dlt.read_stream("incremental_bronze").where(...)
&amp;nbsp;
@dlt.table
def complete_gold():
  # This table will be recomputed completely by reading the whole silver table
  # when it is updated.
  return dlt.read("incremental_silver").groupBy("user_id").count()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 22:00:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/when-using-delta-live-tables-how-do-i-set-a-table-to-be/m-p/19019#M12694</guid>
      <dc:creator>sajith_appukutt</dc:creator>
      <dc:date>2021-06-25T22:00:20Z</dc:date>
    </item>
  </channel>
</rss>

