Tuesday, July 24, 2012

Interview about the partnership with IBM

Yesterday, Ed Brill  and I contributed to episode 162 of the famous Taking Notes Podcast by Bruce Elgort and Julian Robichaux.

Reason was that Ed Brill had publicly made the announcement (link) on his blog about the expended partnership between my company Trust Factory and IBM entered into with regards to our DNA Analysis Services.

Despite the hick-ups I caused while Ed was talking (people pinging me on Skype and my Mac started shouting that Notes needed my attention), it was a very nice and learning full experience for me.

I really think Bruce and Julian did a great job 'polishing' my input up into an excellent podcast. These guys are real pro's.

Anyway, listen for yourself (warning: the first 60 seconds are an advertisement):

Friday, June 22, 2012

Botswana here we come (again)

Tickets booked (Lufthansa) to Johannesburg, South Africa.
Toyota Land-cruiser booked, and very important:
picked up my new lens today:

This time we will start in Johannesburg and drive all the way up to Botswana, Moremi, Chobe, Kasane and then through Zimbabwe back down to South Africa.

Of course Hans & Marco are helping us out again.
(sorry for the short notice guys ;-)

Wednesday, May 16, 2012

D'66 sponsor van het RTLNieuws of gewoon toeval?

In het RTL Journaal van half acht gisteravond, viel mij op hoezeer de D'66 posters op de achtergrond in beeld kwamen, tijdens interviews met niet D'66 politici. En dit was niet de eerste keer, vorige week gebeurde precies hetzelfde. Met de verkiezingen in aantocht, deed me dit denken aan een vorm van passieve reclame...

Ik kon het daarom niet laten om Frits Wester een tweet te sturen hierover. Tot mijn (positief) stomme verbazing kreeg ik nog een reply ook:

Om mijn punt even te verduidelijken, heb ik het journaal nog even online bekeken, en daarbij een paar voorbeelden gekopieerd:

Arie Slob,  D'66?
Frits Wester, D'66?

Alexander Pechtold, D'66
Jolande Sap, D'66?
Jan Kees de Jager, D'66?
Enfin, als prominent van een van deze partijen zou ik me in de toekomst liever voor m'n eigen deur willen laten interviewen...

Tuesday, May 8, 2012

In Need of an SQL Factory

Having performed hundreds of DNA engagements at primarily large customers in the world, our DNA data warehouse allows us to harvest factual knowledge regarding deployment and utilization trends inside IBM Lotus Notes & Domino environments. Once the research question properly translates into an SQL select statement, we need to apply that statement across all the customer schemas from where we wish to harvest the data.

However, each DNA engagement is unique and tailored to the specific customer. So are the corresponding tables in each customer schema. Consequently, having to select all schemas to apply our query to, is a time consuming task.

I decided to automate this process. Below I'm explaining what I did.

One way to discover which schemas we can run our queries on, is to use pg_tables:
SELECT schemaname FROM pg_tables WHERE tablename = 'user_session';

Next, I needed to craft output that in itself represents an SQL statement. (Beware to escape quotes properly):

SELECT
 '
 DROP TABLE IF EXISTS '|| schemaname ||'.template_utilization\;
 CREATE TABLE '||schemaname||'.template_utilization AS
  SELECT 
    \'' || schemaname ||'\'::text AS schemaname,
    LOWER(template_used) AS inherit_from, 
    CASE 
      WHEN template_type IS NULL THEN ''Not Classified'' 
      ELSE template_type 
    END AS template_type, 
    dt.description AS database_type, 
    COUNT(*) AS num_databases, 
    COUNT(distinct db.replica_id) AS num_replicaids
  FROM
    '||SPLIT_PART(schemaname, '_', 1) || '_dwh.notes_db_detail db
    JOIN dna.database_type dt ON dt.dbtype_id = db.dbtype_id
  WHERE
    NOT db.is_removed AND db.in_scope
  GROUP BY 
    template_used, 
    template_type, 
    dt.description\;
  '::text AS SQLStatement
FROM 
  pg_tables 
WHERE tablename = 'notes_db_detail';

Executing this query outputs a row for each schema where the table exists, where each row represents the final query we can execute against the (176!) schemas we wanted. Copy the output and paste this into a new window and press F5.