Author: way0utwest

  • Daily Coping 4 Apr 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to focus your attention on the good things you take for granted.

    My life is amazing, and I’ve said it before, I appreciate it more and more. I have nothing really to complain about. My body hurts at times. Things don’t always go my way, but in the grand scheme of life, my issues are tiny.

    There are things I sometimes take for granted, so I’m listing a few today.

    My hands – this was a tip recently, but an injury to my wrist reminded me of how much I use them and appreciate them. I am being a bit more careful lately in protecting them.

    My body – I’ve gotten used to going to yoga multiple times a week and weight lifting, among other things. In the last year, I’ve had a few instances where I struggled to do those things. I realize that I sometimes take my health and body for granted, and I should be grateful for what I can do.

    My job – I’ve seen more than a few people struggle with bad jobs, bad bosses, and financial insecurity because of their employment. I have an amazing company, boss, and I try to remember that.

    My wife – I appreciate her, I love her, and I value her company and counsel. At the same time, I can take our relationship for granted and not think about how lucky I am and how well our marriage has been for over 20 years. I am trying to stop and remind myself often that I am lucky. I know many people that don’t have that or haven’t found it yet.

    There’s more, but that’s a good list for today.

  • Executing Notebooks in a Stored Procedure

    Jupyter Notebooks are a popular way of consolidating a number of code batches together and them executing them as separate batches or all together. These are essentially a document with notes and code, all of which are stored together. Databricks can run these, as can a number of other services. They are also integrated into various tools, like Azure Data Studio.

    Just like many other technologies, we’d like to execute these in a way that suits our environment. While running these in a tool like ADS works fine, we might want to schedule these and check the results later. You can run notebooks with PowerShell, but keeping around results and managing the data is hard. Since many of us use SQL Server or Azure SQL Database, wouldn’t it be great if we could find a way to have these run inside SQL Server and keep the results around?

    I was poking around inside a database and discovered that I could do this. Only with notebooks that have T-SQL code, but that’s usually what we’d want to do inside a SQL Server (or Azure SQL) database. I need to write a more detailed article on this, but there are a few basics that might help some of you understand how this works. Essentially, there is an undocumented extended stored procedure, xp_notebookparse, that will read the JSON internals of a notebook and allow you to extract out there T-SQL batches. The @execute = 1 parameter will cause each of these batches to be executed.

    For results, a new notebook is created and added to a local temp file, #nbresults, as a BLOB value. You can explore the structure of this, but essentially, part of your stored procedure should take all the data from this table and add it to a permanent table in your database. If you use a stored procedure to wrap the extended stored procedure call and an INSERT..SELECT call together then you’ll actually get nothing to happen because today is April first. It’s April Fools and this is a joke. Hopefully, you aren’t too disappointed.

    Steve Jones

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

  • Daily Coping 1 Apr 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to choose to smile today at something you encounter.

    I tend to smile (and wave) at people. And horses. I’ll wave to the horses, which my wife thinks is silly.

    I smile at things I see, though, and often it’s something a kid does. Kids are amazing humans, and they view the world in fascinating ways.

    For me, I was smiling recently at SQL Bits, where I saw people hugging and shaking hands. It’s something I’ve missed at events, the closeness of friends. Most people asked others if it was OK, and for the most part it was.

  • The Summit is Back in Person

    Registration for the Data Community Summit opens today! You can sign up and come to Seattle in November with all the other data platform pros that you’ve missed seeing the last two years.

    The event will be hybrid, but I’m going in person. I’ve missed seeing many of you, and I am looking forward to the chance to wave, shake hands, hug, and interact over coffee and cocktails in person. I’ve gone to a few conferences this year and have a few more scheduled. Each one of them is a little more normal, which I hope is a trend that continues.

    If you aren’t comfortable coming in person, there is a still a hybrid option, with recordings of sessions for no-demand sessions available early. This will help with speaker Q&As, but there will also be a lot of sessions taking place live, with the ability to watch and ask questions, almost as if you were there. SQL Bits did a great job with hybrid, and I expect the Summit to be even better.

    Breakfast is Back

    Breakfast is back this year, which means you can wander into the convention center early, meet with friends, and make new contacts.

    One of the things I’ve enjoyed is wandering around the hall and looking for friends to chat with. Or stopping at a table and introducing myself. Or just picking a spot and seeing who might come up. With a few meals a day, this is a great chance to expand your network and learn just how diverse our community can be.

    Register Early

    As with many events, prices rise over time. Now is the time when you can convince the boss to pay the least by registering now. The discount today is enough to cover quite a bit of the travel expenses, and every bit can help. You have until May 25 to get this opening pricing.

    This is THE event for data professionals, especially those working with SQL Server, the Microsoft Data Platform, or using AWS. There are many blogs and posts across the years about the value, excitement, and knowledge gained at the event. Show a few to your boss and get registered today.

    Seattle is a wonderful city, and there is a lot to do. If you want to combine a fun vacation with the trip, I’ve had some good times there with my kids before and after the event. If you’ve never spent a couple days there, this might be the time to think about it.

    This is the homecoming for the data platform community and I hope that I see some of you there. If you see me, please stop my and say hi.