Tag: T-SQL Tuesday

  • T-SQL Tuesday #142–What is Bicep?

    It’s time for the monthly blog party, and this month the host is Frank Geisler. I was reaching out to various people last year to find hosts, and also (silly-ly) looking for first names to fill out the alphabet on the host page.

    Frank is a fellow MVP and a BI expert. He was gracious enough to agree to host and I thought he picked an interesting topic. This month’s invitation is about scripting to deploy resources. I don’t do a lot of deployments over and over, but I have been interested in one area. It’s actually been a tab in my browser open for a few weeks, so I took this opportunity to dig in.

    Bicep

    I’ve been seeing this term used in various blogs, and in the MVP email list we have. I wasn’t sure what it was, and I kept thinking of this:

    flexing-flex

    That’s not it at all, and I was glad I went through this resource.

    Bicep is a transpiler, meaning it takes one language and translates it into another. In this case, the Bicep language will move code into the ARM JSON templates. JSON is really for machines, not humans, so the idea is to give sysadmins and developers an easy way to describe resources they need to deploy into Azure.

    The language is new, and it’s on Github. This is a DSL (domain specific language), which means it was designed for a specific purpose. With the 0.3 release, the language is built into the Azure CLI and Azure PoSh utilities, so this will do the transpilation for you. There’s also a decompiler to go from an ARM template back to Bicep. It’s also supported by Microsoft, which is always a plus if you need to call for some issue.

    I don’t know a lot about Terraform, but this appears to be another language designed to do the same thing. The FAQ in GH notes this is a revision of ARM, which I guess makes sense. I’m guessing at some point they’ll try to get people to not use ARM (or stop supporting this) and only work with Bicep. Azure supports Terraform, so I’m guessing this is more an attempt to deprecate ARM and the challenges of customers working with JSON.

    A couple things I did like about this. First, there are modules, so you can reuse some code. There is also intellisense, validating and getting you actual resources from Azure that are available. I do worry about deprecation that makes it difficult to deploy a copy of an existing resource when Azure is trying to push you to use some new resource. However, I do think the intellisense and validation in the VS Code extension improve productivity for developers and sysadmins.

    Reuse also helps infrastructure teams assist developers by providing them modules that adhere to good or best practices.

    The language looks like a mix of Python and YAML. Not too hard to understand, and with help, this should be easy to use to create a resource.

    2021-09-14 10_23_36-Bicep language for deploying Azure resources - Azure Resource Manager _ Microsof

    I’m pressed for time today, so I’m not going to experiment or set up an environment, but I need to add this to a list of things to do.

    Why call it Bicep?  No idea. I can’t find an answer, but I did someone say these are “ARMless deployments”. Not sure that fits with Bicep, but I like the logo.

    2021-09-14 10_22_05-Bicep meet Azure Pipelines _ I CAN MAKE THIS WORK

  • T-SQL Tuesday #141–Finding a Balance

    tsqltuesdayThis is a great topic, and the host is a good friend, TJay Belt. We’ve met each other’s families and a lot of our conversations revolve around non-work stuff. I actually am friends on Facebook with TJay and follow his outdoor adventures on a weekly basis as he hikes, bikes, boats, and more.

    This month he asks us to write about Work/Life Balance, which is an important topic to me.

    Work From Home

    My first attempts to find balance started at the turn of the millennium. Actually in 1999, when I worked at a financial services company. We had instability in systems, to the point that I kept a pillow in my office as I spent more than a few nights there.

    After that I changed jobs a few times until I finally went to work for myself at SQLServerCentral. Since then, I’ve been at home for 18 years, including through this pandemic. A few things that I’ve learned in that time.

    Be Flexible

    The first time I was at home regularly was sharing an office with my wife, who had been telecommuting for a company for quite a few years. She was on the phone a lot, so I learned to keep headphones around, or be ready to grab my laptop and go work downstairs.

    I also learned that things come up at home. Maybe my wife was planning on getting kids and a meeting popped up, or vice versa. It was helpful to be flexible and ready to adapt.

    Set Some Rules

    When my wife started working from home, we had a 5yr old. He was pretty good with rules and learned to be quiet when the door was closed. A couple years later, our second was born, and that was a challenge. We had a nanny, and that was helpful, but we slowly had to  teach the 2nd (and 3rd) rules about noise and disturbances.

    On the plus side, we learned to be flexible and make time for kids. If they needed some attention and we weren’t busy, give it to them. Include them in breaks, walks, or head to school. I loved going to lunch with my kids when they were at school in 1st, 2nd, 3rd grade.

    Blending Chores

    One thing that helped me is that I blended work and life when at home. My boss or coworkers wouldn’t hesitate to ping me if they needed something at 6pm, or now, 7am, and that’s OK. However, I also know that doing laundry, or prepping something for dinner, or even cutting grass are things I might do as a break from work or while listening to a call.

    I mixed my life with work, taking advantage of the proximity. In an office, I might wander to the break room, or go talk to someone and do a little less work. Here, I try to get something done. I’ve taken an hour to change oil or put on winter tires in the middle of the day, and it sometimes lets me return to work refreshed.

    At the same time, if I have a bunch of chores, it’s much easier to go back to work after dinner for an hour if I need to get something done.

    Set Some Hours

    At first I tried to make a strict set of office hours and work from 8-4, like I was in office. That didn’t work for me. It felt like I was not taking advantage of being at home, around kids at times, and more.

    However, I also learned to get away. I am lucky in that I’ve often had a separate office, but I have had laptops or other devices around the house. I’ve learned not to check email or do work when I’m not working. If I use the computer to check something for life, I don’t spend time looking to see if I’ve missed something at work.

    Spoiler: I’ve always missed something and it’s almost always not that important.

    I do, however, make up time if I have had a bad week. When I struggle to work, it’s hard as a creative person. In an office, I’d listlessly sit at my desk and let time pass me by. Now I get up and go do something to help myself.

    I’ll then make up that time in the evening or on the weekend.

    Time Zones Suck

    I work for a UK company in Colorado. I’m GMT-7, which means I really have a few hours in the am when I can reach people in the UK and work together. I also get some people scheduling things at 7am, or even 6am, my time. Not often, but it happens. We have an office in CA, and I sometimes get messages around 6pm my time, just before someone there knocks off.

    I roll with this. My wife hasn’t been thrilled, but during the pandemic I’ve had a lot more 7am calls than ever before. A ton at 8am. I just deal with it because it’s not every day, and the flexibility is a trade off. I’ve done plenty of 9am yoga classes, taking an 8:00-8:50 call on the way and in the parking lot. They deal with it, so I can as well.

    Remember

    We work to live, not the other way around.

  • T-SQL Tuesday #139–A Hybrid World

    tsqltuesdayIt’s time for T-SQL Tuesday in June 2021, with a new host this time. Ben Wiessman (b | t), who graciously responded to my request to host, and to whom I want to congratulate on an addition to his family.

    In any case, for #139, Ben asks us about hybrid data. He’s a cloud advocate and someone that has been working with Big Data Clusters and Azure Arc. In fact, he’s written books on those topics(Azure Arc-Enabled Data Services Revealed and SQL Server Big Data Clusters), Bid , so I expected a topic related to those.

    Moving to Hybrid

    I haven’t dealt with hybrid in production at all. My work with SQLServerCentral, and much with Redgate and customers, is all either on-premises or in the cloud. All the SSC stuff runs as IaaS, and most of Redgate does. While we have a lot of local workstations and environments for dev, much of the infrastructure is in the cloud, without much hybrid stuff.

    I do see customers that developer locally and deploy in the cloud, which is something I’ve done, but not too often. Most want to do everything in one place. I don’t really consider IaaS as a “hybrid” despite it being in the cloud, because these are just VMs that could be anywhere, and there isn’t any real change if they live in Azure, AWS, or a remote data center my company owns.

    Experimenting in the Cloud

    The exception for me is Spawn. This is Redgate’s research project on hosted cloud databases that you might use for local development. I started working with this when it was early in the lifecycle, and now it’s something that I use regularly.

    Essentially you create a database, and it’s hosted in a container somewhere. You get a connection string back, but the database lives in a cloud service, and this is a hybrid environment.

    It’s an interesting idea, and while I haven’t made any large databases, I do find that the ability to programmatically start a database to be quite fascinating and simple. A few times when I’ve looked to update a demo project, the ease with which I can set up an environment on a new machine is fascinating.

    The team that manages our main demo made a number of changes in 2020. I had scheduled a talk on the platform and realized a week before that the old demo I had was broken. When I contacted them, they gave me these instructions.

    • Update the CLI tool
    • Update my repo from the “demo” branch of the repo
    • Open the folder in VS Code
    • Hit F5

    That’s it and I had a running environment right away. I did a talk on this at ConFoo 2021, and it went well. The ease of getting things running even impressed me, as I hadn’t dealt with the front end side of things as often. Amazing.

    To me, this is where the hybrid cloud gets interesting, when I easily access resources either locally or remotely.

  • T-SQL Tuesday #138–Technology Changes

    tsqltuesdayThis month the topic for T-SQL Tuesday comes from Andy Leonard, whom I reached out to be a host. I was running low on hosts last year, and Andy agreed to help me out. I had expected something on ETL, but I was surprised with this one.

    Andy asks us about managing technology change. He does mention how SSIS changed as he was writing a book, meaning that things he’d learned while a project was underway no longer applied. That’s a scary place to be, and it’s one I’ve rarely experienced.

    Avoiding Shifts

    One reason I don’t like to test beta software, especially from Microsoft, is that the APIs, the functionality, the effects can change. I prefer to have something fairly well settled before I spend time on it.

    I took a chance early on with Windows 7, when they had the “skydrive”, which become OneDrive. I could sync files from my desktop to laptop, and for someone that travels a lot, this was fantastic. It worked through the beta and until a few years later. At some point it stopped and I moved to Dropbox. I still use DropBox, even though this was reborn as OneDrive and enhanced to allow me to have  personal and business “OneDrive” running at the same time.

    Moving on from Immature Software

    I don’t like to abandon software, and sometimes I can’t. For me, I’ve been involved with some of the products that Redgate Software has built. I often see things early and test them to give feedback to developers. This means I sometimes see things before they work well, or even before the development teams might know what they want to build.

    This has happened a few times, but a couple years ago we were evolving one of our products to expand capabilities for customers. I thought we were moving in a good direction and spend quite a bit of time evaluating how the software worked. I was even starting to incorporate this into some automation pipelines and build demos, when the product direction shifted.

    A fair amount of code I’d written had to be abandoned. I felt as though I’d wasted some time, but as I stopped to think, I realized that I’d been learning and growing in this area. I’d understood how things worked, and while I had to write new code, I was able to write it quicker because I understand the general problem space already. Even though I had to expend other effort, I’m not sure my early work was wasted.

    Fortunately, I didn’t have deadlines for a deliverable. If I did, I might have been more upset. If it happened in the future, while needing to work more to get things done might annoy me, I’d likely understand that the growth and knowledge mean I don’t have to double my investment, and likely I’d be better positioned to write better code the second time around.