Author: way0utwest

  • A New Word: Amoransia

    amoransia – n. the melodramatic thrill of unrequited love; the longing to pine for someone you can never have, wallowing in devotion to some impossible person who could give your life meaning by their very absence.

    Another young person’s word (in general), having amoranssia after watching some sort of media or seeing a picture, reading a story, and imaging how different your life would be with someone famous in it.

    There was a point in the very early 90s, just after uni, when I found out Janet Jackson was single, and I was living in Southern CA. I thought what would happen if I happened to bump into her, start a conversation, and maybe a romance. It was a fleeting few days where I could have thought of possibilities, though certainly no amoransia as I wasn’t wallowing at all.

    Just fantasizing.

    From the Dictionary of Obscure Sorrows

  • The Data API Builder Start and Add Extensions in VS Code

    One of the things that I like about the Data API Builder (DAB) is that there is a lot of CLI work that can be done. However, lots of people don’t like these, so I’m glad there’s a series of extensions in the Visual Studio Code (VSCode) marketplace that you can use.

    This post looks at the start and add extensions. Another post will look at the others.

    Update: All these are now in one extension.

    This is part of a series of posts on DAB that I’ve written. I also have articles at SQL Server Central about DAB.

    Installing the Extensions

    In VSCode, you can search for DAB in the extensions blade. You should see these, but there could be more by the time you read this.

    2024-12_0249

    I clicked install on these and they were added to my VS Code. Now let’s play with them. Each of them adds a right click menu item to the dab-config.json file.

    DAB Start

    The first one I tried was start. Since I had a valid dab-config.json in my file list, I could right click it. I see DAB Start as an option and select it.

    2024-12_0266

    This opens a new terminal. You need to be aware of this, as on the right side of your terminal, there is a new column and each terminal session is listed. The lower one is highlighted, opened by the DAB Start extension. You can see the output on the left, which is running.

    2024-12_0267

    I could then interact with my APIs in the browser. When I wanted to stop this, I could CTRL+C in the left terminal section, as in any, but I’d still have this terminal extension. The next time I clicked DAB Start, another new session would start.

    Instead, I clicked the “Delete” trashcan next to the terminal on the left to stop this session and the DAB service.

    2024-12_0265

    DAB ADD

    The ADD extension lets you add entites as well. If I right click and select DAB Add, I get another menu of types.

    2024-12_0259

    Once I select one, I see a list of objects from the database that I can view. In this case, the connection used in my DAB config file only sees three tables, so I can choose one of these.

    2024-12_0260

    If I hit Enter, I get a message that this was added.

    2024-12_0261

    If I look in the JSON for the config, I see that this is indeed added. This is another entity in my list, with the graphql and REST endpoints enabled.

    2024-12_0262

    Summary

    This post looked at these simple extensions, which leverage VSCode to make working with the DAB easier. If you’re experimenting with DAB, try these extensions. I certainly find them easier ways to work with my config file than editing things directly or trying to copy/paste.

     

  • The AI Budget Assistant

    I saw this article about AI helping IT leaders plan their budgets, and I had visions of certain departments getting cut, especially data-related ones. My concern is that a lot of what a DBA does can be acting as insurance or supporting others and not necessarily doing things which are easily visible or that might show up in reports, praise in Slack/Teams, or in other places an AI might be prompted to look. If an IT leader has to decide what’s important for the AI to look at, is data included?

    Of course, it’s entirely possible the AI would look at all the performance problems and want to spend more budget on the data side. Fingers crossed for that interpretation.

    The idea of an AI looking at a large amount of current data in various spreadsheets, reports, goals, requirements, usage, and more to synthesize a budget makes sense. This is the type of thing many AI-type technologies do well, finding patterns and summarizing the data in a way that assists a human in producing a final report of where to spend money.

    Just like any report produced by a human, I would hope that someone reviews the results and verifies the analysis makes sense. However, in reality, I suspect a lot of human reports are passed along as-is, with only a cursory glance. The world of AI might make this worse as we can produce larger and more detailed reports.

    The funny thing might be that whoever has to approve the budget might let their GenAI model summarize the budget for accuracy. In that case, do we need humans involved? I can see some managers trying to reduce the staff that might have internal knowledge and replacing them with GenAIs. Will we just have AIs producing things other AIs read and summarize?

    Most of us know that garbage in/garbage out is a constant problem in the world of data and reports. Judging data quality and ensuring the accurate (and complete) data is fed into any system is something that humans need to be a part of. An AI model might assist, but humans have context and knowledge that can be hard to craft into a prompt. After all, this might be the training data for your model, and I’m not sure general models will learn well without handholding from humans, especially in specialized areas like budgets.

    I’ve had to build budgets, and while I don’t think it’s hard, it’s time-consuming. There is a lot of drudgery, and I think an AI can help here. However, I’d want to audit and check the data and ensure that my helper is summarizing the data in a way that makes sense to me. Even then, what I’d most like to do is let the AI give me a few suggestions of future costs and let me fine-tune those before I present them to anyone else. After all, if we make large errors, I suspect I’ll feel the pain of failure more than my AI assistant.

    Steve Jones

    Listen to the podcast at Libsyn, Spotify, or iTunes.

    Note, podcasts are only available for a limited time online.

  • Another AI Faux Pax

    I was experimenting with a local model (article) and as a part of this, I pulled down a web interface for my model in a container. I ran it and had it in the background. I’ve randomly been asking questions as I need to look up things. I’m mostly curious how well it works.

    This week I asked about CDC and got and interesting response.

    This is part of a series of experiments with AI systems.

    Updating a CDC Schema

    I asked this question of my local mistral model: How do I alter a table in SQL SErver that is being tracked by CDC to add a new column?

    That might not be the best way to phrase things, but I was on a call with a customer who was going to enable CDC and wanted to discuss how to manage this with schema changes. I’m not a CDC expert, so I was checking some documentation while chatting and decided to put this query in.

    I got these results,

    2025-01_0153

    I thought I’d missed something, as I had never heard of sp_cdc_refresh_schema. Sure enough, I didn’t see it on MS Docs.

    2025-01_0155

    If I were trying to do this (pretend I’m a copy/paste DBA), I would see this:

    2025-01_0156

    So, the next step is to call the AI on this. It finds that it hallucinated and give me other ideas.

    2025-01_0158

    It gets worse. Now I create a proc and insert into the system tables, which isn’t recommended.

    2025-01_0160

    This won’t work either, but I can see people trying this.

    First, if you get advice from the Internet, please always, always use a sandbox to test (what I also recommended to the customer), and second, treat any AI response like it came from a teenager.