House of Representatives through SQL now includes all data connections

The Dutch House of Representatives Data Warehouse is accessible with SQL via a new connector, TweedeKamerV2. This connector uses the House’s OData v5 connection instead of the v2 connection. The v2 connection will be deprecated from 1 October 2026.

This new driver also unlocks the relationships between the data for the first time: which vote corresponds to which decision, which document belongs to which dossier, which booking is for which room, etc.

Why a new connector

The Dutch House of Representatives is withdrawing the OData/v4/2.0 connection on 1 October 2026. The existing connector TweedeKamerNl reads this connection and will then stop working. The new connector reads the successor OData/v5.

Both connectors will coexist until 1 October 2026, allowing an existing report to be converted without interruption.

What changes: the relationships

The old connector presented the tables but not the relationships between them. A reference to a single other record was expanded into columns of that other record, which then always remained empty; a reference to multiple records disappeared without notice. This made the driver less valuable for many scenarios.

The new connector captures all 132 references known to the model in two ways:

  • a reference to a single other record becomes a regular column with the key in it, for example, Decision_Id on a vote. This can be filtered and linked;
  • a reference to multiple records receives its own link table of two columns, for example, RoomBookings between rooms and bookings.

Example: dissenting votes on rejected decisions

The following query counts per group how often they voted against on a decision that was rejected. This requires two tables at the same time: the type of decision is on the decision, and the vote is on the vote.

select   stg.group_name
,        count(*) as against_count
from     TweedeKamer..Votes stg
join     TweedeKamer..Decisions  bst
on       bst.id = stg.decision_id
and      bst.type = 'Voting - rejected'
where    stg.type = 'Against'
and      stg.ModifiedOn >= trunc(sysdateutc) - 14
group
by       stg.group_name

Example: how busy is each room?

The second type of relationship, the link table, connects two tables that do not carry a key to each other. Rooms and bookings are such a pair:

select   room.name    as room
,        count(*)     as booking_count
from     TweedeKamer..RoomBookings rmbook
join     TweedeKamer..Rooms        room
on       room.id = rmbook.room_id
group
by       room.name

In this way, we learn that the Throbecke Room is frequently booked, but the “Oude Room - Smoking Lounge” very rarely.

Transition

The table names are largely identical among the tables.

See also: