![]() |
Db2 as engine and data source for the data lakehouse |
Showing posts with label database. Show all posts
Showing posts with label database. Show all posts
Wednesday, March 12, 2025
Db2 for your data lakehouse
Labels:
administration,
database,
DB2,
enterprise warehouse,
IT,
lakehouse,
version 12,
warehouse,
watson,
watsonx.data
Monday, February 24, 2025
Db2 catalog: Updated documentation links to database metadata
![]() |
New Db2 metadata created |
Friday, January 17, 2025
Once again: Db2 External Tables
![]() |
Db2 log files and data on IBM COS |
Labels:
administration,
data in action,
database,
IBM,
ibmcloud,
IT,
knowledge center,
sql,
version 12
Friday, August 9, 2024
Revisited: Db2 backup to S3 / Object Storage
![]() |
Db2 backup in an S3 bucket |
Thursday, May 2, 2024
Registration for IDUG EMEA 2024 Db2 Tech Conference is now open
IDUG, the International Db2 User Group, just announced that the registration for its EMEA conference in Valencia, Spain, this Fall is now open. You can find the details about the currently available conference packages by going to the IDUG EMEA 2024 Db2 Tech Conference page. Right now, an early bird rate, a special rate for first time attendees, and for virtual participants is available. Moreover, you can also register for the Db2 for z/OS and for the Db2 for LUW Fundamentals courses.
Tuesday, May 26, 2020
New performance and security feature in Db2: Authentication cache
![]() |
New security feature in Db2 |
Monday, May 18, 2020
Some advanced SQL to analyze COVID-19 data
![]() |
Learn to write SQL |
Monday, April 20, 2020
All the best combined: Cloud, Db2, Python, Serverless and Security
![]() |
Add a cloud service ID as Db2 user |
All this helps to reduce the set of privileges held by a user or service and hence increases cloud security.
Monday, March 23, 2020
Obtaining device metadata for FIDO / FIDO2 security devices
![]() |
Zoo of FIDO2 security keys |
Monday, January 27, 2020
25th meeting of German Db2 User Group
![]() |
Celebrating the 25th DeDUG meeting |
Labels:
cloud,
data in action,
database,
DB2,
dedug,
IBM,
idug,
IT,
performance,
sql,
user group
Tuesday, November 26, 2019
ETL in the cloud using SQL Query and Db2
![]() |
From COS to Db2 using SQL |
Thursday, November 7, 2019
Control your database encryption keys for Db2 on Cloud
![]() |
Db2 master key managed by IBM Cloud Key Protect |
Thursday, August 1, 2019
Use a Delivery Pipeline to rotate credentials
![]() |
Job in Delivery Pipeline to rotate keys |
Wednesday, July 17, 2019
Rotating service credentials for IBM Cloud Functions
![]() |
Keep your service keys secret |
Wednesday, April 24, 2019
Updated tutorial: Database-driven chatbot
If you want to build a chatbot that gets its content from a database, there is a good news. The existing tutorial “Build a database-driven Slackbot”
was just updated to adapt to latest features of IBM Watson Assistant.
First, define a skill that reaches out to a database service like Db2.
Thereafter, use the built-in integrations to easily tie in the assistant
with Slack, Facebook Messenger, embed the chatbot into your
own application or use the WordPress plugin.
![]() |
Architecture of database-driven chatbot |
Labels:
chatbot,
cloud,
data in action,
database,
DB2,
IBM,
postgresql,
tutorial,
watson
Friday, September 14, 2018
Tutorial on how to apply end to end security to a cloud application
Before you head out to the weekend I wanted to point you to a new cloud security tutorial. If you read this at the beginning of your week: What a great start... ;-)
Did you ever wonder how different security services work together to secure a cloud application? In the new tutorial we use
If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.
Did you ever wonder how different security services work together to secure a cloud application? In the new tutorial we use
- IBM Cloud Activity Tracker to log all security-related events. This includes logging in to the account, provisioning or deleting services, working with encryption keys and more.
- IBM Cloud Key Protect to manage encryption keys. For the tutorial, we generate a root key for envelope encryption of stored files. You could also import your own root key (bring your own key, BYOK). We use the root key to create encrypted buckets in the IBM Cloud Object Storage service.
- IBM Cloud Object Storage (COS) service to produce expiring links to individual files. The links can be shared with others and expire after the set amount of time, so that the file cannot be accessed thereafter.
- IBM Cloud App ID as a wrapper around (enterprise and social) Identity Providers to manage authentication and authorization through a single interface. The App ID service can be directly integrated with Kubernetes Ingress.
- IBM Cloud Container Registry as a private image registry from which we deploy the application as container into a Kubernetes cluster (IBM Cloud Kubernetes Service). The container registry includes a Vulnerability Advisors that scans for and assesses container vulnerability and then recommends fixes.
If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.
Friday, April 27, 2018
Db2: CTE and CONNECT BY - two kinds of recursion
![]() |
Writing recursive SQL |
If you had to write recursive queries, e.g., to create a bill of material or to find dependencies in data, you would typically use a SELECT statement with a common table expression (CTE). CTEs are easily spotted by starting with the keyword WITH. Some form of temporary table is defined, then the initial data (seed) is specified followed by UNION ALL and the SELECT for the recursive part. A regular fullselect is then applied to the result of that computation.
The CONNECT BY provides another syntax for hiearachical and recursive queries. It was first introduced by Oracle and made its way into Db2 as part of the SQL compatibility features. It allows to write a, more or less, regular SELECT statement followed by a START WITH clause to define the initial data (see) and a CONNECT BY clause to specify the recursion. There are some additional keywords to access data from the prior step, the root ancestor or the (string) path from the root to a node. It is quite powerful and often shorter than a CTE. The only drawback is that you have to enable it in the Db2 compatibility vector.
The following two queries return the same result. It is the organizational structure of the departments in the SAMPLE database. The first query uses CONNECT BY and is directly taken out of the Db2 documentation.
SELECT LEVEL, CAST(SPACE((LEVEL - 1) * 4) || '/' || DEPTNAME AS VARCHAR(40)) AS DEPTNAME FROM DEPARTMENT START WITH DEPTNO = 'A00' CONNECT BY NOCYCLE PRIOR DEPTNO = ADMRDEPT
The second query is my version of the above with a CTE. As you can see, it is longer. Readability depends on what you are used to.
WITH tdep(level, deptname, deptno) as (
SELECT 1, CAST( DEPTNAME AS VARCHAR(40)) AS DEPTNAME, deptno
FROM department
WHERE DEPTNO = 'A00'
UNION ALL
SELECT t.LEVEL+1, CAST(SPACE(t.LEVEL * 4) || '/' || d.DEPTNAME
AS VARCHAR(40)) AS DEPTNAME, d.deptno
FROM DEPARTMENT d, tdep t
WHERE d.admrdept=t.deptno and d.deptno<>'A00')
SELECT level, deptname
FROM tdep
If you only knew one style of recursive query then it is time to try out the other. Both queries above work with the SAMPLE database. If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.
Friday, April 13, 2018
IBM Cloud and Watson security questionnaires

