<?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 Lakeflow SDP Append Flow in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-append-flow/m-p/167686#M55756</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;I'm using&amp;nbsp; &lt;STRONG&gt;append_flow&lt;/STRONG&gt; to&amp;nbsp;ingest data into the target table. Before returning the dataframe, I compute few column trnasformations, but those values aren't being calculated correctly (or: aren't showing up at all)&lt;BR /&gt;so the append flow should not include any column transformations.Does it need to include only reading source table?&lt;/P&gt;</description>
    <pubDate>Sun, 06 Sep 2026 09:23:58 GMT</pubDate>
    <dc:creator>IM_01</dc:creator>
    <dc:date>2026-09-06T09:23:58Z</dc:date>
    <item>
      <title>Lakeflow SDP Append Flow</title>
      <link>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-append-flow/m-p/167686#M55756</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;I'm using&amp;nbsp; &lt;STRONG&gt;append_flow&lt;/STRONG&gt; to&amp;nbsp;ingest data into the target table. Before returning the dataframe, I compute few column trnasformations, but those values aren't being calculated correctly (or: aren't showing up at all)&lt;BR /&gt;so the append flow should not include any column transformations.Does it need to include only reading source table?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2026 09:23:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-append-flow/m-p/167686#M55756</guid>
      <dc:creator>IM_01</dc:creator>
      <dc:date>2026-09-06T09:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lakeflow SDP Append Flow</title>
      <link>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-append-flow/m-p/167691#M55759</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/193958"&gt;@IM_01&lt;/a&gt;,&lt;/P&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&lt;FONT color="#993300"&gt;append_flow&amp;nbsp;&lt;/FONT&gt;is&amp;nbsp;not&amp;nbsp;limited to just reading a source table. You can (and should) include column transformations, filters, and any other DataFrame operations inside the function decorated with&amp;nbsp;@dp.append_flow. The function simply needs to return a valid streaming DataFrame, and whatever transformations you apply to that DataFrame before returning it will be reflected in the data written to the target table.&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;Here's a quick example showing transformations inside an&amp;nbsp;append_flow:&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&lt;LI-CODE lang="python"&gt;from pyspark import pipelines as dp
from pyspark.sql.functions import col, upper, current_timestamp

dp.create_streaming_table("customers_silver")

@dp.append_flow(target="customers_silver")
def customers_flow():
    return (
        spark.readStream.table("customers_bronze")
        .withColumn("name_upper", upper(col("name")))
        .withColumn("ingested_at", current_timestamp())
        .select("id", "name_upper", "region", "ingested_at")
    )&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&lt;SPAN&gt;This is functionally identical to defining the transformations in a default flow wit&lt;/SPAN&gt;h@dp.table(). The&amp;nbsp;&amp;nbsp;confirms that the decorated function simply needs to return a streaming DataFrame from a "user-defined query". There's no restriction against transformations.&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&lt;SPAN&gt;Your transformations may not be showing up because of various reasons as listed below&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt;If you created&lt;/SPAN&gt; the streaming table with an explicit schema using create_streaming_table(name, schema=...), the target table's schema takes precedence. Columns returned by your flow that don't exist in the target schema are silently dropped, and columns in the target schema not returned by your flow come through as&amp;nbsp;NULL. Make sure your transformed column names match the target table's schema exactly.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;A row that has already been appended to a streaming table will not be re-queried with later updates. If you added or changed your transformations&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;after&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;data was already ingested, the existing rows won't reflect the new logic...&amp;nbsp; only newly arriving rows will. You would need to trigger a&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;to reprocess all historical data with the updated transformations.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;If you are using the SQL inter&lt;/SPAN&gt;face (CREATE FLOW ... INSERT INTO target BY NAME), columns are matched by name, not position. Any column in your SELECT that doesn't have a matching name in the target table is ignored.&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="du-bois-light-typography css-zj8sjw" data-genai-markdown-block="true"&gt;Rather than stripping transformations out of your&amp;nbsp;append_flow, keep them there... that's the intended pattern. To troubleshoot, try:&lt;/DIV&gt;
&lt;OL class="css-0"&gt;
&lt;LI&gt;Check whether your target table was created with an explicit schema, and verify the column names and types match what your flow returns.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;If you recently changed your transformation logic, run a full refresh to reprocess existing data.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Add a temporary&amp;nbsp;display()&amp;nbsp;or logging step in your notebook (outside the pipeline) to inspect the DataFrame your flow function returns, confirming the transformations produce the expected output before the data reaches the target.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2026 11:25:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-append-flow/m-p/167691#M55759</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-09-06T11:25:22Z</dc:date>
    </item>
  </channel>
</rss>

