Tag: T-SQL Tuesday

  • T-SQL Tuesday #177–Keeping track of database code


    This month’s invitation is from Mala Mahadevan, who has hosted 5 times. This latest one is one that is near and dear to my heart as I use source control most days and I think it’s important for database code.

    I’ll explain why below, but I’m glad to see this as a topic. We have a wide variety of technical topics being proposed, but not a lot about software engineering as a discipline, which is part of what version control is. Not building features, but better managing your process.

    If you want to host a T-SQL Tuesday, ping me.

    Capturing Database Code

    There are many ways to capture code, but I work for Redgate Software, so I use Flyway. Since I work there, I get a paid version, but I work with customers all the time and see a variety of things. If I didn’t have Redgate tools, I’d likely use something like SQL Compare to capture off database code, since that’s easy. Or SMO through SSMS.

    As for how I work with code, I use Git to store the code. Git is ubiquitous and I rarely find customers without Git. Sometimes the data teams aren’t using it or don’t know how, but that’s why I’ve written some Git articles on getting started.

    I also try to work in branches, with a protected main branch. This means no one can commit code to main, but rather need to commit it elsewhere and use a PR (pull request) to move the code into main. I do this with a lot of customers, helping them understand how to use version control to manage their code.

    For my git work, I primarily work in GitHub in public repos. I’m at https://github.com/way0utwest, where I keep a lot of sample projects for things I work on with customers to demonstrate how to use Redgate tools, or just manage code better.

    There are lots of ways to capture code, format it, and deploy it. However, you should use git and learn to manage your code within a team. I’d also suggest you use Flyway to deploy the code. There is an OSS version, and because it supports many platforms, if your company adopts PostgreSQL or DataBricks, you can still use a similar process to deploy code. Learn it and use it.

    But first, get code into a Git repo.

  • T-SQL Tuesday #176: One piece of advice for Past Steve

    I almost missed this month, so this is also a good #SQLNewBlogger post. I thought about it for a few minutes as I ate breakfast at my desk and then knocked this out.

    This is the monthly T-SQL Tuesday blog party. I manage the site at tsqltuesday.com, trying to keep the party going. I have a lot of help from hosts each month running the topic, and I appreciate their efforts. Join in an write, and then host a month. Lots of people have done it.

    Past Advice

    I struggle with this, as I’ve had a great life. I  wouldn’t change anything, given where I am today, 33 years after my first data job. However, knowing I’m not changing my life in some time travel way, this is something I wish I’d have known about in my early 20s.

    Network and help others in the community.

    I’ve done this lightly in my first few jobs, but mostly within organizations. As I’ve grown and changed jobs, I’ve seen tremendous power in people getting together to talk, to get to know each other, to share problems and solutions, to present their knowledge and learnings with others.

    User groups were a core part of this, and out of them grew the PASS organization and Summit, the SQL Saturdays, and the amazing community we have. It’ s far different than other communities, and many of them see it as well. They wish their world was like the data platform world.

    The power of networking is amazing. The rich world that comes from community is something special.

    It’s still there today and it’s worth joining, no matter where you are in your career.

  • T-SQL Tuesday #174 – My Favorite Interview Question

    This month is a great topic to me. I think growing and improving your career is a skill that most of  us could improve, especially in our younger years. The invitation from Kevin Feasel is a good one from which you can learn a lot.

    I am looking forward to the responses from others.

    If you want to host an invite one month, ping me and request a date. Most of 2024 is full, but I have a few months, and I certainly am happy to schedule you into 2025. This is a great way to participate in the community, meet others, and challenge yourself. You just need a blog.

    In this post I’m going to give two questions, one as an interviewer and one as interviewee.

    My Favorite Interview Question for Candidates

    When I interview someone, I usually have a list of things to ask them to better help me compare candidates, but these are associated with digging into knowledge, however this question really helps me.

    What have you learned recently?

    I don’t expect candidates to know everything. I expect to have to teach them quite a bit about my environment. However, what I want from them is an effort to learn. My view is that some people are constantly learning things and others are content to rest on their previous knowledge/experience.

    If someone hasn’t learned anything recently, I don’t necessarily write them off, but I might probe about what they have been doing, as well as how they prepared for a new job or the interview. Perhaps they’ve been busy with something (crisis, illness, etc.) and haven’t been improving in the short term, but if someone hasn’t learned anything in the last year they’re proud of, or they can’t remember when they last invested in themselves, I have a hard time investing in them as an employee.

    Note, I will dig into ensure you learned something and aren’t just giving me an answer.

    My Favorite Question as an Interviewee

    In a lot of my jobs as a technologist, or a data professional, the job is the job. It’s very similar in many places. These days I do more architecture and advocacy, but if I were approaching a new job, I’d ask this:

    What are the expectations around working hours?

    I’d add context to this, but what I’m looking for are information for these items:

    • core working hours
    • on-call/non-core hours
    • punctuality

    I don’t mind working hard, but I don’t expect to work a lot of non-core hours every week, or even too regularly. I don’t mind 40 or even 50, but beyond that I’m not going to be happy.

    I’m also not someone that punches a clock. If you expect me to be online (or in an office) every day at 8am, you’re going to be disappointed. I might be there at 7:45 or 8:15. I don’t avoid work, and I do my best to be early for meetings, but if nothing is scheduled, I will vary my start time. I usually warn a potential boss about this.

    I used to ask about travel, but I’m over that. I don’t mind or worry about travel too much.

  • T-SQL Tuesday #173–The AI Job Helper

    tsqltuesdayThis month I had a new host, Pinal Dave. I was surprised to see he hadn’t hosted, but I didn’t see him in the list. His invite is interesting, as AI has been on his mind. I pinged him after listening to him on a webinar, and his invite reflects the topic: Has AI Helped with Your SQL Server Job?

    It seems that our topics stray a bit further from core SQL topics as the world becomes more complex, and honestly, as more and more of us do things beyond just managing a server.

    In any case, that’s the topic, and if you want to host, ping me.

    AI Assistance

    Has AI helped me? I don’t do a lot of SQL Server work, but I continue to learn about the platform and I do find myself writing code or helping customers find ways to build database software. I also started a short series on AI stuff as I experiment with tools and techniques.

    In general, I don’t find Copilot or ChatGPT (or other tools) that helpful with SQL Server. I think I haven’t spent enough time, but honestly, I struggle to create prompts and work with things. However, I know there is something. If you watch Pinal’s webinar, AI isn’t perfect, but it’s like a coworker making some suggestions of things you might not have thought of.

    Where I have found it useful is doing a question of an AI, often in Bing/Edge chat, and using that as a first search engine for what I want to look for rather than getting a list of results and clicking through them. In that sense, it’s saved some time.

    However, I know I still need to evaluate what comes back and make an informed decision if the suggestion or code will actually work.

    And of course, I need to test it.