
I saw some news about Chat-GPT and MS offering o3 models. I created a ChatGPT Plus subscription as I did not want to spend time researching provisioning the MS version. I wanted to find out if this model can help me perfect my newest MS Fabric Notebook.
Have I told you that they started calling me the notebook man at work? Okay, it's not true but they could start any day.
Send a mail from with the formatted result of an SQL query via a data pipeline in Fabric
This is really a rabbit-hole trap as without the formatting part, it is very easy. You just create a lookup activity with your SQL query and connect an Outlook activity to it. The problem is that the result of the lookup activity is an array or object where column names and values are repeating row by row. I got good advice that I could use HTML code for formatting. Notebook for the rescue! You can pass the result of the lookup activity to a notebook and apply formatting, then send out the formatted table. It should be simple enough, even more so with the help of ChatGPT, right? Well, no—the short answer is no.
The main problem is that the model confuses Synapse with Fabric and recommends solutions that might work for Synapse. In a data pipeline besides coding you have to work with a graphical user interface.
Long story short, using ChatGPT actually just made the whole process much slower. I could have just rewatched the relevant materials from the Fabric Dojo and focused on interpreting the error messages. I played with this thing on a Saturday as I like to finish what I start.
There is one part in which it actually helped, which was the HTML formatting part. After a few trials and errors, it produced a working code that formats an input table into an HTML table. By the time I got the result below, it started warning me that I'll run out of tokens.
This lookup–Outlook activity combination can be used for checking the result of a query at a specific time, providing a snapshot which might be harder to produce if the source tables do not have update date columns. A use case could be if you are waiting for new data appearing in a source system, a new country, a new planning period and you want to check a report to see if the new data caused any issues; or if you wanted to be promptly notified if a specific data quality issue appears. None of these use cases are on an enterprise level but all of them are faster to implement than building something more robust.


I added the code for the Notebook to my GitHub repository. Please let me know if you have a better solution.