I have a log table in a SQL database that keeps only the latest 7 days. I want to store all the data in PBI model, so I can check further than 7 days.
I auto-generate a text file from a SQL table using the following command:
sqlcmd -U xxxxxxx -P xxxxxxxxx -S Server -d DBase-W -s ; -k -Q "SELECT * FROM Table" >> "C:\Log.txt"
When using the file as source I need to do some "tunning" to get the format correctly (promote headers, change date type, remove duplicates, filter out some rows, etc.) but as soon the file is updated using the command above, it seems to me you have to manually repeat all those steps again?
Does anybody can help me automating the data format (like a macro) so I can leave it unattended?
Thank you for your reply. I'm aware of the refresh button and I might not explained myself properly.
I want to be able to schedule (every 20 minutes) the data refresh and also apply the steps (data tuning, cleaning, etc) that I did in PBI Desktop, but without having to open it or request any "human interaction".
Using the "Schedule Refresh" I get the first part: refreshing the data. What I'm not certain is: Will the steps I made in the Query Editor be applied to the newest data too?