Definition
Sharing organisation is a reference model designed to a view of active data sharing agreements and which organisation are activated and deactivated.
Information
Section titled “Information”Due to the complex nature of data sharing agreements the sharing organisation model has been designed to allow for a single view per user based their access configuration. An example of this could be user one has access to three sharing agreements which consists of 25 organisations.
Each organisation can activate (or deactivate) the agreement any time however user one will need to be able to see both the organsation that are active and which ones are not. Also as the model is driven from user configuration this means that, when querying the model, you will only ever see organisations that can belong to the agreements linked to your accounts.
Overview
Section titled “Overview”flowchart TD
DSA_01["Agreement 01"]
DSA_02["Agreement 02"]
EX_DSA_01["Explorer Agreement 01"]
EX_DSA_02["Explorer Agreement 02"]
org_01["Organisation 1001"]
org_02["Organisation 1002"]
org_03["Organisation 1003"]
org_04["Organisation 1004"]
EMIS_INDEX([EMIS INDEX])
DSA[Data Sharing Agreements]
ACCESS_GUARD([AccessGuard])
usr_01["Explorer User 1"]
usr_02["Explorer User 2"]
Sharing_model[["Sharing Organisation Model"]]
org_01 --> DSA_01
org_02 --> DSA_01
org_03 --> DSA_01
org_03 --> DSA_02
org_04 --> DSA_02
DSA_01 --> EMIS_INDEX
DSA_02 --> EMIS_INDEX
EMIS_INDEX --> DSA
DSA --> ACCESS_GUARD
ACCESS_GUARD --> EX_DSA_01
ACCESS_GUARD --> EX_DSA_02
ACCESS_GUARD --> usr_01
ACCESS_GUARD --> usr_02
usr_01 --> EX_DSA_01
usr_02 --> EX_DSA_02
EX_DSA_01 --> Sharing_model
EX_DSA_02 --> Sharing_model
classDef nodeStyle stroke:#9961a4;
class DSA_01,DSA_02,EX_DSA_01,EX_DSA_02,org_01,org_02,org_03,org_04,EMIS_WEB,DSA,ACCESS_GUARD,usr_01,usr_02,Sharing_model nodeStyle;
linkStyle default stroke:#117abf,fill:none
What’s changing in iPCV v2
Section titled “What’s changing in iPCV v2”Update to is_disabled logic
Section titled “Update to is_disabled logic”The calculation for setting the disabled flag has been updated to account for deleted records.
Why?
iPCV v1 used a calculated field by using the following logic: if an agreement
was activated (wasactivated = TRUE), but now is not activated
(isactivated = FALSE), consider it disabled (TRUE), otherwise not (FALSE).
However, this led to an edge case where if an agreement was to be deleted both
columns (wasactivated and isactivated) would be set to NULL setting the
disabled flag to FALSE by default.
Customer benefit
This change provides the following benefits:
-
Improved consistency
-
Cleaner history
Customer action
No customer action is required unless your logic depends on the previous value.
Deleted flag correction
Section titled “Deleted flag correction”In iPCV v1 the sharing_organisation model used COALESCE on the deleted flag.
Why?
Due to the COALESCE if one of the sub tables have a TRUE value for being deleted this would still be set to FALSE.
Customer benefit
This change provides the following benefits:
-
Improved consistency
-
Cleaner history
Customer action
No customer action is required unless your logic depends on the previous value.
Schema updates for data maintenance
Section titled “Schema updates for data maintenance”- The
deletedcolumn has been renamed tois_deletedto indicate whether a sharing organisation record has been marked as deleted - Removed _ingest_time column from this model as it is no longer required in v2
Benefit
Section titled “Benefit”- The
is_deletedcolumn enables more effective data maintenance by allowing customers to identify and manage deleted sharing organisation records and maintain data quality for organisation classifications - Aligns with iPCV v2’s standardized approach to data modeling
Customer Action
Section titled “Customer Action”- Update your ETL processes to use the
is_deletedcolumn instead ofdeletedto filter out deleted sharing organisation records and maintain data quality - Remove the references to _ingest_time, as it is no longer available in v2
Examples
Section titled “Examples”Get active organisations
Section titled “Get active organisations”select *from hive.explorer_ipcv.srv_sharing_organisationwhere is_activated = trueAgreements modified in timeframe
Section titled “Agreements modified in timeframe”select *from hive.explorer_ipcv.srv_sharing_organisationwhere last_modified_datetime >= CURRENT_TIMESTAMP - INTERVAL '30' DAY
