TL;DR: There's special behaviour if you use the each parameter name when defining an after handler, but the way this works and the way you should invoke it has changed. Adding custom logic to your CAP services is easy, and you can register event handlers with the before, on and a … | Continue reading
CAP affords developers a great design time experience, with minimal setup and fast turnaround times when building out your model and code. Often what I like to do is run an OData query operation to check both the data returned and any custom logic that I'm implementing. And I wan … | Continue reading
The March 2024 release of CAP brought many great new features including one for VS Code users - CDS Previews From Editor Title Bars. It allows you to look, in realtime, at how your CDS model translates into various other representations, including YAML and JSON formats of Core Sc … | Continue reading
Sometimes I want to run test CAP services not only locally, but in the cloud. I don't want the trappings of production (which are of course important ... in production settings) such as a production grade persistence mechanism or authorisation strategy & appropriate security laye … | Continue reading
I published a couple of short posts recently: Running non-production CAP services in CF Easily add an explicit cds.requires.db to your CAP project's package.json Both of them are related to going from zero to cloud, while still in design time, as quickly as possible. Partly to le … | Continue reading
In an experimental CAP project serving data in an in-memory SQLite persistence mechanism, seeded from CSV files (as per the classic starting point in CAP's Grow As You Go approach), I wanted to have the persistence layer requirements stated explicitly in the project's package.jso … | Continue reading
In the current back to basics series on CAP Node.js we're using VS Code with a dev container, based on the definition in the repo for the series. The container image is based on this one: FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} The long prompt It … | Continue reading
Starting the CAP server with cds watch is great for tight development loops at design time, especially with the built-in in-memory SQLite persistence layer, seeded by data in CSV files. When the server notices files have changed, it automatically restarts, which is great. But som … | Continue reading
In CAP, relationships between entities can be expressed with associations. In digging into how these are represented internally, I found jq yet again to be invaluable in parsing out info from the internal representation of the definitions. Here's what I did. In CAP, SAP's Cloud A … | Continue reading
A colleague asked me if I could add CORS support to a service I was running, built with the SAP Cloud Application Programming Model (CAP). CAP already has some basic support for CORS, so I dug in. Here's what I learned, about CORS headers, preflight requests, CAP custom servers a … | Continue reading
TL;DR - SAP Build Code is GA, and for a limited time (1 month, starting now) you can test drive the generative AI features of Joule in SAP Build Code. Introduction This week, SAP Build Code is GA: Generally Available. That's pretty exciting, given that one of the key features is … | Continue reading
I read a very interesting article DuckDB as the New jq today, plus an equally engaging conversation in the Lobsters thread about it. In the article the author Paul wants to summarise Go repos by licence, and uses SQL in DuckDB to do it. Very nice! He also mentions jq, and that he … | Continue reading
There's an NPM package that provides default content based on the ISO specifications for CAP common types for countries, languages, currencies and timezones. In this post I explore what that package is and how it works. The post is quite long, mostly because I fell down a rabbit … | Continue reading
This blog post demonstrates how powerful the combination of jq's to_entries and from_entries can be, and show how with_entries is a great extension of that. I pulled some stats from the YouTube Data API v3 for the episodes so far in our Back to basics: CAP Node.js Hands-on SAP De … | Continue reading
In the comments to episode 4 of our back to basics series of live stream episodes on CAP, on the Hands-on SAP Dev show, there was a question on my use of code in VS Code, which, when invoked in the terminal (e.g. code services.cds) opens the file directly in a VS Code editor wind … | Continue reading
I'm at Warsaw airport on my journey home after a great few days in Poland. My first flight is already delayed so I have a bit of time at the gate to write up some notes. I arrived in Wroclaw, in the west of Poland, on Sunday, and met up with my good friend, Developer Advocate col … | Continue reading
My narrowboat has outside space at both ends. At the bow, there's the well deck. At the stern there's a large open space, it being a cruiser style design. Neither of these spaces have been covered, and it's been like this since I launched. I wanted to cruise with and live on the … | Continue reading
Codespaces seem to be at the intersection of a number of things I'm interested in, including containers in general, dev containers in particular, ephemeral environments, the command line, thin clients and remote servers, SSH, the GitHub CLI, and more. I had a task to complete thi … | Continue reading
If I suggest that an alternative title for this could be "Blog post, not blog!" you'll get a good idea of what this is about. Plus there's a bonus bit on how blogs, blog posts and feeds relate to OData. Background I was fortunate to be able to study until I was 21, before startin … | Continue reading
On Friday last week we had the first Hands-on SAP Dev live stream of 2024, and it was the first episode in a new "back to basics" series on the SAP Cloud Application Programming Model (or CAP, to us humans), specifically with Node.js. https://www.youtube.com/watch?v=gu5r1EWSDSU B … | Continue reading
In this quick post I show a simple JSON dataset explorer that gives me a multi-line filter editor. When it comes to exploring and processing JSON data, jq is my goto language. And for exploring, I will either just want to browse the entire JSON dataset, or filter with simple jq e … | Continue reading
On Lobsters there's a new 2024 thread on battlestations where folks share pics of their desk setups. So I thought I'd share a pic of mine. It's in the office space on the narrowboat that you can see here near the centre of the cabin (from the post Working from a narrowboat - Inte … | Continue reading
In this post I explain what I've done to be able to use the Docker client CLI from within a container on my macOS device. Dev containers I use dev containers everywhere. I hardly ever work outside of a container on, say, my work laptop (a 2022 Apple MacBook Air M2). Instead, I do … | Continue reading
I'm moving off X (Twitter) at the end of this year. I've been thinking about doing it for some time, and while it's fairly arbitrary, I decided that the end of 2023 would be the end of my activities on that platform. There are a few reasons why, and some folks may be wondering. S … | Continue reading
This weekend I wrote a simple Tmux plugin, tmux-focus-status, mostly to learn how to do it, but also to modularise my Tmux configuration (perhaps organising chunks of configuration into plugins is a little extreme, ah well). The way you add a plugin to your Tmux configuration req … | Continue reading
I'm revisiting my working environment setup and configuration, which comprises, at its core, Bash, (Neo)vim and Tmux. This is essentially my IDE, or, to use a term I learned from TJ DeVries, my Personalised Development Environment (PDE). Anyway, while I've used Tmux for a long ti … | Continue reading
If you're at SAP TechEd 2023 in Bengaluru, India you may have seen a little Easter Egg in the form of some Node.js code. If you've seen it and are curious about it, and want to execute it but don't know how, there are plenty of ways you can do it on the Web. You don't need to ins … | Continue reading
Devtoberfest 2023 kicked off today, with a wealth of live sessions. Read on to find out why I think Devtoberfest is a great way for developers to get themselves ready for SAP TechEd. The Developer Advocates at SAP have been busy over the past few weeks putting together the conten … | Continue reading
In the context of this month's SAP Developer Challenge on APIs, some participants working through today's task have tripped up on a Bash feature, a feature which is one of a family of features relating to "expansion" of information. In this short post I dig into what that feature … | Continue reading
You can use curl to send OData query operations with system query options that contain whitespace, and have it URL encode that whitespace for you. We're running an SAP Developer Challenge this month, on the topic of APIs. In a discussion relating to Task 2 - Calculate Northbreeze … | Continue reading
It's been a few weeks since I took possession of my narrowboat and it's been pretty hot and humid the whole time. Today was the first day where it felt noticeably cooler, so I took the opportunity to complete a task I'd been itching to do since I launched. And that was to cure th … | Continue reading
After three days in Mercia Marina on a visitor mooring, it was time to leave. I must say that I was impressed with the marina - the facilities, the layout, and the staff. I'll be visiting again in late August, to leave my boat while I travel for a couple of CAP-related CodeJams, … | Continue reading
My good friend Sascha asked how folks navigate the canal network, given that Google Maps lacks directional detail. I thought this would be a great topic for a short post. Thanks Sascha! These are the resources I use; there may be others of which I'm not aware, but this combinatio … | Continue reading
Today was the day for the first service on the Barrus Shire 50 engine and gearbox. Specifically, the gearbox oil needs to be changed after 25 hours. While I'd participated in a great course at the Narrowboat Skills Centre on boat engine maintenance, the reality of tackling this m … | Continue reading
I'm on the train back to Duesseldorf on an early Saturday morning, after another successful outing of our SAP CodeJam content that takes participants through the ins and outs of service integration with CAP (the SAP Cloud Application Programming Model). This time it was in Gueter … | Continue reading
I often find myself searching for the related API endpoints for any given chunk of data returned from a call to the GitHub REST API. Let's take an issue as an example, one related to SAP's Open Documentation Initiative: Feedback for "Data Lake API": https://github.com/SAP-docs/sa … | Continue reading
The SAP CodeJam programme continues apace. Yesterday I ran a CodeJam in Brescia, Italy, on the topic of service integration with CAP, the SAP Cloud Application Programming Model. Here's a quick overview, with plenty of pictures. Working on the content This wasn't the first instan … | Continue reading
Previous post in this series: Living on a narrowboat - the stove as the heart of the home. In the first post in this series, I'm moving onto a narrowboat, I showed an image depicting the design of my narrowboat. My old friend Edwin asked me to supply some descriptions of what eac … | Continue reading
I'm a big fan of ijq and how it allows me to explore JSON data interactively with jq expressions. With a small script I have improved my workflow by being able to capture the jq expression from ijq and use it easily on the command line. The challenge I noticed that I had develope … | Continue reading
In the context of writing a short jq script to turn a JSON representation of an OData entity set into a set of CSV records, I came across something in jq that reminded me of something I'd discovered recently, and made me think a bit more about it. In the source data, each entity … | Continue reading
Understanding jq's SQL style operators JOIN and INDEX 23 Jun 2022 | 7 min read In this post I explore a couple of new (to me) operators... | Continue reading
404 Oops. Page not Found. This is possibly because of a recent URL restructuring, I did. Sorry about that - it's my fault. You can find all... | Continue reading