Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Issue with Publishing Data in the Lakehouse

Hello team,   I hope this message finds you well.   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.   Howeve...
  • charlyS's avatar
    2 years ago

    Hello Anonymous,

     

    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 ? 

     

    Regards,

     

  • charlyS's avatar
    charlyS
    2 years ago

    Thanks ! Any chance you can provide an exemple as : 

     

    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkktLlHSgVFGBkYmugaGQATnGIE4sTrRSiVAJUZAYRgNV4vgGIPVxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [SourceAddress = _t, DestinationAddress = _t, StartTime = _t, EndTime = _t]),
      // Step 2: Ensure the correct data types before sorting
    ...
     
    To try to reproduce your error ? 
     
    Regards,
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous 

     

    Thank you very much charlyS for your prompt reply.

     

    Although you mentioned that you didn't have the problem that charlyS said you did, I suggest you check. Because in my test, I also encountered the same thing.

     

    This error first occurs in step 5:

     

     // 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),

     

    There should be no "null" here. The result is the error that charlyS describes.

     

     

     

    I recommend that you test with a small amount of data first. And modify the step 5 as:

     

    Table.AddColumn(AddIndex, "NextRow", each try SortedTable{[Index] - 1} otherwise null)

     

     

     

    Finally, in my tests, it was successfully published in lakehouse.

     

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.