diff --git a/docs/column-level-security.md b/docs/column-level-security.md index cdac265..d463687 100644 --- a/docs/column-level-security.md +++ b/docs/column-level-security.md @@ -1,17 +1,17 @@ --- layout: article title: Column Level Security -description: Restrict tables in SAS such that users can only view or edit specific columns according to their group membership. +description: Column Level Security prevents end users from viewing or editing specific columns in SAS according to their group membership. og_image: https://docs.datacontroller.io/img/rls_table.png --- # Column Level Security -Column level security is implemented by mapping _allowed_ columns to a list of groups. +Column level security is implemented by mapping _allowed_ columns to a list of SAS groups. In VIEW mode, only allowed columns are visible. In EDIT mode, allowed columns are _editable_ - the remaining columns are read-only. ## Configuration -The columns in MPE_COLUMN_LEVEL_SECURITY should be configured as follows: +The variables in MPE_COLUMN_LEVEL_SECURITY should be configured as follows: ### CLS_SCOPE Determines whether the rule applies to the VIEW page, the EDIT page, or ALL pages. @@ -43,7 +43,7 @@ If you would like this rule to be applied, be sure this value is set to 1. Example values as follows: |CLS_SCOPE:$4|CLS_GROUP:$64|CLS_LIBREF:$8| CLS_TABLE:$32|CLS_VARIABLE_NM:$32|CLS_ACTIVE:8.| -|---|---|---|---|---|---|---|---|---|---|---| +|---|---|---|---|---|---| |EDIT|Group 1|MYLIB|MYDS|VAR_1|1| |ALL|Group 1|MYLIB|MYDS|VAR_2|1| |ALL|Group 2|MYLIB|MYDS|VAR_3|1| diff --git a/docs/dcc-tables.md b/docs/dcc-tables.md index 0dc8fbc..e6d1406 100644 --- a/docs/dcc-tables.md +++ b/docs/dcc-tables.md @@ -12,7 +12,7 @@ og_image: https://i.imgur.com/DtVU62u.png Adding tables to the Data Controller is a matter of configuration, specifically the addition of a new record to the `DATACTRL.MPE_TABLES` table, and corresponding entries in the `DATACTRL.MPE_SECURITY` table. !!! note -In order to surface the table to users, appropriate groups should be configured as per [security](dcc-security.md) settings. + In order to surface the table to (non admin) users, appropriate groups should be configured as per [security](dcc-security.md) settings. ![screenshot](img/configtable.png) @@ -43,7 +43,7 @@ The loadtype determines the nature of the update to be applied. Valid values are This is a required field. !!! Note -The support for BITEMPORAL loads is restricted, in the sense it is only possible to load data at a single point in time (no support for loading multiple business date ranges for a single business key). The workaround is simply to load each date range separately. + The support for BITEMPORAL loads is restricted, in the sense it is only possible to load data at a single point in time (no support for loading multiple business date ranges for a single business key). The workaround is simply to load each date range separately. ### BUSKEY @@ -134,3 +134,20 @@ Leave blank unless using retained / surrogate keys. If more information is available to describe the table being updated (eg on sharepoint), provide a url here and it will be made available to approvers. Leave blank if not required. + + +## HOOK Scripts + +Data Controller allows SAS programs to be executed at certain points in the ingestion lifecycle, such as: + +* Before an edit (control the edit screen) +* After an edit (perform complex data quality) +* Before an approval (control the approve screen) +* After an approval (trigger downstream jobs with new data) + +This program is simply `%include`'d after an edit has been made. The program may be: + +* Physical, ie a `.sas` program on the physical server directory +* Logical, ie a Viya Job (SAS Drive), SAS 9 Stored Process (Metadata Folder) or SASJS Stored Program (SASjs Drive). + +If the entry ends in ".sas" it is assumed to be a physical, filesystem file. Otherwise, the source code is extracted from the Job/STP. The Job/STP path can be relative (beneath the /DataController root) or full (to another item in Drive / Metadata). \ No newline at end of file diff --git a/docs/mpe_tables.md b/docs/mpe_tables.md new file mode 100644 index 0000000..3890881 --- /dev/null +++ b/docs/mpe_tables.md @@ -0,0 +1,36 @@ +--- +layout: article +title: MPE_TABLES +description: The MPE_TABLES table defines the tables that are EDITABLE within Data Controller for SAS® - along with attributes such as load type, number of approvals, and hook scripts. +--- + +# MPE_DATASTATUS_TABS + +The `MPE_TABLES` table defines the tables that are EDITABLE - along with attributes such as load type, number of approvals, and hook scripts. + +A more detailed breakdown of the columns / features is available in the [configuration](/dcc-tables/) section. + +## Columns + + - `TX_FROM num`: SCD2 open datetime + - 🔑 `TX_TO num`: SCD2 close datetime + - 🔑 `LIBREF char(8)`: SAS Libref (8 chars) + - 🔑 `DSN char(64)`: The library member name + - `NUM_OF_APPROVALS_REQUIRED num`: The number of approvals required (against staged data) before the base table is updated. + - `LOADTYPE char(12)`: The update method. See [config](/dcc-tables/#loadtype) + - `BUSKEY char(1000)`: The logical key. See [config](/dcc-tables/#buskey) + - `VAR_TXFROM char(32)`: The SCD2 start column of the base table. See [config](/dcc-tables/#var_txfrom-var_txto) + - `VAR_TXTO char(32)`: The SCD2 end column of the base table. See [config](/dcc-tables/#var_txfrom-var_txto) + - `VAR_BUSFROM char(32)`: The bitemporal business start column of the base table. See [config](/dcc-tables/#var_busfrom-var_busto) + - `VAR_BUSTO char(32)`: The bitemporal business end column of the base table. See [config](/dcc-tables/#var_busfrom-var_busto) + - `VAR_PROCESSED char(32)`: A column to contain the batch load time. See [config](/dcc-tables/#var_processed) + - `CLOSE_VARS char(500)`: Close out _unloaded_ records for a key section. See [config](/dcc-tables/#close_vars) + - `PRE_EDIT_HOOK char(200)`: Run SAS code before an EDIT. See [config](/dcc-tables/#pre_edit_hook) + - `POST_EDIT_HOOK char(200)`: Run SAS code after an EDIT. See [config](/dcc-tables/#post_edit_hook) + - `PRE_APPROVE_HOOK char(200)`: Run SAS code before an APPROVE. See [config](/dcc-tables/#pre_approve_hook) + - `POST_APPROVE_HOOK char(200)`: Run SAS code after final approval (and dataload). See [config](/dcc-tables/#post_approve_hook) + - `SIGNOFF_COLS char(200)`: For marking final approval. See [config](/dcc-tables/#signoff_cols) + - `SIGNOFF_HOOK char(200)`: Run SAS code after signoff. See [config](/dcc-tables/#signoff_hook) + - `NOTES char(1000)`: Additional notes. See [config](/dcc-tables/#notes) + - `RK_UNDERLYING char(1000)`: The key on which the retained key is generated. See [config](/dcc-tables/#rk_underlying) + - `HELPFUL_LINK char(300)`: URL to additional notes about the table. See [config](/dcc-tables/#helpful_link) \ No newline at end of file