fix: hook script info

This commit is contained in:
munja 2022-05-18 14:42:46 +01:00
parent 2207d1b027
commit cb39441111
3 changed files with 59 additions and 6 deletions

View File

@ -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|

View File

@ -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)
@ -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).

36
docs/mpe_tables.md Normal file
View File

@ -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)