<?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: Issue with Publishing Data in the Lakehouse in Dataflow</title>
    <link>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170156#M3936</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="628920" data-lia-user-login="charlyS" class="lia-mention lia-mention-user"&gt;charlyS,&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried, but I didn't get this error. If there were such an error, then this wouldn't even get published.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2024 09:45:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-09-24T09:45:46Z</dc:date>
    <item>
      <title>Issue with Publishing Data in the Lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170003#M3934</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this message finds you well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some data and I have created a script in Power Query. The script runs without any errors and I can see the output in my view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to publish the data in the lakehouse, it's not getting published. Although I receive a pop-up message indicating that the data was published successfully, it remains in refresh mode and never completes the refresh process. I monitored the refresh time and had to cancel it after 1 hour and 30 minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please assist me with this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have included the script that I've written (without the source details for security reasons).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I look forward to your response and hope to find a solution to this matter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Step 2: Ensure the correct data types before sorting
    ChangeType = Table.TransformColumnTypes(FinalData, {
        {"SourceAddress", type text}, 
        {"DestinationAddress", type text}, 
        {"StartTime", type datetime}, 
        {"EndTime", type datetime}
    }),

    // Step 3: Sort data by Source Address, Destination Address, and Start Time
    SortedTable = Table.Sort(ChangeType, {{"SourceAddress", Order.Ascending}, {"DestinationAddress", Order.Ascending}, {"StartTime", Order.Ascending}}),

    // Step 4: Add an Index Column for row reference
    AddIndex = Table.AddIndexColumn(SortedTable, "Index", 1, 1, Int64.Type),

    // Step 5: Shift Source and Destination Addresses using List.Generate to efficiently calculate the "NextRow"
    ShiftedTable = Table.AddColumn(AddIndex, "NextRow", each try SortedTable{[Index]} otherwise null),

    // Step 6: Calculate Duration using conditional logic
    AddDurationColumn = Table.AddColumn(ShiftedTable, "Duration", each 
        if [SourceAddress] = [NextRow][SourceAddress] and [DestinationAddress] = [NextRow][DestinationAddress] then 
            Duration.From([NextRow][StartTime] - [EndTime]) 
        else 
            #duration(0, 0, 0, 0), 
        type duration
    ),

    // Step 7: Remove unnecessary columns (NextRow and Index) in one step
    CleanedTable = Table.RemoveColumns(AddDurationColumn, {"NextRow", "Index"}),

    // Step 8: Add Duration copy column and transform into total seconds
    AddDurationCopy = Table.AddColumn(CleanedTable, "Duration - Copy", each [Duration], type duration),
    AddTotalSeconds = Table.TransformColumns(AddDurationCopy, {{"Duration - Copy", Duration.TotalSeconds, type nullable number}}),

    // Step 9: Rename the original Duration column to "E1 - S2"
    RenamedColumns = Table.RenameColumns(AddTotalSeconds, {{"Duration", "E1 - S2"}})
in
    RenamedColumns&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 08:57:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170003#M3934</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-24T08:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Publishing Data in the Lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170053#M3935</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to reproduce, it seems that the last record generate an error retrieving the Duration Column, is there a possibility you didn't saw that ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 09:16:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170053#M3935</guid>
      <dc:creator>charlyS</dc:creator>
      <dc:date>2024-09-24T09:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Publishing Data in the Lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170156#M3936</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="628920" data-lia-user-login="charlyS" class="lia-mention lia-mention-user"&gt;charlyS,&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried, but I didn't get this error. If there were such an error, then this wouldn't even get published.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 09:45:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170156#M3936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-24T09:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Publishing Data in the Lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170159#M3937</link>
      <description>&lt;P&gt;Also, I have 40L + records, and in Power Query, I can see only 1000 Records.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 09:46:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170159#M3937</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-24T09:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Publishing Data in the Lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170168#M3938</link>
      <description>&lt;P&gt;Thanks ! Any chance you can provide an exemple as :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText(&lt;/SPAN&gt;&lt;SPAN&gt;"i45WCkktLlHSgVFGBkYmugaGQATnGIE4sTrRSiVAJUZAYRgNV4vgGIPVxgIA"&lt;/SPAN&gt;&lt;SPAN&gt;, BinaryEncoding.Base64), Compression.Deflate)), &lt;/SPAN&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; _t = ((&lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt; nullable &lt;/SPAN&gt;&lt;SPAN&gt;text&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;meta&lt;/SPAN&gt;&lt;SPAN&gt; [Serialized.Text = &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;]) &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;type&lt;/SPAN&gt; &lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt; [SourceAddress = _t, DestinationAddress = _t, StartTime = _t, EndTime = _t]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Step 2: Ensure the correct data types before sorting&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;To try to reproduce your error ?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Sep 2024 09:49:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4170168#M3938</guid>
      <dc:creator>charlyS</dc:creator>
      <dc:date>2024-09-24T09:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Publishing Data in the Lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4172332#M3945</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&amp;nbsp;charlyS&amp;nbsp;for your prompt reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although you mentioned that you didn't have the problem that charlyS&lt;SPAN&gt;&amp;nbsp;said you did, I suggest you check. Because in my test, I also encountered the same thing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This error first occurs in step 5:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; // Step 5: Shift Source and Destination Addresses using List.Generate to efficiently calculate the "NextRow"
    ShiftedTable = Table.AddColumn(AddIndex, "NextRow", each try SortedTable{[Index]} otherwise null),&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There should be no "null" here.&amp;nbsp;The result is the error that charlyS describes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend that you test with a small amount of data first.&amp;nbsp;And modify the step 5 as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table.AddColumn(AddIndex, "NextRow", each try SortedTable{[Index] - 1} otherwise null)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, in my tests, it was successfully published in lakehouse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 02:23:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Issue-with-Publishing-Data-in-the-Lakehouse/m-p/4172332#M3945</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-25T02:23:21Z</dc:date>
    </item>
  </channel>
</rss>

