Forum Discussion
Direct Query - Imported and refreshed but data source not updated
Hi Anonymous,
Die initial report was created in the PowerBI desktop app. It's a direct query report that only has three parameters, one for the server name, one for the database name, and one for the table name.
The idea was to use this report as the base report for different variations of the same report that I would like to generate via the API and use for our embedded implementation.
I attempted to clone the report by importing it into a new workspace and updating the source SQL table parameter. The newly generated report is reading the correct table, but the report metadata is not updated. The new tables' columns aren't added as fields on the report.
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about
According to this link, you can only update the report metadata via the PowerBI desktop app. As I am trying to automate the generation of these reports, this isn't a viable solution for me.
I ended up building a tabular object model in code and attaching it to a clone of the base report
Could you please confirm that it's only possible to update a direct query reports'' metadata via the PowerBI desktop app at this point?
Here's my code on Stackoverflow
https://stackoverflow.com/questions/68196810/power-bi-direct-query-report-import-c-sharp-rest-api