Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I'm trying to find a solution to add a comment at the end of each script generated by Power BI(script sent in Snowflake) with some details - like username, name of the report etc.
Does anyone know how I can achieve something like this ?
In SAP Business Objects we have the End SQL option (for those familiar with SAP BO)
Thank you!
Georgian
Hi @GeorgianL,
Have you had a chance to review the solution we shared by @rohit1991? If the issue persists, feel free to reply so we can help further.
Thank you.
Hi @GeorgianL,
Currently, Power BI does not support this functionality. Unlike SAP BO’s End SQL, Power BI does not have an option to automatically add a comment or script to every query sent to the source.
If you would like a similar feature in Power BI, you can suggest it in the Fabric Ideas forum for the product team to review. If it receives enough support, Microsoft may consider adding it in the future.
Fabric Ideas - Microsoft Fabric Community
Thank you.
Hi @GeorgianL
Power BI can’t append an “end script” comment to the SQL it generates, so you can’t get a BO-style -- comment at the end of every query.
What you can do (and what most Snowflake shops use) is QUERY_TAG:
Set a tag for the session (e.g., ALTER SESSION SET QUERY_TAG='Report=Sales, Owner=Georgian';) so every query carries that metadata in Snowflake.
You can run that as an init/connection SQL or pass it via the connector’s advanced/connection settings (static or via a Power Query parameter).
Then read it in QUERY_HISTORY to see which report/user ran what.
If you truly need literal comments in the SQL text, that would require a custom connector/driver or proxy layer Power BI doesn’t expose a hook for modifying its generated SQL.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 18 | |
| 11 | |
| 10 | |
| 10 |