The three available security documents cover IBM Cloud Infrastructure (IaaS), IBM Cloud Platform (PaaS), and the IBM Watson Services with their cognitive / AI capabilities. Using the provided material, you can learn about application security, audits, compliance, how business continuity and operational resilience are handled, procedures for change control, data and data center security, IAM (identify and access management) and much more. The answers include many links to references, documentation and other valuable information. Just for that it is worth going over the security questionnaires for IBM Cloud.
If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.
Tuesday, February 6, 2018
Chatbots: Some tricks with slots in IBM Watson Conversation

Slots
With my chatbot interface to Db2 I want to both query the database and insert new records. Thus, I need to collect input data of various kind. The Conversation service has a neat feature named input slots that simplifies that process. Within a dialog node (a logical step within the chat flow) I can specify a list of items the Conversation service should check for. I can tell in which variable to save that input and what question to ask if that data was not provided yet. Optional slots, i.e., optional data, can be enabled.Thursday, November 30, 2017
IBM Cloud: Some fun with Python and Cloud Foundry Logging
![]() |
IBM Cloud: Turn Log Data into Donut |
As usual, the code for my app is available on Github: https://github.com/data-henrik/application-log-analysis/. Once deployed to IBM Cloud, the app can be used to send messages on a chosen log level back to the server. The server-side log level, i.e., the threshold for processed log messages can also be set. The app produces diagnostic output on "stdout" and "stderr". The two are treated differently by Cloud Foundry. Here is a screenshot of the logging app:
![]() |
Test app for Cloud Foundry logging |
![]() |
Search Query for Elasticsearch / IBM Cloud Log Analysis |
An official tutorial using that app and Log Analysis is available in the IBM Cloud docs.
If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.
Subscribe to:
Posts (Atom)