This one was inspired by good Oracle community friend Kim when I was doing my normal ranting about poor quality test cases. Often on AskTom or StackOverflow or other such forums where people seek SQL assistance, they provide their test data as a plain dump of their data, for example:

image

That might be fine from a visual perspective but its hopeless in terms of anyone wanting to help, because ideally we want to load that test data into a table in our own database, so that we can tinker and explore solutions. After all, we are trying to help people here.

But, rather than jump down the posters throat with a “Help us to help you!” diatribe, there is now an option at our disposal – we’ll let an AI do the heavy lifting for us.

I threw the above into ChatGPt with a simple prompt:

image

and voila! An set of insert statements ready to go.

Perhaps one day AI will be driving our cars, walking our dogs, making our meals, writing our applications, but until then, I welcome its ability to save me 10 minutes of text editing!

6 responses to “Using AI for test data”

  1. Now that is a clever usage of AI.
    It may seem trivial to some, but far frome it.

    Next step, host test data somewhere, tell chagtp-4 where it is, and let it churn.

    I wonder what size limitations might be encountered?

  2. Hemant K Chitale Avatar
    Hemant K Chitale

    “Perhaps one day AI will be driving our cars, walking our dogs, making our meals, writing our applications”

    um….. Perhaps soon AI will be answering all asktom questions directly ?

    1. If you had seen some of the questions, and how they are phrased… I think we can safely say AI aint gonna handle them for a long time 🙂

  3. Be very careful as ChatGPT frequently gets the answer wrong.

    It is useful as a starting point in offering up a solution you may not have thought of (or for doing the bulk of the work for you), but never implement its solutions blindly.

    My findings are that it may not even compile, or if it does it simply doesn’t do what you requested. (It will return a solution to you very confidently saying “Here you go mate”, but treat it like an arrogant newbie with no track record & don’t trust it).

  4. Perhaps one day AI will be answering our questions on AskTom …LOL

  5. I really like the idea of driving cars and cooking meals 🙂

    But, as the next try, maybe ask it simply:
    ” Dear AI, please optimize the following SQL statement 🙂 ”

    So, as by what you say, AI will be able to handle the “well phrased” questions, and leave the other ones for the Asktom Team 😦 …

Got some thoughts? Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trending

Blog at WordPress.com.