The tables in the operational part of the Boundary database (meaning non-warehouse tables) suffix primary key columns and foreign key columns with `_id`. Many of these columns appear in the warehouse dimension and fact tables as normal attributes, not primary keys or foreign keys. To disambiguate ID columns from operational tables, the primary key column for dimension tables will be renamed from `id` to `key` and the foreign key columns in the fact tables will be renamed to change the suffix from `_id` to `_key`.
22 lines
1.3 KiB
PL/PgSQL
22 lines
1.3 KiB
PL/PgSQL
begin;
|
|
select plan(8);
|
|
|
|
select is(count(*), 1::bigint) from wh_session_connection_accumulating_fact where connection_id = 'sc1_____clare';
|
|
select is(bytes_up, null) from wh_session_connection_accumulating_fact where connection_id = 'sc1_____clare';
|
|
select is(bytes_down, null) from wh_session_connection_accumulating_fact where connection_id = 'sc1_____clare';
|
|
select is(connection_closed_time, 'infinity'::wh_timestamp) from wh_session_connection_accumulating_fact where connection_id = 'sc1_____clare';
|
|
|
|
update session_connection set
|
|
bytes_up = 10,
|
|
bytes_down = 5,
|
|
closed_reason = 'closed by end-user'
|
|
where public_id = 'sc1_____clare';
|
|
|
|
select is(count(*), 1::bigint) from wh_session_connection_accumulating_fact;
|
|
select is(bytes_up, 10::wh_bytes_transmitted) from wh_session_connection_accumulating_fact where connection_id = 'sc1_____clare';
|
|
select is(bytes_down, 5::wh_bytes_transmitted) from wh_session_connection_accumulating_fact where connection_id = 'sc1_____clare';
|
|
select is(connection_closed_time, now()::wh_timestamp) from wh_session_connection_accumulating_fact where connection_id = 'sc1_____clare';
|
|
|
|
select * from finish();
|
|
rollback;
|