Forum Discussion

Mohan128256's avatar
Mohan128256
Helper IV
9 months ago
Solved

Data in SQL Updating but Not Reflecting in Report Visuals – Translytical Flow Issue id

Hi everyone,

I’m facing an issue where the backend SQL data is updating correctly in the Lakehouse, but the changes are not reflecting in the report visuals.

Here’s the setup I followed:

  1. Created a Dataflow Gen2 in Microsoft Fabric to automatically pull data from the SharePoint site:

  2. The Dataflow connects to the SharePoint Folder source, transforms the CSV file AI Pages Description list.csv, and loads it into the Lakehouse table.

I have followed all the steps as mentioned in microsoft translytical flow, here is my code i have clicked on update button it is showing updated when i run sql it is updating but in report not updated. I have given pagedescription as text slicer name, the setup is correct but report is not updating i have switched on the refresh also.


# ----------------------------
import fabric.functions as fn

udf = fn.UserDataFunctions()

@udf.connection(argName="sqlDB", alias="DemoSQLDBPOC")
@udf.function()
def update_report_description(sqlDB: fn.FabricSqlConnection,
                             reportName: str,
                           pageDisplayName: str,
                           pageDescription: str) -> str:

    conn = sqlDB.connect()
    cursor = conn.cursor()

    update_query = """
    UPDATE [dbo].[AI Keywords desc]
    SET pageDescription = ?
    WHERE reportName = ? AND pageDisplayName = ?
    """
    cursor.execute(update_query, (pageDescription.strip(), reportName.strip(), pageDisplayName.strip()))

    if cursor.rowcount == 0:
        message = f" No matching report found for ReportName='{reportName}' and PageName='{pageDisplayName}'."
    else:
        message = f" ReportDescription updated for ReportName='{reportName}', PageName='{pageDisplayName}'."

    conn.commit()
    cursor.close()
    conn.close()

    return message


 

 

 

13 Replies

  • Hi Mohan128256 

     

    According to your description, the backend data has been updated, so you need to refresh the PowerBI report to synchronize the data, or use DirectQuery mode and turn on the automatic page refresh function.

     

     

    Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

     

    Thank you~

  • Hi Mohan128256

     

    How is your report connected to the Lakehouse? Are you using Import mode, DIrectQuery, or DirectLake? 

     

    If you're using import mode, then you will also need to refresh the semantic model. You can do this manually, schedule it, or add a semantic model refresh activity to a pipeline. 

     

    A common pattern here is using a pipeline to run your dataflow, and then once the dataflow is completed, run the semantic model refresh. 

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

    • Mohan128256's avatar
      Mohan128256
      Helper IV

      Hi tayloramy  

      I am using direct query mode.

      I have connected using lakehouse, even if i do manual refresh its not updating

      • tayloramy's avatar
        tayloramy
        Super User

        Hi Mohan128256

         

        Are you getting any errors when refreshing manually? 

        Can you show us a screenshot of the refresh hostory for the model? 

        Can you also show us a screenshot of the data sources section in the model settings? 

         

        If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution. 

    • Mohan128256's avatar
      Mohan128256
      Helper IV

      Hi tayloramy 

      Dataflow Gen2 (Microsoft Fabric)

      Set up a Dataflow Gen2 in Microsoft Fabric to automatically pull data from the SharePoint site:

      The Dataflow connects to the SharePoint Folder source, transforms the CSV file, and loads it into the SQL table. (Here i have given destination as my SQL database(This sql database i have creaed in fabric)). I have checked the SQL database by running the table name i can see the data. 
      Then i have followed microsoft translytical  link

      I haven’t missed anything.I have implemented this before in the same report without issues. Now, I’m facing a problem with the lakehouse.

      I created a report catalog table using SQL, and it works fine; updates are happening correctly. However, in the current report, I’m seeing issues. Previously, when I implemented Report Catalog in the same report, it asked whether to use Direct or Import mode, and I used Direct Select.

      Now, after bringing the table into the Lakehouse, it’s not asking for Direct or Import — I just loaded it, and I implemented it via Translytical.

      So this is how i implemented.

  • Hi Mohan128256

     

    How are you connecting to the lakehouse, are you using the SQL endpoint? 

     

     Can you show us the connection settings? 

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

  • Hi Mohan128256,

     

    When connecting to the Lakehouse table, did you use the SQL endpoint connection string method, or did you do it from the OneLake Catalog?  

     

    You mentioned both SQL databases and Lakehouses, which are you using? Or are you using both? 

     

    After the dataflow runs, have you validated that data in the database or lakehouse is updated? 

     

    This will help us troubleshoot if the issue is with the dataflow, or if it's with the connection between the data and the semantic model. 

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.