Files
dc/sas/mocks/sasjs/services/admin/makedata.js
T
dc d189fd4055 feat(mocks): give every control table the key and column case the estate has
A control table on a real estate is created with a unique index - MPE_TABLES on
tx_to/libref/dsn, MPE_X_TEST on primary_key_field, and so on - and mp_ds2ddl
turns that into the CREATE UNIQUE INDEX block of a DDL download. The mock's
tables had columns and rows and no key at all, which is why getddl could only
ever answer a fixed sample.

Each table file now carries `uniqueIndex` (name plus the ordered columns), taken
from the synthetic estate's own DDL: 39 of the 40 control tables have one,
MPE_REQUESTS is the exception the estate also has, and the format catalog marker
has none because it is not a dataset.

The columns also move to the case SAS creates them with. A table declared with
`alert_event` keeps that spelling in dictionary.columns and in the DDL, while
every payload the client reads reports the name upper case. The files now store
the creation case and the services build their keys through payloadKey(), which
fixes the DDL and leaves the payloads alone.

Two metadata gaps went with them: MPE_LOADS.csv_dir and MPE_MAXKEYVALUES.keytable
are NOT NULL on the estate and were not here.
EOF2
echo "--- second commit ---"; git log --oneline -1 | cat
2026-11-07 18:09:50 +00:00

5917 lines
131 KiB
JavaScript

/**
* Mock of the makedata service for the browser-hosted and CI estates.
*
* Answers the same three actions as the SAS service (action is required):
*
* DIRLIST the folders below PARENT, for the deploy screen's picker
* WRITECHECK is PATH a folder this deployment can write to
* MAKEDATA seed the control library, then remove this program
*
* DIRLIST and WRITECHECK are what the deploy screen asks before the control
* library exists. They must not seed anything: a browse that fell through to
* the seeding path would build the site, delete this program and close the
* deploy screen the visitor is standing on.
*/
const nodePath = require('path')
// Fixed libref for the mock environment
const dcLibref = 'DC_JSLIB'
// Read URL params (provided as module-scope consts by the JS runtime)
let adminGroup = 'AllUsers'
if (typeof admin !== 'undefined') adminGroup = admin
// Derive the SASjs Drive root from weboutPath
// weboutPath is <root>/sessions/<id>/webout.txt
// Drive is at <root>/drive
const sasjsRoot = nodePath.resolve(weboutPath, '..', '..', '..')
const driveRoot = nodePath.resolve(sasjsRoot, 'drive')
const appLoc = nodePath.join(..._program.split('services')[0].split('/'))
// DC data lives under <drive>/files/<appLoc>/data/<DCLIB>/ - one JSON file per table
// This is browsable in SASjs Studio and persists across service redeployes
const dataDir = nodePath.resolve(driveRoot, 'files', appLoc, 'data', dcLibref)
// ─── Actions ────────────────────────────────────────────────────────────────
/*
ACTION arrives the way the SAS service reads it - as a column of the fromjs
input table, or as a macro variable (a URL parameter) on the platforms that
deliver one. It is required: a default here is what lets a browse seed the
site and delete the program the deploy screen is using.
*/
eval(
fs.readFileSync(
nodePath.resolve(driveRoot, 'files', appLoc, 'services', 'dcMockUtils.js'),
'utf8'
)
)
const brPlatform = process.platform === 'win32' ? 'WIN' : 'UNIX'
const brSep = brPlatform === 'WIN' ? '\\' : '/'
/** Case-insensitive column read - the header carries the caller's casing. */
function brValue(row, name) {
if (!row) return ''
if (row[name] !== undefined) return row[name]
const key = Object.keys(row).find(function (k) {
return k.toUpperCase() === name
})
return key ? row[key] : ''
}
/**
* The input table, whatever the caller called it - %webout(FETCH) takes the
* first table that arrived, and the deploy screen ("fromjs") and a CLI seed
* ("SASControlTable") are the same request to the SAS service.
*/
function brFirstInputTable() {
for (let i = 1; i <= 10; i++) {
let name
try {
name = eval('_WEBIN_NAME' + i)
} catch (err) {
continue
}
if (name) return fetchRaw(name)
}
return ''
}
const brRows = parseCsv(brFirstInputTable())
let brAction = brValue(brRows[0], 'ACTION')
if (!brAction && typeof action !== 'undefined') brAction = action
const ACTION = String(brAction || '').trim().toUpperCase()
try {
if (!ACTION) {
mpAbort('ACTION is required: MAKEDATA, DIRLIST or WRITECHECK', _program)
}
if (['MAKEDATA', 'DIRLIST', 'WRITECHECK'].indexOf(ACTION) < 0) {
mpAbort('ACTION must be MAKEDATA, DIRLIST or WRITECHECK', _program)
}
/** The deploy window closes once the settings file exists (see browse_gate). */
function brBrowseGate() {
const settings = [
nodePath.resolve(driveRoot, 'files', appLoc, 'services', 'settings.js'),
nodePath.resolve(
driveRoot,
'files',
appLoc,
'services',
'public',
'settings.sas'
)
]
for (const file of settings) {
if (fs.existsSync(file)) {
throw new Error(
'DIRLIST and WRITECHECK are only available until DC is configured'
)
}
}
}
/*
The same refusals as mpe_dirlist / mpe_writecheck: only what can break the
platform - length and control characters - and what is left has to be an
absolute path. A quote, a comma or a parenthesised folder name is a legal
path ("C:\\Program Files (x86)"), and refusing it here would refuse a folder
the SAS side accepts, so the two estates would answer differently.
*/
function brCheckPath(value, message) {
if (value.length > 1000) throw new Error(message)
if (/[\u0000-\u001f]/.test(value)) throw new Error(message)
// '&' and '%' are macro triggers on the SAS side, where this value reaches
// macro code - the mock refuses them for the same reason, not because the
// filesystem cares. Every caller is macro-bound (a DIRLIST parent, a
// WRITECHECK target and the dcpath that is written into settings), so there
// is no path here that is merely echoed. Other punctuation is legal in a folder name and is
// accepted (see the comma/quote/parentheses case beside this one).
if (/[%&]/.test(value)) throw new Error(message)
const absolute =
brPlatform === 'WIN'
? /^[A-Za-z]:[\\/]/.test(value) || /^\\\\/.test(value)
: value.charAt(0) === '/'
if (!absolute) throw new Error(message)
}
function brRoots() {
if (brPlatform !== 'WIN') return ['/']
const roots = []
for (let i = 65; i <= 90; i++) {
const drive = String.fromCharCode(i) + ':\\'
if (fs.existsSync(drive)) roots.push(drive)
}
return roots
}
function brFolderRow(filepath, level, type, msg) {
return {
FILEPATH: filepath,
FILENAME: nodePath.basename(filepath) || filepath,
FILE_OR_FOLDER: type,
LEVEL: level,
MSG: msg || ''
}
}
/*
One level at a time, as the real picker is: a parent with tens of thousands
of subfolders is not transferred in full, and MAXOBS caps the rows with the
TRUNCATED flag the screen shows a note about.
*/
function brDirList(parent, depth, maxobs) {
const rows = []
/* the cap bounds the walk, not only the response: browsing /usr or /proc at
depth 3 must not stat everything below it and then throw most of it away */
let capped = false
/* the flag is raised only where a row is refused: a listing of exactly
maxobs entries is complete, so it must not report itself truncated */
const addRow = (row) => {
if (rows.length >= maxobs) {
capped = true
return false
}
rows.push(row)
return true
}
/*
LEVEL is the level the entries sit at, and the picker keeps LEVEL>0 for a
non-root listing - so children start at 1. mp_dirlist is the reference: on
the estate a DEPTH=1 browse of /tmp comes back with its folders at level 1,
and a blank parent returns the platform roots at level 0 followed by their
children at level 1. A non-root parent emits no parent row, which the
picker would discard at LEVEL 0 anyway.
*/
let frontier = []
if (!parent) {
for (const root of brRoots()) {
if (!addRow(brFolderRow(root, 0, 'folder', ''))) break
frontier.push(root)
}
} else {
frontier = [parent]
}
for (let level = 1; level <= depth && !capped; level++) {
const next = []
for (const folder of frontier) {
if (capped) break
let names
try {
names = fs.readdirSync(folder).slice().sort()
} catch (err) {
continue
}
for (const name of names) {
if (capped) break
const child = nodePath.join(folder, name)
let isFolder = false
try {
isFolder = fs.statSync(child).isDirectory()
} catch (err) {
if (!addRow(brFolderRow(child, level, 'locked', err.message))) break
continue
}
if (!isFolder) continue
if (!addRow(brFolderRow(child, level, 'folder', ''))) break
next.push(child)
}
}
frontier = next
if (!frontier.length) break
}
rows.sort(function (a, b) {
return a.FILEPATH < b.FILEPATH ? -1 : a.FILEPATH > b.FILEPATH ? 1 : 0
})
return { rows: rows, truncated: capped }
}
/** Creates and removes a probe file - what the deployment itself will do. */
function brWriteCheck(path) {
if (!path) throw new Error('Missing path')
brCheckPath(path, 'Invalid path')
let target = path
while (target.length > 1 && /[\\/]$/.test(target)) {
if (target.length === 3 && target.charAt(1) === ':') break
target = target.slice(0, -1)
}
const row = {
PATH: target,
PATH_EXISTS: 'N',
IS_FOLDER: 'N',
WRITEABLE: 'N',
MSG: ''
}
if (!fs.existsSync(target)) {
row.MSG = 'Path does not exist'
return row
}
row.PATH_EXISTS = 'Y'
let isFolder = false
try {
isFolder = fs.statSync(target).isDirectory()
} catch (err) {
/* exists but cannot be opened: reported as not a folder, as the SAS does */
}
if (!isFolder) {
row.MSG = 'Path exists but is not a folder'
return row
}
row.IS_FOLDER = 'Y'
/* mpe_writecheck tries up to ten names with fileexist()=0 before fopen('O'),
so a probe never truncates a file that is already there */
let probe = ''
for (let attempt = 1; attempt <= 10; attempt++) {
const candidate = nodePath.join(
target,
'.dcprobe_' +
(typeof process !== 'undefined' && process.pid ? process.pid : 0) +
'_' +
Math.floor(Math.random() * 1e9)
)
if (!fs.existsSync(candidate)) {
probe = candidate
break
}
}
if (!probe) {
row.MSG = 'No free name for the write probe'
return row
}
try {
fs.writeFileSync(probe, '')
fs.unlinkSync(probe)
row.WRITEABLE = 'Y'
} catch (err) {
row.MSG = err.message
}
return row
}
try {
switch (ACTION) {
case 'DIRLIST': {
brBrowseGate()
const parent = String(brValue(brRows[0], 'PARENT') || '').trim()
const depth = Math.min(
Math.max(parseInt(brValue(brRows[0], 'DEPTH'), 10) || 1, 1),
3
)
const maxobs = Math.min(
Math.max(parseInt(brValue(brRows[0], 'MAXOBS'), 10) || 2000, 1),
10000
)
/* a blank parent is the platform root; only a supplied one is checked */
if (parent) brCheckPath(parent, 'Invalid parent')
const listing = brDirList(parent, depth, maxobs)
_webout = JSON.stringify({
dirinfo: [
{
PARENT: parent,
SEP: brSep,
DEPTH: depth,
TRUNCATED: listing.truncated ? 'Y' : 'N',
PLATFORM: brPlatform
}
],
dirlist: listing.rows
})
break
}
case 'WRITECHECK': {
brBrowseGate()
const path = String(brValue(brRows[0], 'PATH') || '').trim()
_webout = JSON.stringify({ checkwrite: [brWriteCheck(path)] })
break
}
case 'MAKEDATA': {
/*
OUTFMT=JSON is what the CLI seed asks for (`deploy/makedata.json`); the
deploy screen asks for nothing and gets the HTML page it renders. The
SAS service answers the same two ways, and the CLI exits non-zero on an
HTML body because it cannot parse it - which is why the workflows used to
tolerate this call's exit status.
*/
const outfmt = String(brValue(brRows[0], 'OUTFMT') || '').toUpperCase()
// The rows below are the ones mpe_makedata.sas inserts on a SASjs Server
// deployment, transcribed field for field - the mock estate is meant to be
// the same estate as the one the SAS service builds.
// sas/mocks/test/makedata-parity.test.js parses both macros and fails when
// they drift.
//
// Three tables name SAS metadata groups, which do not exist on a JS-only
// estate: MPE_GROUPS, MPE_ROW_LEVEL_SECURITY and MPE_SECURITY carry the
// mock's own groups (dc-admin, AllUsers) instead of the SAS ones.
// MPE_X_TEST keeps the seven deterministic rows mpe_makedata inserts by
// hand; the other ~490 it inserts from a ranuni() loop are sample data,
// not configuration, and are not reproduced here.
//
// Cypress fixtures (TESTDATA, MPE_X_SEARCH, MPE_X_WIDE, DC996664 and the
// extra MPE_TABLES/VALIDATIONS/SELECTBOX/SECURITY rows they need) are NOT
// part of a DC install. They live in services/admin/createdemodata.js,
// which the test estate runs after this service.
// Ensure the data directory exists (create parent dirs as needed)
if (!fs.existsSync(dataDir)) {
fs.mkdirSync(dataDir, { recursive: true })
}
const tables = {
MPE_ALERTS: [],
MPE_AUDIT: [],
MPE_COLUMN_LEVEL_SECURITY: [
{
tx_from: 0,
tx_to: 253717919999,
CLS_SCOPE: 'EDIT',
CLS_GROUP: 'AllUsers',
CLS_LIBREF: 'DC_JSLIB',
CLS_TABLE: 'MPE_LOCKANYTABLE',
CLS_VARIABLE_NM: 'LOCK_STATUS_CD',
CLS_ACTIVE: 1,
CLS_HIDE: 0
}
],
MPE_CONFIG: [
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_EMAIL_ALERTS',
var_value: 'NO',
var_active: 1,
var_desc: 'YES or NO to enable email alerts. Note - this requires email options to be preconfigured! They can be configured in the settings stp if needed.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_VIEWLIB_CHECK',
var_value: 'NO',
var_active: 1,
var_desc: 'Set to YES to enable library validity checking in viewLibs service. Note: this can make the service very slow if there are lots of external libraries. If enabled, this removes empty libraries from the viewer library dropdown. To switch off, set to NO.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_MACROS',
var_value: '',
var_active: 1,
var_desc: 'Location of underlying macros - EUC feature.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_MAXOBS_WEBEDIT',
var_value: '250',
var_active: 1,
var_desc: 'This sets the maximum number of observations that can be loaded into the browser for editing in the EDIT screen. A higher number will require a decent browser (ie, not IE) and more memory on the client side. The DC_MAXCELLS_WEBEDIT limit is applied at the same time, whichever is reached first.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_MAXCELLS_WEBEDIT',
var_value: '200000',
var_active: 1,
var_desc: 'This sets the maximum number of CELLS (rows multiplied by columns) that can be loaded into the browser for editing in the EDIT screen. Whichever of this and DC_MAXOBS_WEBEDIT is reached first applies.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_MAXOBS_WEBVIEW',
var_value: '2000',
var_active: 1,
var_desc: 'This sets the maximum number of observations that can be loaded into the browser in the VIEW screen.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_REQUEST_LOGS',
var_value: 'YES',
var_active: 1,
var_desc: 'Setting to NO will prevent each request being logged to the MPE_REQUESTS table Default=YES.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_RESTRICT_VIEWER',
var_value: 'NO',
var_active: 1,
var_desc: 'YES will restrict the list of libraries and tables in VIEWER to those explicitly set to VIEW in the MPE_SECURITY table. Default=NO.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_RESTRICT_EDITRECORD',
var_value: 'NO',
var_active: 1,
var_desc: 'Setting YES will prevent the EDIT RECORD dialog appearing in the EDIT screen by removing the "Edit Row" option in the right click menu, and the "ADD RECORD" button in the bottom left. Default=NO.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC_CATALOG',
var_name: 'DC_IGNORELIBS',
var_value: '|MAPSSAS|MAPS|',
var_active: 1,
var_desc: 'Pipe seperated list of librefs (uppercase) to be ignored when running the Data Catalog refresh process. This can enable a clean run when invalid librefs are returned by the mpe_refreshlibs macro.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_LOCALE',
var_value: 'SYSTEM',
var_active: 1,
var_desc: 'Set to a locale (such as en_gb or en_be) to override the system value (which can be driven from the browser settings). This is useful when importing ambiguous dates from CSV or Excel (eg 1/2/20 vs 2/1/20) as DC uses the anydtdtm informats for import. Default=SYSTEM.'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DCBL_REDSH',
var_name: 'BULKLOAD',
var_value: 'YES',
var_active: 0,
var_desc: 'Set to YES to enable BULKLOAD=YES in redshift'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DCBL_REDSH',
var_name: 'BL_BUCKET',
var_value: '\'your-aws-bucket/Exchange\'',
var_active: 0,
var_desc: 'Set to the (quoted) value of the AWS bucket to use for s3 uploads in redshift'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DCBL_REDSH',
var_name: 'BL_AWS_CREDENTIALS_FILE',
var_value: '\'/path/to/your/aws/s3/.credentials\'',
var_active: 0,
var_desc: 'Set to the (quoted) value of the AWS creds file'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DCBL_REDSH',
var_name: 'BL_REGION',
var_value: '\'eu-west-1\'',
var_active: 0,
var_desc: 'Set to the (quoted) AWS region in use'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DCBL_REDSH',
var_name: 'BL_COMPRESS',
var_value: 'YES',
var_active: 0,
var_desc: 'Set to YES to perform compression ahead of the COPY command'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DCBL_REDSH',
var_name: 'BL_USE_SSL',
var_value: 'YES',
var_active: 0,
var_desc: 'Set to YES to use SSL encryption'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC_REVIEW',
var_name: 'HISTORY_ROWS',
var_value: '100',
var_active: 1,
var_desc: 'Number of rows (or additional rows) to return in the HISTORY page'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_LICENCE_KEY',
var_value: ' ',
var_active: 1,
var_desc: 'Licence Key'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC',
var_name: 'DC_ACTIVATION_KEY',
var_value: ' ',
var_active: 1,
var_desc: 'Activation Key'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC_EMAIL',
var_name: 'SUBMITTED_TEMPLATE',
var_value: 'Dear user,\nPlease be advised that a change to table &alert_lib..&alert_ds has been proposed by &from_user on the &syshostname SAS server.\nReason provided: %superq(SUBMITTED_TXT)\nThis is an automated email by Data Controller for SAS. For documentation, please visit https://docs.datacontroller.io',
var_active: 1,
var_desc: 'Template email, sent after submitting a change'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC_EMAIL',
var_name: 'APPROVED_TEMPLATE',
var_value: 'Dear user,\nPlease be advised that a change to table &alert_lib..&alert_ds has been approved by &from_user on the &syshostname SAS server.\nThis is an automated email by Data Controller for SAS. For documentation, please visit https://docs.datacontroller.io',
var_active: 1,
var_desc: 'Template email, sent after approving a change'
},
{
tx_from: 0,
tx_to: 253717919999,
var_scope: 'DC_EMAIL',
var_name: 'REJECTED_TEMPLATE',
var_value: 'Dear user,\nPlease be advised that a change to table &alert_lib..&alert_ds has been rejected by &from_user on the &syshostname SAS server.\nReason provided: %superq(REVIEW_REASON_TXT)\nThis is an automated email by Data Controller for SAS. For documentation, please visit https://docs.datacontroller.io',
var_active: 1,
var_desc: 'Template email, sent after rejecting a change'
}
],
MPE_DATACATALOG_CATS: [],
MPE_DATACATALOG_LIBS: [],
MPE_DATACATALOG_OBJS: [],
MPE_DATACATALOG_TABS: [],
MPE_DATACATALOG_VARS: [],
MPE_DATASTATUS_CATS: [],
MPE_DATASTATUS_LIBS: [],
MPE_DATASTATUS_OBJS: [],
MPE_DATASTATUS_TABS: [],
MPE_DATADICTIONARY: [
{
tx_from: 0,
DD_TYPE: 'LIBRARY',
DD_SOURCE: 'DC_JSLIB',
DD_SHORTDESC: 'Data Controller Control Tables',
DD_LONGDESC: '# The Data Controller Library',
DD_OWNER: 'sasdemo',
DD_RESPONSIBLE: 'sasdemo',
DD_SENSITIVITY: 'Low',
tx_to: 127490111999
},
{
tx_from: 0,
DD_TYPE: 'TABLE',
DD_SOURCE: 'DC_JSLIB.MPE_TABLES',
DD_SHORTDESC: 'Configuration of new tables for Data Controller',
DD_LONGDESC: '# MPE_TABLES - adding new tabels to Data Controller',
DD_OWNER: 'sasdemo',
DD_RESPONSIBLE: 'sasdemo',
DD_SENSITIVITY: 'Low',
tx_to: 127490111999
},
{
tx_from: 0,
DD_TYPE: 'COLUMN',
DD_SOURCE: 'DC_JSLIB.MPE_TABLES.DSN',
DD_SHORTDESC: 'Dataset Name to be edited',
DD_LONGDESC: '_DSN_ - must be UPCASE',
DD_OWNER: 'sasdemo',
DD_RESPONSIBLE: 'sasdemo',
DD_SENSITIVITY: 'Low',
tx_to: 127490111999
},
{
tx_from: 0,
DD_TYPE: 'DIRECTORY',
DD_SOURCE: '/some/directory',
DD_SHORTDESC: 'Directory for some purpose',
DD_LONGDESC: 'This directory is great. It\'s great directory.\n It trumps all other directories.',
DD_OWNER: 'sasdemo',
DD_RESPONSIBLE: 'sasdemo',
DD_SENSITIVITY: 'Low',
tx_to: 127490111999
},
{
tx_from: 0,
DD_TYPE: 'TABLE',
DD_SOURCE: 'DC_JSLIB',
DD_SHORTDESC: 'Transaction table for capturing Data Controller users',
DD_LONGDESC: 'After a user accepts the Data Controller EULA they are registered as a user in this table.',
DD_OWNER: 'sasdemo',
DD_RESPONSIBLE: 'sasdemo',
DD_SENSITIVITY: 'Low',
tx_to: 127490111999
},
{
tx_from: 0,
DD_TYPE: 'COLUMN',
DD_SOURCE: 'DC_JSLIB.MPE_CONFIG.VAR_ACTIVE',
DD_SHORTDESC: 'Set to 1 to make an option active',
DD_LONGDESC: 'This value is used as a filter by data controller whenever querying for option settings.',
DD_OWNER: 'sasdemo',
DD_RESPONSIBLE: 'sasdemo',
DD_SENSITIVITY: 'Low',
tx_to: 127490111999
}
],
MPE_DATALOADS: [],
MPE_EMAILS: [],
MPE_EXCEL_CONFIG: [],
MPE_FILTERANYTABLE: [],
MPE_FILTERSOURCE: [],
MPE_GROUPS: [
{
tx_from: 0,
tx_to: 127490111999,
group_name: 'dc-admin',
group_desc: 'Custom Group for Data Controller Purposes',
user_name: 'allbow'
},
{
tx_from: 0,
tx_to: 127490111999,
group_name: 'dc-admin',
group_desc: 'Custom Group for Data Controller Purposes',
user_name: 'dctestuser1'
},
{
tx_from: 0,
tx_to: 127490111999,
group_name: 'dc-admin',
group_desc: 'Custom Group for Data Controller Purposes',
user_name: 'mihmed'
}
],
MPE_LINEAGE_COLS: [],
MPE_LINEAGE_TABS: [],
MPE_LOADS: [],
MPE_LOCKANYTABLE: [],
MPE_MAXKEYVALUES: [],
MPE_REQUESTS: [],
MPE_REVIEW: [],
MPE_ROW_LEVEL_SECURITY: [
{
tx_from: 0,
tx_to: 127490111999,
RLS_RK: 1,
RLS_SCOPE: 'ALL',
RLS_GROUP: 'dc-admin',
RLS_LIBREF: 'DC_JSLIB',
RLS_TABLE: 'MPE_GROUPS',
RLS_GROUP_LOGIC: 'AND',
RLS_SUBGROUP_LOGIC: 'OR',
RLS_SUBGROUP_ID: 0,
RLS_VARIABLE_NM: 'GROUP_NAME',
RLS_OPERATOR_NM: 'NE',
RLS_RAW_VALUE: '\'-1\'',
RLS_ACTIVE: 1
},
{
tx_from: 0,
tx_to: 127490111999,
RLS_RK: 2,
RLS_SCOPE: 'ALL',
RLS_GROUP: 'dc-admin',
RLS_LIBREF: 'DC_JSLIB',
RLS_TABLE: 'MPE_ROW_LEVEL_SECURITY',
RLS_GROUP_LOGIC: 'AND',
RLS_SUBGROUP_LOGIC: 'OR',
RLS_SUBGROUP_ID: 0,
RLS_VARIABLE_NM: 'RLS_RK',
RLS_OPERATOR_NM: '>',
RLS_RAW_VALUE: '0',
RLS_ACTIVE: 1
},
{
tx_from: 0,
tx_to: 127490111999,
RLS_RK: 3,
RLS_SCOPE: 'ALL',
RLS_GROUP: 'DC Demo Group',
RLS_LIBREF: 'DC_JSLIB',
RLS_TABLE: 'MPE_SECURITY',
RLS_GROUP_LOGIC: 'AND',
RLS_SUBGROUP_LOGIC: 'OR',
RLS_SUBGROUP_ID: 0,
RLS_VARIABLE_NM: 'ACCESS_LEVEL',
RLS_OPERATOR_NM: 'NE',
RLS_RAW_VALUE: '\'N/A\'',
RLS_ACTIVE: 1
}
],
MPE_SECURITY: [
{
tx_from: 0,
tx_to: 127490111999,
libref: '*ALL*',
dsn: '*ALL*',
access_level: 'APPROVE',
sas_group: 'dc-admin'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: '*ALL*',
dsn: '*ALL*',
access_level: 'EDIT',
sas_group: 'dc-admin'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: '*ALL*',
dsn: '*ALL*',
access_level: 'VIEW',
sas_group: 'AllUsers'
}
],
MPE_SELECTBOX: [
{
selectbox_rk: 1,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_LOCKANYTABLE',
base_column: 'LOCK_STATUS_CD',
selectbox_value: 'LOCKED',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 2,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_LOCKANYTABLE',
base_column: 'LOCK_STATUS_CD',
selectbox_value: 'UNLOCKED',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 3,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DERIVED',
base_column: 'VAR_TYPE',
selectbox_value: 'C',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 4,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DERIVED',
base_column: 'VAR_TYPE',
selectbox_value: 'N',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 5,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DERIVED',
base_column: 'ACTIVE',
selectbox_value: '1',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 6,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DERIVED',
base_column: 'ACTIVE',
selectbox_value: '0',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 7,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_SECURITY',
base_column: 'ACCESS_LEVEL',
selectbox_value: 'EDIT',
selectbox_order: 0,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 8,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_SECURITY',
base_column: 'ACCESS_LEVEL',
selectbox_value: 'APPROVE',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 9,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_SECURITY',
base_column: 'ACCESS_LEVEL',
selectbox_value: 'VIEW',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 10,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_SECURITY',
base_column: 'ACCESS_LEVEL',
selectbox_value: 'SIGNOFF',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 11,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_TABLES',
base_column: 'LOADTYPE',
selectbox_value: 'UPDATE',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 12,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_TABLES',
base_column: 'LOADTYPE',
selectbox_value: 'REPLACE',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 13,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_TABLES',
base_column: 'LOADTYPE',
selectbox_value: 'TXTEMPORAL',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 14,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_TABLES',
base_column: 'LOADTYPE',
selectbox_value: 'BITEMPORAL',
selectbox_order: 4,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 15,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_TABLES',
base_column: 'LOADTYPE',
selectbox_value: 'FORMAT_CAT',
selectbox_order: 5,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 16,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ALERTS',
base_column: 'ALERT_EVENT',
selectbox_value: '*ALL*',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 17,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ALERTS',
base_column: 'ALERT_EVENT',
selectbox_value: 'SUBMITTED',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 18,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ALERTS',
base_column: 'ALERT_EVENT',
selectbox_value: 'APPROVED',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 19,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ALERTS',
base_column: 'ALERT_EVENT',
selectbox_value: 'REJECTED',
selectbox_order: 4,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 20,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_X_TEST',
base_column: 'SOME_DROPDOWN',
selectbox_value: 'Option 1',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 21,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_X_TEST',
base_column: 'SOME_DROPDOWN',
selectbox_value: 'Option 2',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 22,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_X_TEST',
base_column: 'SOME_DROPDOWN',
selectbox_value: 'Option 3',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 23,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_X_TEST',
base_column: 'SOME_DROPDOWN',
selectbox_value: 'This is a long option. This option is very long. It is optional, though.',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 24,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'CASE',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 25,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'HARDSELECT',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 26,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'HARDSELECT_HOOK',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 27,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'HIDDEN',
selectbox_order: 4,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 28,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'MAXVAL',
selectbox_order: 5,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 29,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'MINVAL',
selectbox_order: 6,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 30,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'NOTNULL',
selectbox_order: 7,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 31,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'NUMBER_FORMAT',
selectbox_order: 8,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 32,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'READONLY',
selectbox_order: 9,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 33,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'ROUND',
selectbox_order: 10,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 34,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'SOFTSELECT',
selectbox_order: 11,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 35,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'SOFTSELECT_HOOK',
selectbox_order: 12,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 36,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'HARDREGEX',
selectbox_order: 13,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 37,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'SOFTREGEX',
selectbox_order: 14,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 38,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'HARDFORMULA',
selectbox_order: 15,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 39,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_TYPE',
selectbox_value: 'SOFTFORMULA',
selectbox_order: 16,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 40,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_ACTIVE',
selectbox_value: '1',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 41,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_VALIDATIONS',
base_column: 'RULE_ACTIVE',
selectbox_value: '0',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 42,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_SECURITY',
base_column: 'DSN',
selectbox_value: '*ALL*',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 43,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DATADICTIONARY',
base_column: 'DD_TYPE',
selectbox_value: 'COLUMN',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 44,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DATADICTIONARY',
base_column: 'DD_TYPE',
selectbox_value: 'TABLE',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 45,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DATADICTIONARY',
base_column: 'DD_TYPE',
selectbox_value: 'LIBRARY',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 46,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DATADICTIONARY',
base_column: 'DD_TYPE',
selectbox_value: 'CATALOG',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 47,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_DATADICTIONARY',
base_column: 'DD_TYPE',
selectbox_value: 'FORMAT',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 48,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_SECURITY',
base_column: 'LIBREF',
selectbox_value: '*ALL*',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 49,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_SECURITY',
base_column: 'ACCESS_LEVEL',
selectbox_value: 'AUDIT',
selectbox_order: 4,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 50,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_SCOPE',
selectbox_value: 'ALL',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 51,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_SCOPE',
selectbox_value: 'EDIT',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 52,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_SCOPE',
selectbox_value: 'VIEW',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 53,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_GROUP_LOGIC',
selectbox_value: 'AND',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 54,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_GROUP_LOGIC',
selectbox_value: 'OR',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 55,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_SUBGROUP_LOGIC',
selectbox_value: 'AND',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 56,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_SUBGROUP_LOGIC',
selectbox_value: 'OR',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 57,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: '=',
selectbox_order: 0,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 58,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: '>',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 59,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: '<',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 60,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: '<=',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 61,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: '>=',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 62,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: 'BETWEEN',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 63,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: 'IN',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 64,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: 'NOT IN',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 65,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: 'NE',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 66,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_OPERATOR_NM',
selectbox_value: 'CONTAINS',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 67,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_EXCEL_CONFIG',
base_column: 'XL_RULE',
selectbox_value: 'FORMULA',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 68,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_ACTIVE',
selectbox_value: '1',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 69,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_ROW_LEVEL_SECURITY',
base_column: 'RLS_ACTIVE',
selectbox_value: '0',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 70,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_column: 'CLS_ACTIVE',
selectbox_value: '1',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 71,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_column: 'CLS_ACTIVE',
selectbox_value: '0',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 72,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_column: 'CLS_SCOPE',
selectbox_value: 'EDIT',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 73,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_column: 'CLS_SCOPE',
selectbox_value: 'VIEW',
selectbox_order: 2,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 74,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_column: 'CLS_SCOPE',
selectbox_value: 'ALL',
selectbox_order: 3,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 75,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_column: 'CLS_HIDE',
selectbox_value: '0',
selectbox_order: 1,
ver_to_dttm: 127490111999
},
{
selectbox_rk: 76,
ver_from_dttm: 0,
select_lib: 'DC_JSLIB',
select_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_column: 'CLS_HIDE',
selectbox_value: '1',
selectbox_order: 2,
ver_to_dttm: 127490111999
}
],
MPE_SIGNOFFS: [],
MPE_SUBMIT: [],
MPE_TABLES: [
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_COLUMN_LEVEL_SECURITY',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO',
buskey: 'CLS_SCOPE CLS_GROUP CLS_LIBREF CLS_TABLE CLS_VARIABLE_NM',
notes: 'Docs: https://docs.datacontroller.io/column-level-security',
post_edit_hook: 'services/hooks/mpe_column_level_security_postedit'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_XLMAP_INFO',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO',
buskey: 'XLMAP_ID',
notes: 'Docs: https://docs.datacontroller.io/complex-excel-uploads',
post_edit_hook: 'services/hooks/mpe_xlmap_info_postedit'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_XLMAP_RULES',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO',
buskey: 'XLMAP_ID XLMAP_RANGE_ID',
notes: 'Docs: https://docs.datacontroller.io/complex-excel-uploads',
post_edit_hook: 'services/hooks/mpe_xlmap_rules_postedit'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_XLMAP_DATA',
num_of_approvals_required: 1,
loadtype: 'UPDATE',
buskey: 'LOAD_REF XLMAP_ID XLMAP_RANGE_ID ROW_NO COL_NO',
notes: 'Docs: https://docs.datacontroller.io/complex-excel-uploads'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_LOCKANYTABLE',
num_of_approvals_required: 1,
loadtype: 'UPDATE',
buskey: 'LOCK_LIB LOCK_DS',
notes: 'This table may be edited when a process failed and left a lock'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_TABLES',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'LIBREF DSN',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO',
notes: 'This entry allows the MP Editor to edit itself!',
post_edit_hook: 'services/hooks/mpe_tables_postedit'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_SECURITY',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'LIBREF DSN ACCESS_LEVEL SAS_GROUP',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO',
notes: 'Determines which groups can view/edit/approve which tables',
post_edit_hook: 'services/hooks/mpe_security_postedit'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_SELECTBOX',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'SELECTBOX_RK',
var_txfrom: 'VER_FROM_DTTM',
var_txto: 'VER_TO_DTTM',
notes: 'Can configure dropdowns for the front end',
rk_underlying: 'SELECT_LIB SELECT_DS BASE_COLUMN SELECTBOX_VALUE'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_X_TEST',
num_of_approvals_required: 1,
loadtype: 'UPDATE',
buskey: 'PRIMARY_KEY_FIELD',
notes: 'Test table for controller'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_EMAILS',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'USER_NAME',
notes: 'Primary Emails Table (backup is metadata)',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_CONFIG',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'VAR_SCOPE VAR_NAME',
notes: 'Configuration variables for Data Controller',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_ALERTS',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'ALERT_EVENT ALERT_LIB ALERT_DS ALERT_USER',
notes: 'Configuration for alert email events',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_GROUPS',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'GROUP_NAME USER_NAME',
notes: 'Configuration for additional groups within Data Controller',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_VALIDATIONS',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'BASE_LIB BASE_DS BASE_COL RULE_TYPE',
notes: 'Configuration of data quality rules in Editor component',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO',
post_edit_hook: 'services/hooks/mpe_validations_postedit'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_DATADICTIONARY',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'DD_TYPE DD_SOURCE',
notes: 'Configuration of data dictionary',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_DERIVED',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'LIBREF DSN VAR_NM',
post_edit_hook: 'services/hooks/mpe_derived_postedit',
notes: 'Derived (computed) variables for the EDIT screen',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_EXCEL_CONFIG',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'XL_LIBREF XL_TABLE XL_COLUMN',
notes: 'Configuration of the excel import rules',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_ROW_LEVEL_SECURITY',
num_of_approvals_required: 1,
loadtype: 'TXTEMPORAL',
buskey: 'RLS_RK',
notes: 'Configuration of Row Level Security',
var_txfrom: 'TX_FROM',
var_txto: 'TX_TO',
rk_underlying: 'RLS_SCOPE RLS_GROUP RLS_LIBREF RLS_TABLE RLS_GROUP_LOGIC RLS_SUBGROUP_LOGIC RLS_SUBGROUP_ID RLS_VARIABLE_NM RLS_OPERATOR_NM RLS_RAW_VALUE ',
post_edit_hook: 'services/hooks/mpe_row_level_security_postedit'
},
{
tx_from: 0,
tx_to: 127490111999,
libref: 'DC_JSLIB',
dsn: 'MPE_X_CATALOG-FC',
num_of_approvals_required: 1,
loadtype: 'FORMAT_CAT',
buskey: 'TYPE FMTNAME FMTROW',
notes: 'Sample Format Catalog'
}
],
MPE_USERS: [],
MPE_VALIDATIONS: [
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_SCOPE',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_LIBREF',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_LIBREF',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/libraries_all',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_TABLE',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_TABLE',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/tables_all',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_VARIABLE_NM',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_VARIABLE_NM',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_ACTIVE',
rule_type: 'MAXVAL',
rule_value: '1',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_HIDE',
rule_type: 'MAXVAL',
rule_value: '1',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_COLUMN_LEVEL_SECURITY',
base_col: 'CLS_GROUP',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/sas_groups',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_ALERTS',
base_col: 'ALERT_LIB',
rule_type: 'HARDSELECT_HOOK',
rule_value: 'services/validations/mpe_alerts.alert_lib',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_XLMAP_INFO',
base_col: 'XLMAP_ID',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_XLMAP_RULES',
base_col: 'XLMAP_ID',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'LIBREF',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'DSN',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'LIBREF',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'DSN',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'NUM_OF_APPROVALS_REQUIRED',
rule_type: 'MINVAL',
rule_value: '1',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'BUSKEY',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'BUSKEY',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_TXFROM',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_TXTO',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_BUSFROM',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_BUSTO',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_SECURITY',
base_col: 'LIBREF',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_PROCESSED',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_SECURITY',
base_col: 'LIBREF',
rule_type: 'HARDSELECT',
rule_value: 'DC_JSLIB.MPE_TABLES.LIBREF',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_SECURITY',
base_col: 'DSN',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_SECURITY',
base_col: 'DSN',
rule_type: 'SOFTSELECT',
rule_value: 'DC_JSLIB.MPE_TABLES.DSN',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_SECURITY',
base_col: 'SAS_GROUP',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/sas_groups',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_VALIDATIONS',
base_col: 'BASE_LIB',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/libraries_editable',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_VALIDATIONS',
base_col: 'BASE_DS',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/tables_editable',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_VALIDATIONS',
base_col: 'BASE_COL',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_VALIDATIONS',
base_col: 'RULE_ACTIVE',
rule_type: 'MINVAL',
rule_value: '0',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_VALIDATIONS',
base_col: 'RULE_ACTIVE',
rule_type: 'MAXVAL',
rule_value: '1',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_EXCEL_CONFIG',
base_col: 'XL_LIBREF',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/libraries_editable',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_EXCEL_CONFIG',
base_col: 'XL_TABLE',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/tables_editable',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_EXCEL_CONFIG',
base_col: 'XL_COLUMN',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'LIBREF',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/libraries_all',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'DSN',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/mpe_tables.dsn',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_TXFROM',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_TXTO',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_BUSFROM',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_BUSTO',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_TABLES',
base_col: 'VAR_PROCESSED',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'LIBREF',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'LIBREF',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'LIBREF',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/libraries_editable',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'DSN',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'DSN',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'DSN',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/tables_editable',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_NM',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_NM',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_NM',
rule_type: 'HARDREGEX',
rule_value: '^[A-Za-z_][A-Za-z0-9_]*$',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_DEPS',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_DEPS',
rule_type: 'HARDREGEX',
rule_value: '^[A-Za-z0-9_ ]*$',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_TYPE',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_TYPE',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_TYPE',
rule_type: 'HARDSELECT',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'ACTIVE',
rule_type: 'NOTNULL',
rule_value: '1',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_LEN',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_LEN',
rule_type: 'MINVAL',
rule_value: '1',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_LEN',
rule_type: 'MAXVAL',
rule_value: '32767',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_FMT',
rule_type: 'CASE',
rule_value: 'UPCASE',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_FMT',
rule_type: 'HARDREGEX',
rule_value: '^(\\$?[A-Za-z][A-Za-z0-9_]*(\\.[0-9]+)?\\.?|\\$?[0-9]+(\\.[0-9]+)?\\.?)?$',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_LOGIC',
rule_type: 'NOTNULL',
rule_value: ' ',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_LABEL',
rule_type: 'HARDREGEX',
rule_value: '^[^\\x00-\\x1F\\x7F]*$',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_DERIVED',
base_col: 'VAR_LOGIC',
rule_type: 'HARDREGEX',
rule_value: '^(?!.*(/\\*|\\*/))[^;&%]*$',
rule_active: 1
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_SELECTBOX',
base_col: 'SELECT_LIB',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/libraries_editable',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_SELECTBOX',
base_col: 'SELECT_DS',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/tables_editable',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_SELECTBOX',
base_col: 'BASE_COLUMN',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_ROW_LEVEL_SECURITY',
base_col: 'RLS_GROUP',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/sas_groups',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_ROW_LEVEL_SECURITY',
base_col: 'RLS_LIBREF',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/libraries_all',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_ROW_LEVEL_SECURITY',
base_col: 'RLS_TABLE',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/tables_all',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_ROW_LEVEL_SECURITY',
base_col: 'RLS_SUBGROUP_ID',
rule_type: 'MINVAL',
rule_value: '0',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_ROW_LEVEL_SECURITY',
base_col: 'RLS_SUBGROUP_ID',
rule_type: 'NOTNULL',
rule_value: '0',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_ROW_LEVEL_SECURITY',
base_col: 'RLS_VARIABLE_NM',
rule_type: 'SOFTSELECT_HOOK',
rule_value: 'services/validations/columns_in_libds',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_X_TEST',
base_col: 'SOME_BESTNUM',
rule_type: 'SOFTSELECT',
rule_value: 'DC_JSLIB.MPE_X_TEST.SOME_BESTNUM',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_X_TEST',
base_col: 'SOME_CHAR',
rule_type: 'HARDREGEX',
rule_value: '/the|data/i',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_X_TEST',
base_col: 'SOME_CHAR',
rule_type: 'SOFTREGEX',
rule_value: '/t/',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_X_TEST',
base_col: 'PRIMARY_KEY_FIELD',
rule_type: 'SOFTREGEX',
rule_value: '/^\\d+$/',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_X_TEST',
base_col: 'SOME_SHORTNUM',
rule_type: 'HARDREGEX',
rule_value: '/^(?![1-5](\\.\\d+)?$).*/',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_X_TEST',
base_col: 'SOME_NUM',
rule_type: 'HARDSELECT_HOOK',
rule_value: 'services/validations/mpe_x_test.some_num',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_EXCEL_CONFIG',
base_col: 'XL_ACTIVE',
rule_type: 'MINVAL',
rule_value: '0',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_EXCEL_CONFIG',
base_col: 'XL_ACTIVE',
rule_type: 'MAXVAL',
rule_value: '1',
rule_active: 1,
tx_to: 127490111999
},
{
tx_from: 0,
base_lib: 'DC_JSLIB',
base_ds: 'MPE_XLMAP_INFO',
base_col: 'XLMAP_ID',
rule_type: 'SOFTSELECT',
rule_value: 'DC_JSLIB.MPE_XLMAP_RULES.XLMAP_ID',
rule_active: 1,
tx_to: 127490111999
}
],
MPE_DERIVED: [],
MPE_X_TEST: [
{
PRIMARY_KEY_FIELD: 0,
SOME_CHAR: 'this is dummy data',
SOME_DROPDOWN: 'Option 1',
SOME_NUM: 42,
SOME_DATE: 42,
SOME_DATETIME: 42,
SOME_TIME: 42,
SOME_SHORTNUM: 8,
SOME_BESTNUM: 44
},
{
PRIMARY_KEY_FIELD: 1,
SOME_CHAR: 'more dummy data',
SOME_DROPDOWN: 'Option 2',
SOME_NUM: 42,
SOME_DATE: 42,
SOME_DATETIME: 42,
SOME_TIME: 422,
SOME_SHORTNUM: 8,
SOME_BESTNUM: 44
},
{
PRIMARY_KEY_FIELD: 2,
SOME_CHAR: 'even more dummy data',
SOME_DROPDOWN: 'Option 3',
SOME_NUM: 42,
SOME_DATE: 42,
SOME_DATETIME: 42,
SOME_TIME: 142,
SOME_SHORTNUM: 8,
SOME_BESTNUM: 44
},
{
PRIMARY_KEY_FIELD: 3,
SOME_CHAR: 'It was a dark and stormy night. The wind was blowing\'\n !!\' a gale! The captain said to his mate - mate, tell us a tale. And\'\n !!\' this, is the tale he told: It was a dark and stormy night. The wind was blowing\'\n !!\' a gale! The captain said to his mate - mate, tell us a tale. And\'\n !!\' this, is the tale he told: It was a dark and stormy night. The wind was blowing\'\n !!\' a gale! The captain said to his mate - mate, tell us a tale. And\'\n !!\' this, is the tale he told: It was a dark and stormy night. The wind was blowing\'\n !!\' a gale! The captain said to his mate - mate, tell us a tale. And\'\n !!\' this, is the tale he told: ',
SOME_DROPDOWN: 'Option 2',
SOME_NUM: 1613.001,
SOME_DATE: 423,
SOME_DATETIME: 423,
SOME_TIME: 44,
SOME_SHORTNUM: 8,
SOME_BESTNUM: 44
},
{
PRIMARY_KEY_FIELD: 4,
SOME_CHAR: 'if you can fill the unforgiving minute',
SOME_DROPDOWN: 'Option 1',
SOME_NUM: 1613.001123456,
SOME_DATE: 4231,
SOME_DATETIME: 423123123,
SOME_TIME: 412,
SOME_SHORTNUM: 8,
SOME_BESTNUM: 44
},
{
PRIMARY_KEY_FIELD: 5,
SOME_CHAR: '= testing the formula situation',
SOME_DROPDOWN: 'Option 1',
SOME_NUM: 42,
SOME_DATE: 42,
SOME_DATETIME: 42,
SOME_TIME: 42,
SOME_SHORTNUM: 8,
SOME_BESTNUM: 44
},
{
PRIMARY_KEY_FIELD: 6,
SOME_CHAR: '\'=the formula with leading apostrophe',
SOME_DROPDOWN: 'Option 1',
SOME_NUM: 42,
SOME_DATE: 42,
SOME_DATETIME: 42,
SOME_TIME: 42,
SOME_SHORTNUM: 8,
SOME_BESTNUM: 44
}
],
MPE_X_CATALOG: [],
MPE_XLMAP_DATA: [],
MPE_XLMAP_INFO: [
{
tx_from: 0,
tx_to: 127490111999,
XLMAP_ID: 'BASEL-KM1',
XLMAP_DESCRIPTION: 'Basel 3 Key Metrics report',
XLMAP_TARGETLIBDS: 'DC_JSLIB.MPE_XLMAP_DATA'
}
],
MPE_XLMAP_RULES: [
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:a',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH 4 R[2]C[0]:a'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:b',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH 4 R[2]C[0]:b'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:c',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH 4 R[2]C[0]:c'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:d',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH 4 R[2]C[0]:d'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:e',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH 4 R[2]C[0]:e'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:f',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH 4 R[2]C[0]:f'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:1/a',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH C R[0]C[1]:Common Equity Tier 1 (CET1)'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:1/b',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH C R[0]C[2]:Common Equity Tier 1 (CET1)'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:1/c',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH C R[0]C[3]:Common Equity Tier 1 (CET1)'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:1/d',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH C R[0]C[4]:Common Equity Tier 1 (CET1)'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:1/e',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH C R[0]C[5]:Common Equity Tier 1 (CET1)'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:1/f',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH C R[0]C[6]:Common Equity Tier 1 (CET1)'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:1a/e',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH C R[1]C[5]:Common Equity Tier 1 (CET1)'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:1a/f',
xlmap_sheet: 'KM1',
xlmap_start: 'MATCH C R[1]C[6]:Common Equity Tier 1 (CET1)'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:2/a',
xlmap_sheet: 'KM1',
xlmap_start: 'ABSOLUTE D10'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:2/b',
xlmap_sheet: '/3',
xlmap_start: 'ABSOLUTE E10'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:2/c',
xlmap_sheet: '/3',
xlmap_start: 'RELATIVE R[10]C[6]'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:2/d',
xlmap_sheet: '/3',
xlmap_start: 'RELATIVE R[10]C[8]'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:2/e',
xlmap_sheet: '/3',
xlmap_start: 'RELATIVE R[10]C[9]'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:2/f',
xlmap_sheet: '/3',
xlmap_start: 'RELATIVE R[10]C[10]'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:2a',
xlmap_sheet: 'KM1',
xlmap_start: 'ABSOLUTE H11',
xlmap_finish: 'RELATIVE R[0]C[1]'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-KM1',
xlmap_range_id: 'KM1:3',
xlmap_sheet: 'KM1',
xlmap_start: 'RELATIVE R[12]C[4]',
xlmap_finish: 'ABSOLUTE I13'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-CR2',
xlmap_range_id: 'CR2-sec1',
xlmap_sheet: 'CR2',
xlmap_start: 'ABSOLUTE D8',
xlmap_finish: 'BLANKROW'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'BASEL-CR2',
xlmap_range_id: 'CR2-sec2',
xlmap_sheet: 'CR2',
xlmap_start: 'ABSOLUTE D18',
xlmap_finish: 'LASTDOWN'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'SAMPLE',
xlmap_range_id: 'header',
xlmap_sheet: '/1',
xlmap_start: 'ABSOLUTE B3',
xlmap_finish: 'ABSOLUTE B8'
},
{
tx_from: 0,
tx_to: 127490111999,
xlmap_id: 'SAMPLE',
xlmap_range_id: 'data',
xlmap_sheet: '/1',
xlmap_start: 'ABSOLUTE B13',
xlmap_finish: 'ABSOLUTE E16'
}
]
}
/*
mpe_makedata.sas stores the resolved library path here
(cats(symget('path'),'/dc_macros')); the mock has no macro engine to resolve
it, so the value is the drive path the services use, as settings.js does.
*/
tables.MPE_CONFIG.find(function (row) {
return row.var_name === 'DC_MACROS'
}).var_value = dataDir + '/dc_macros'
const schema = {
MPE_ALERTS: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: false
},
{
name: 'alert_event',
type: 'C',
length: 20,
format: '',
label: '',
notnull: false
},
{
name: 'alert_lib',
type: 'C',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'alert_ds',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'alert_user',
type: 'C',
length: 100,
format: '',
label: '',
notnull: false
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
}
],
MPE_AUDIT: [
{
name: 'load_ref',
type: 'C',
length: 36,
format: '',
label: 'unique load reference',
notnull: false
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Reference (8 chars)',
notnull: false
},
{
name: 'dsn',
type: 'C',
length: 32,
format: '',
label: 'Dataset Name (32 chars)',
notnull: false
},
{
name: 'key_hash',
type: 'C',
length: 32,
format: '',
label: 'MD5 Hash of primary key values (pipe seperated)',
notnull: false
},
{
name: 'tgtvar_nm',
type: 'C',
length: 32,
format: '',
label: 'Target variable name (32 chars)',
notnull: false
},
{
name: 'move_type',
type: 'C',
length: 1,
format: '',
label: 'Either (A)ppended, (D)eleted or (M)odified',
notnull: false
},
{
name: 'processed_dttm',
type: 'N',
length: 8,
format: 'E8601DT26.6',
label: 'Processed at timestamp',
notnull: false
},
{
name: 'is_pk',
type: 'N',
length: 8,
format: '',
label: 'Is Primary Key Field? (1/0)',
notnull: false
},
{
name: 'is_diff',
type: 'N',
length: 8,
format: '',
label: 'Did value change? (1/0/-1). Always -1 for appends and deletes.',
notnull: false
},
{
name: 'tgtvar_type',
type: 'C',
length: 1,
format: '',
label: 'Either (C)haracter or (N)umeric',
notnull: false
},
{
name: 'oldval_num',
type: 'N',
length: 8,
format: 'best32.',
label: 'Old (numeric) value',
notnull: false
},
{
name: 'newval_num',
type: 'N',
length: 8,
format: 'best32.',
label: 'New (numeric) value',
notnull: false
},
{
name: 'oldval_char',
type: 'C',
length: 32765,
format: '',
label: 'Old (character) value',
notnull: false
},
{
name: 'newval_char',
type: 'C',
length: 32765,
format: '',
label: 'New (character) value',
notnull: false
}
],
MPE_COLUMN_LEVEL_SECURITY: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'CLS_SCOPE',
type: 'C',
length: 4,
format: '',
label: '',
notnull: true
},
{
name: 'CLS_GROUP',
type: 'C',
length: 64,
format: '',
label: '',
notnull: true
},
{
name: 'CLS_LIBREF',
type: 'C',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'CLS_TABLE',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'CLS_VARIABLE_NM',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'CLS_ACTIVE',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'CLS_HIDE',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
}
],
MPE_CONFIG: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'var_scope',
type: 'C',
length: 10,
format: '',
label: '',
notnull: true
},
{
name: 'var_name',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'var_value',
type: 'C',
length: 5000,
format: '',
label: '',
notnull: false
},
{
name: 'var_active',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'var_desc',
type: 'C',
length: 300,
format: '',
label: '',
notnull: false
}
],
MPE_DATACATALOG_CATS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: false
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Name',
notnull: false
},
{
name: 'memname',
type: 'C',
length: 64,
format: '',
label: 'Member Name',
notnull: false
}
],
MPE_DATACATALOG_LIBS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Ref',
notnull: false
},
{
name: 'engine',
type: 'C',
length: 32,
format: '',
label: 'Library Engine',
notnull: false
},
{
name: 'libname',
type: 'C',
length: 256,
format: '$256.',
label: 'Library Name',
notnull: false
},
{
name: 'paths',
type: 'C',
length: 8192,
format: '',
label: 'Library Paths',
notnull: false
},
{
name: 'perms',
type: 'C',
length: 500,
format: '',
label: 'Library Permissions (if BASE)',
notnull: false
},
{
name: 'owners',
type: 'C',
length: 500,
format: '',
label: 'Library Owners (if BASE)',
notnull: false
},
{
name: 'schemas',
type: 'C',
length: 500,
format: '',
label: 'Library Schemas (if DB)',
notnull: false
},
{
name: 'libid',
type: 'C',
length: 17,
format: '',
label: 'LibraryId',
notnull: false
}
],
MPE_DATACATALOG_OBJS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Name',
notnull: true
},
{
name: 'memname',
type: 'C',
length: 64,
format: '',
label: 'Member Name',
notnull: true
},
{
name: 'objname',
type: 'C',
length: 32,
format: '',
label: 'Object Name',
notnull: true
},
{
name: 'objtype',
type: 'C',
length: 8,
format: '',
label: 'Object Type',
notnull: true
},
{
name: 'objdesc',
type: 'C',
length: 256,
format: '',
label: 'Object Description',
notnull: false
},
{
name: 'alias',
type: 'C',
length: 32,
format: '',
label: 'Object Alias',
notnull: false
}
],
MPE_DATACATALOG_TABS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Name',
notnull: false
},
{
name: 'dsn',
type: 'C',
length: 64,
format: '',
label: 'Member Name',
notnull: false
},
{
name: 'memtype',
type: 'C',
length: 8,
format: '',
label: 'Member Type',
notnull: false
},
{
name: 'dbms_memtype',
type: 'C',
length: 32,
format: '',
label: 'DBMS Member Type',
notnull: false
},
{
name: 'memlabel',
type: 'C',
length: 512,
format: '',
label: 'Data Set Label',
notnull: false
},
{
name: 'typemem',
type: 'C',
length: 8,
format: '',
label: 'Data Set Type',
notnull: false
},
{
name: 'nvar',
type: 'N',
length: 8,
format: '',
label: 'Number of Variables',
notnull: false
},
{
name: 'compress',
type: 'C',
length: 8,
format: '',
label: 'Compression Routine',
notnull: false
},
{
name: 'pk_fields',
type: 'C',
length: 512,
format: '',
label: 'Primary Key Fields - in a constraint being both Unique and Not Null',
notnull: false
}
],
MPE_DATACATALOG_VARS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Name',
notnull: false
},
{
name: 'dsn',
type: 'C',
length: 64,
format: '',
label: 'Table Name',
notnull: false
},
{
name: 'name',
type: 'C',
length: 64,
format: '',
label: 'Column Name',
notnull: false
},
{
name: 'memtype',
type: 'C',
length: 8,
format: '',
label: 'Member Type',
notnull: false
},
{
name: 'type',
type: 'C',
length: 16,
format: '',
label: 'Column Type',
notnull: false
},
{
name: 'length',
type: 'N',
length: 8,
format: '',
label: 'Column Length',
notnull: false
},
{
name: 'varnum',
type: 'N',
length: 8,
format: '',
label: 'Column Number in Table',
notnull: false
},
{
name: 'label',
type: 'C',
length: 512,
format: '',
label: 'Column Label',
notnull: false
},
{
name: 'format',
type: 'C',
length: 49,
format: '',
label: 'Column Format',
notnull: false
},
{
name: 'idxusage',
type: 'C',
length: 9,
format: '',
label: 'Column Index Type',
notnull: false
},
{
name: 'notnull',
type: 'C',
length: 3,
format: '',
label: 'Not NULL?',
notnull: false
},
{
name: 'pk_ind',
type: 'N',
length: 8,
format: '',
label: 'Primary Key Indicator (1=Primary Key field)',
notnull: false
}
],
MPE_DATASTATUS_CATS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: false
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: false
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Name',
notnull: false
},
{
name: 'memname',
type: 'C',
length: 64,
format: '',
label: 'Member Name',
notnull: false
},
{
name: 'nobjs',
type: 'N',
length: 8,
format: '',
label: 'Number of objects',
notnull: true
},
{
name: 'created',
type: 'N',
length: 8,
format: 'DATETIME.',
label: 'Date Created',
notnull: true
},
{
name: 'modified',
type: 'N',
length: 8,
format: 'DATETIME.',
label: 'Date Modified',
notnull: false
}
],
MPE_DATASTATUS_LIBS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Name',
notnull: false
},
{
name: 'libsize',
type: 'N',
length: 8,
format: 'SIZEKMG.',
label: 'Size of library',
notnull: false
},
{
name: 'table_cnt',
type: 'N',
length: 8,
format: '',
label: 'Number of Tables',
notnull: false
},
{
name: 'catalog_cnt',
type: 'N',
length: 8,
format: '',
label: 'Number of Catalogs',
notnull: false
}
],
MPE_DATASTATUS_OBJS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Name',
notnull: false
},
{
name: 'memname',
type: 'C',
length: 64,
format: '',
label: 'Member Name',
notnull: false
},
{
name: 'objname',
type: 'C',
length: 32,
format: '',
label: 'Object Name',
notnull: false
},
{
name: 'objtype',
type: 'C',
length: 8,
format: '',
label: 'Object Type',
notnull: false
},
{
name: 'created',
type: 'N',
length: 8,
format: 'DATETIME.',
label: 'Date Created',
notnull: true
},
{
name: 'modified',
type: 'N',
length: 8,
format: 'DATETIME.',
label: 'Date Modified',
notnull: false
},
{
name: 'level',
type: 'N',
length: 8,
format: '',
label: 'Library Concatenation Level',
notnull: false
}
],
MPE_DATASTATUS_TABS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: 'Library Name',
notnull: false
},
{
name: 'dsn',
type: 'C',
length: 64,
format: '',
label: 'Member Name',
notnull: false
},
{
name: 'filesize',
type: 'N',
length: 8,
format: 'SIZEKMG.',
label: 'Size of file',
notnull: false
},
{
name: 'crdate',
type: 'N',
length: 8,
format: 'DATETIME.',
label: 'Date Created',
notnull: false
},
{
name: 'modate',
type: 'N',
length: 8,
format: 'DATETIME.',
label: 'Date Modified',
notnull: false
},
{
name: 'nobs',
type: 'N',
length: 8,
format: '',
label: 'Number of Physical (Actual, inc. deleted) Observations',
notnull: false
}
],
MPE_DATADICTIONARY: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'DD_TYPE',
type: 'C',
length: 16,
format: '',
label: '',
notnull: false
},
{
name: 'DD_SOURCE',
type: 'C',
length: 1024,
format: '',
label: '',
notnull: false
},
{
name: 'DD_SHORTDESC',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'DD_LONGDESC',
type: 'C',
length: 32767,
format: '',
label: '',
notnull: false
},
{
name: 'DD_OWNER',
type: 'C',
length: 128,
format: '',
label: '',
notnull: false
},
{
name: 'DD_RESPONSIBLE',
type: 'C',
length: 128,
format: '',
label: '',
notnull: false
},
{
name: 'DD_SENSITIVITY',
type: 'C',
length: 64,
format: '',
label: '',
notnull: false
}
],
MPE_DATALOADS: [
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'dsn',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'etlsource',
type: 'C',
length: 100,
format: '',
label: '',
notnull: true
},
{
name: 'loadtype',
type: 'C',
length: 20,
format: '',
label: '',
notnull: true
},
{
name: 'changed_records',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'new_records',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'deleted_records',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'duration',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'user_nm',
type: 'C',
length: 50,
format: '',
label: '',
notnull: true
},
{
name: 'processed_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: false
},
{
name: 'mac_ver',
type: 'C',
length: 5,
format: '',
label: '',
notnull: false
}
],
MPE_EMAILS: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'user_name',
type: 'C',
length: 50,
format: '',
label: '',
notnull: true
},
{
name: 'user_displayname',
type: 'C',
length: 100,
format: '',
label: '',
notnull: false
},
{
name: 'user_email',
type: 'C',
length: 100,
format: '',
label: '',
notnull: true
}
],
MPE_EXCEL_CONFIG: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'xl_libref',
type: 'C',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'xl_table',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'xl_column',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'xl_rule',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'xl_active',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
}
],
MPE_FILTERANYTABLE: [
{
name: 'filter_rk',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'filter_hash',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'filter_table',
type: 'C',
length: 41,
format: '',
label: '',
notnull: true
},
{
name: 'processed_dttm',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: true
}
],
MPE_FILTERSOURCE: [
{
name: 'filter_hash',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'filter_line',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'group_logic',
type: 'C',
length: 3,
format: '',
label: '',
notnull: true
},
{
name: 'subgroup_logic',
type: 'C',
length: 3,
format: '',
label: '',
notnull: true
},
{
name: 'subgroup_id',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'variable_nm',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'operator_nm',
type: 'C',
length: 12,
format: '',
label: '',
notnull: true
},
{
name: 'raw_value',
type: 'C',
length: 4000,
format: '',
label: '',
notnull: true
},
{
name: 'processed_dttm',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: true
}
],
MPE_GROUPS: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'group_name',
type: 'C',
length: 100,
format: '',
label: '',
notnull: true
},
{
name: 'user_name',
type: 'C',
length: 50,
format: '',
label: '',
notnull: true
},
{
name: 'group_desc',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
}
],
MPE_LINEAGE_COLS: [
{
name: 'col_id',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'direction',
type: 'C',
length: 1,
format: '',
label: '',
notnull: false
},
{
name: 'sourcecoluri',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'map_type',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'map_transform',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'jobname',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'sourcetablename',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'sourcecolname',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'targettablename',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'targetcolname',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'targetcoluri',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'Derived_Rule',
type: 'C',
length: 500,
format: '',
label: '',
notnull: false
},
{
name: 'level',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'modified_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: false
},
{
name: 'modified_by',
type: 'C',
length: 64,
format: '',
label: '',
notnull: false
}
],
MPE_LINEAGE_TABS: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'jobid',
type: 'C',
length: 17,
format: '',
label: '',
notnull: false
},
{
name: 'srctableid',
type: 'C',
length: 17,
format: '',
label: '',
notnull: false
},
{
name: 'tgttableid',
type: 'C',
length: 17,
format: '',
label: '',
notnull: false
},
{
name: 'jobname',
type: 'C',
length: 128,
format: '',
label: '',
notnull: false
},
{
name: 'srctabletype',
type: 'C',
length: 16,
format: '',
label: '',
notnull: false
},
{
name: 'srctablename',
type: 'C',
length: 64,
format: '',
label: '',
notnull: false
},
{
name: 'srclibref',
type: 'C',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'tgttabletype',
type: 'C',
length: 16,
format: '',
label: '',
notnull: false
},
{
name: 'tgttablename',
type: 'C',
length: 64,
format: '',
label: '',
notnull: false
},
{
name: 'tgtlibref',
type: 'C',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
}
],
MPE_LOADS: [
{
name: 'csv_dir',
type: 'C',
length: 255,
format: '',
label: '',
notnull: true
},
{
name: 'user_nm',
type: 'C',
length: 50,
format: '',
label: '',
notnull: false
},
{
name: 'status',
type: 'C',
length: 15,
format: '',
label: '',
notnull: false
},
{
name: 'duration',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'processed_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: false
},
{
name: 'reason_txt',
type: 'C',
length: 2048,
format: '',
label: '',
notnull: false
},
{
name: 'approvals',
type: 'C',
length: 64,
format: '',
label: '',
notnull: false
}
],
MPE_LOCKANYTABLE: [
{
name: 'lock_lib',
type: 'C',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'lock_ds',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'lock_status_cd',
type: 'C',
length: 10,
format: '',
label: '',
notnull: true
},
{
name: 'lock_user_nm',
type: 'C',
length: 100,
format: '',
label: '',
notnull: true
},
{
name: 'lock_ref',
type: 'C',
length: 200,
format: '',
label: '',
notnull: false
},
{
name: 'lock_pid',
type: 'C',
length: 10,
format: '',
label: '',
notnull: false
},
{
name: 'lock_start_dttm',
type: 'N',
length: 8,
format: 'E8601DT26.6',
label: '',
notnull: false
},
{
name: 'lock_end_dttm',
type: 'N',
length: 8,
format: 'E8601DT26.6',
label: '',
notnull: false
}
],
MPE_MAXKEYVALUES: [
{
name: 'keytable',
type: 'C',
length: 41,
format: '',
label: 'Base table in libref.dataset format',
notnull: true
},
{
name: 'keycolumn',
type: 'C',
length: 32,
format: '$32.',
label: 'The Surrogate / Retained key field containing the key values.',
notnull: false
},
{
name: 'max_key',
type: 'N',
length: 8,
format: '',
label: 'Integer value representing current max RK or SK value in the KEYTABLE',
notnull: false
},
{
name: 'processed_dttm',
type: 'N',
length: 8,
format: 'E8601DT26.6',
label: 'Datetime this value was last updated',
notnull: false
}
],
MPE_REQUESTS: [
{
name: 'request_dttm',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: true
},
{
name: 'request_user',
type: 'C',
length: 64,
format: '',
label: '',
notnull: true
},
{
name: 'request_service',
type: 'C',
length: 64,
format: '',
label: '',
notnull: true
},
{
name: 'request_params',
type: 'C',
length: 128,
format: '',
label: '',
notnull: false
}
],
MPE_REVIEW: [
{
name: 'table_id',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'reviewed_by_nm',
type: 'C',
length: 100,
format: '',
label: '',
notnull: true
},
{
name: 'base_table',
type: 'C',
length: 41,
format: '',
label: '',
notnull: true
},
{
name: 'review_status_id',
type: 'C',
length: 10,
format: '',
label: '',
notnull: true
},
{
name: 'reviewed_on_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'review_reason_txt',
type: 'C',
length: 400,
format: '',
label: '',
notnull: false
}
],
MPE_ROW_LEVEL_SECURITY: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'RLS_RK',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_SCOPE',
type: 'C',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_GROUP',
type: 'C',
length: 128,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_LIBREF',
type: 'C',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_TABLE',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_GROUP_LOGIC',
type: 'C',
length: 3,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_SUBGROUP_LOGIC',
type: 'C',
length: 3,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_SUBGROUP_ID',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_VARIABLE_NM',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_OPERATOR_NM',
type: 'C',
length: 12,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_RAW_VALUE',
type: 'C',
length: 4000,
format: '',
label: '',
notnull: true
},
{
name: 'RLS_ACTIVE',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
}
],
MPE_SECURITY: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'dsn',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'access_level',
type: 'C',
length: 10,
format: '',
label: '',
notnull: true
},
{
name: 'sas_group',
type: 'C',
length: 100,
format: '',
label: '',
notnull: true
}
],
MPE_SELECTBOX: [
{
name: 'ver_from_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'ver_to_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'selectbox_rk',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'select_lib',
type: 'C',
length: 17,
format: '',
label: '',
notnull: true
},
{
name: 'select_ds',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'base_column',
type: 'C',
length: 36,
format: '',
label: '',
notnull: true
},
{
name: 'selectbox_value',
type: 'C',
length: 500,
format: '',
label: '',
notnull: true
},
{
name: 'selectbox_order',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'selectbox_type',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
}
],
MPE_SIGNOFFS: [
{
name: 'tech_from_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tech_to_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'signoff_table',
type: 'C',
length: 50,
format: '',
label: '',
notnull: true
},
{
name: 'signoff_section_rk',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'signoff_version_rk',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'signoff_name',
type: 'C',
length: 100,
format: '',
label: '',
notnull: true
}
],
MPE_SUBMIT: [
{
name: 'table_id',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'submit_status_cd',
type: 'C',
length: 10,
format: '',
label: '',
notnull: true
},
{
name: 'base_lib',
type: 'C',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'base_ds',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'submitted_by_nm',
type: 'C',
length: 100,
format: '',
label: '',
notnull: true
},
{
name: 'submitted_on_dttm',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'submitted_reason_txt',
type: 'C',
length: 400,
format: '',
label: '',
notnull: false
},
{
name: 'input_obs',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'input_vars',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'num_of_approvals_required',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'num_of_approvals_remaining',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'reviewed_by_nm',
type: 'C',
length: 100,
format: '',
label: '',
notnull: false
},
{
name: 'reviewed_on_dttm',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
}
],
MPE_TABLES: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'libref',
type: 'C',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'dsn',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'num_of_approvals_required',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'loadtype',
type: 'C',
length: 12,
format: '',
label: '',
notnull: false
},
{
name: 'buskey',
type: 'C',
length: 1000,
format: '',
label: '',
notnull: false
},
{
name: 'var_txfrom',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'var_txto',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'var_busfrom',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'var_busto',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'var_processed',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'close_vars',
type: 'C',
length: 500,
format: '',
label: '',
notnull: false
},
{
name: 'pre_edit_hook',
type: 'C',
length: 200,
format: '',
label: '',
notnull: false
},
{
name: 'post_edit_hook',
type: 'C',
length: 200,
format: '',
label: '',
notnull: false
},
{
name: 'pre_approve_hook',
type: 'C',
length: 200,
format: '',
label: '',
notnull: false
},
{
name: 'post_approve_hook',
type: 'C',
length: 200,
format: '',
label: '',
notnull: false
},
{
name: 'signoff_cols',
type: 'C',
length: 500,
format: '',
label: '',
notnull: false
},
{
name: 'signoff_hook',
type: 'C',
length: 200,
format: '',
label: '',
notnull: false
},
{
name: 'notes',
type: 'C',
length: 1000,
format: '',
label: '',
notnull: false
},
{
name: 'rk_underlying',
type: 'C',
length: 1000,
format: '',
label: '',
notnull: false
},
{
name: 'audit_libds',
type: 'C',
length: 41,
format: '',
label: '',
notnull: false
}
],
MPE_USERS: [
{
name: 'user_id',
type: 'C',
length: 50,
format: '',
label: '',
notnull: true
},
{
name: 'last_seen_dt',
type: 'N',
length: 8,
format: 'date9.',
label: '',
notnull: true
},
{
name: 'registered_dt',
type: 'N',
length: 8,
format: 'date9.',
label: '',
notnull: true
}
],
MPE_VALIDATIONS: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'BASE_LIB',
type: 'C',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'BASE_DS',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'BASE_COL',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'RULE_TYPE',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'RULE_VALUE',
type: 'C',
length: 128,
format: '',
label: '',
notnull: false
},
{
name: 'RULE_ACTIVE',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
}
],
MPE_DERIVED: [
{
name: 'TX_FROM',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
},
{
name: 'LIBREF',
type: 'C',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'DSN',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'VAR_NM',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'VAR_DEPS',
type: 'C',
length: 4000,
format: '',
label: '',
notnull: false
},
{
name: 'VAR_TYPE',
type: 'C',
length: 1,
format: '',
label: '',
notnull: false
},
{
name: 'VAR_LEN',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'VAR_FMT',
type: 'C',
length: 32,
format: '',
label: '',
notnull: false
},
{
name: 'VAR_LABEL',
type: 'C',
length: 256,
format: '',
label: '',
notnull: false
},
{
name: 'VAR_LOGIC',
type: 'C',
length: 4000,
format: '',
label: '',
notnull: false
},
{
name: 'ACTIVE',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'TX_TO',
type: 'N',
length: 8,
format: 'datetime19.3',
label: '',
notnull: true
}
],
MPE_X_TEST: [
{
name: 'primary_key_field',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'some_char',
type: 'C',
length: 32767,
format: '',
label: '',
notnull: false
},
{
name: 'some_dropdown',
type: 'C',
length: 128,
format: '',
label: '',
notnull: false
},
{
name: 'some_num',
type: 'N',
length: 8,
format: '',
label: '',
notnull: false
},
{
name: 'some_date',
type: 'N',
length: 8,
format: 'date9.',
label: '',
notnull: false
},
{
name: 'some_datetime',
type: 'N',
length: 8,
format: 'datetime19.',
label: '',
notnull: false
},
{
name: 'some_time',
type: 'N',
length: 8,
format: 'time8.',
label: '',
notnull: false
},
{
name: 'some_shortnum',
type: 'N',
length: 4,
format: '',
label: '',
notnull: false
},
{
name: 'some_bestnum',
type: 'N',
length: 8,
format: 'best.',
label: '',
notnull: false
}
],
MPE_X_CATALOG: [],
MPE_XLMAP_DATA: [
{
name: 'LOAD_REF',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_ID',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_RANGE_ID',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'ROW_NO',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'COL_NO',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'VALUE_TXT',
type: 'C',
length: 4000,
format: '',
label: '',
notnull: false
}
],
MPE_XLMAP_INFO: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_ID',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_DESCRIPTION',
type: 'C',
length: 1000,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_TARGETLIBDS',
type: 'C',
length: 41,
format: '',
label: '',
notnull: true
}
],
MPE_XLMAP_RULES: [
{
name: 'tx_from',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'tx_to',
type: 'N',
length: 8,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_ID',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_RANGE_ID',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_SHEET',
type: 'C',
length: 32,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_START',
type: 'C',
length: 1000,
format: '',
label: '',
notnull: true
},
{
name: 'XLMAP_FINISH',
type: 'C',
length: 1000,
format: '',
label: '',
notnull: false
}
]
}
/* The unique key each control table is created with - dictionary.indexes on a
real estate, and what mp_ds2ddl turns into CREATE UNIQUE INDEX. Recorded from
the synthetic estate's own DDL, name and column order included. */
const tableIndexes = {
MPE_ALERTS: { name: 'pk_mpealerts', columns: ['tx_from', 'alert_event', 'alert_lib', 'alert_ds', 'alert_user'] },
MPE_AUDIT: { name: 'pk_mpe_audit', columns: ['load_ref', 'libref', 'dsn', 'key_hash', 'tgtvar_nm'] },
MPE_COLUMN_LEVEL_SECURITY: { name: 'pk_mpe_column_level_security', columns: ['tx_to', 'CLS_SCOPE', 'CLS_GROUP', 'CLS_LIBREF', 'CLS_TABLE', 'CLS_VARIABLE_NM'] },
MPE_CONFIG: { name: 'pk_mpe_config', columns: ['tx_to', 'var_scope', 'var_name'] },
MPE_DATACATALOG_CATS: { name: 'pk_mpe_datacatalog_CATS', columns: ['TX_TO', 'libref', 'memname'] },
MPE_DATACATALOG_LIBS: { name: 'pk_mpe_datacatalog_libs', columns: ['libref', 'TX_TO'] },
MPE_DATACATALOG_OBJS: { name: 'pk_mpe_datacatalog_OBJS', columns: ['libref', 'memname', 'objname', 'objtype', 'TX_TO'] },
MPE_DATACATALOG_TABS: { name: 'pk_mpe_datacatalog_TABS', columns: ['libref', 'dsn', 'TX_TO'] },
MPE_DATACATALOG_VARS: { name: 'pk_mpe_datacatalog_vars', columns: ['libref', 'dsn', 'name', 'TX_TO'] },
MPE_DATADICTIONARY: { name: 'pk_mpe_datadictionary', columns: ['TX_TO', 'DD_TYPE', 'DD_SOURCE'] },
MPE_DATALOADS: { name: 'pk_mpe_dataloads', columns: ['processed_dttm', 'libref', 'dsn', 'etlsource'] },
MPE_DATASTATUS_CATS: { name: 'pk_mpe_datastatus_cats', columns: ['libref', 'memname', 'TX_TO'] },
MPE_DATASTATUS_LIBS: { name: 'pk_mpe_datastatus_libs', columns: ['libref', 'TX_TO'] },
MPE_DATASTATUS_OBJS: { name: 'pk_mpe_datastatus_OBJS', columns: ['libref', 'memname', 'objname', 'objtype', 'TX_TO'] },
MPE_DATASTATUS_TABS: { name: 'pk_mpe_datastatus_tabs', columns: ['libref', 'dsn', 'TX_TO'] },
MPE_DERIVED: { name: 'pk_mpe_derived', columns: ['TX_FROM', 'LIBREF', 'DSN', 'VAR_NM'] },
MPE_EMAILS: { name: 'pk_mpe_emails', columns: ['tx_to', 'user_name'] },
MPE_EXCEL_CONFIG: { name: 'pk_mpe_excel_config', columns: ['tx_to', 'xl_libref', 'xl_table', 'xl_column'] },
MPE_FILTERANYTABLE: { name: 'filter_rk', columns: ['filter_rk'] },
MPE_FILTERSOURCE: { name: 'pk_mpe_filtersource', columns: ['filter_hash', 'filter_line'] },
MPE_GROUPS: { name: 'pk_mpe_groups', columns: ['tx_to', 'group_name', 'user_name'] },
MPE_LINEAGE_COLS: { name: 'pk_mpe_lineage_cols', columns: ['col_id', 'direction', 'sourcecoluri', 'targetcoluri', 'map_type', 'map_transform'] },
MPE_LINEAGE_TABS: { name: 'pk_mpe_lineage_tabs', columns: ['tx_to', 'jobid', 'srctableid', 'tgttableid'] },
MPE_LOADS: { name: 'csv_dir', columns: ['csv_dir'] },
MPE_LOCKANYTABLE: { name: 'pk_mpe_lockanytable', columns: ['lock_lib', 'lock_ds'] },
MPE_MAXKEYVALUES: { name: 'keytable', columns: ['keytable'] },
MPE_REQUESTS: null,
MPE_REVIEW: { name: 'pk_mpe_review', columns: ['table_id', 'reviewed_by_nm'] },
MPE_ROW_LEVEL_SECURITY: { name: 'pk_mpe_row_level_security', columns: ['tx_to', 'RLS_RK'] },
MPE_SECURITY: { name: 'pk_mpe_security', columns: ['tx_to', 'libref', 'dsn', 'access_level', 'sas_group'] },
MPE_SELECTBOX: { name: 'pk_mpe_selectbox', columns: ['ver_to_dttm', 'selectbox_rk'] },
MPE_SIGNOFFS: { name: 'pk_mpe_signoffs', columns: ['tech_to_dttm', 'signoff_table', 'signoff_section_rk'] },
MPE_SUBMIT: { name: 'table_id', columns: ['table_id'] },
MPE_TABLES: { name: 'pk_mpe_tables', columns: ['tx_to', 'libref', 'dsn'] },
MPE_USERS: { name: 'user_id', columns: ['user_id'] },
MPE_VALIDATIONS: { name: 'pk_mpe_validations', columns: ['TX_FROM', 'BASE_LIB', 'BASE_DS', 'BASE_COL', 'RULE_TYPE'] },
MPE_XLMAP_DATA: { name: 'pk_MPE_XLMAP_DATA', columns: ['LOAD_REF', 'XLMAP_ID', 'XLMAP_RANGE_ID', 'ROW_NO', 'COL_NO'] },
MPE_XLMAP_INFO: { name: 'pk_mpe_xlmap_info', columns: ['tx_to', 'XLMAP_ID'] },
MPE_XLMAP_RULES: { name: 'pk_mpe_xlmap_rules', columns: ['tx_to', 'XLMAP_ID', 'XLMAP_RANGE_ID'] },
MPE_X_TEST: { name: 'primary_key_field', columns: ['primary_key_field'] },
}
// Write one JSON file per table with metadata + rows
for (const [tableName, rows] of Object.entries(tables)) {
const tableFile = nodePath.resolve(dataDir, tableName.toLowerCase() + '.json')
const tableData = {
name: tableName,
columns: schema[tableName] || [],
uniqueIndex: tableIndexes[tableName] || null,
rows: rows
}
fs.writeFileSync(tableFile, JSON.stringify(tableData, null, 2))
}
// Write settings (what the real settings.sas would contain) as a JS module at
// services/settings.js, mirroring how makedata.sas writes
// services/public/settings.sas on the real backend. Services eval() it to
// pick up dc_libref, dc_admin_group, dc_staging_area and dcpath.
const settings = {
dc_libref: dcLibref,
dc_admin_group: adminGroup,
dc_staging_area: dataDir + '/dc_staging',
dc_macros: dataDir + '/dc_macros',
mpelib: dcLibref,
dcpath: dataDir
}
const settingsFile = nodePath.resolve(
driveRoot,
'files',
appLoc,
'services',
'settings.js'
)
// `var` (not const/let) so that eval'ing the file in a service's scope makes
// dcSettings visible to the reader, same as the dcMockUtils functions.
fs.writeFileSync(
settingsFile,
'var dcSettings = ' + JSON.stringify(settings, null, 2) + '\n'
)
// Delete makedata from the Drive so the frontend polling detects completion
// The frontend checks if makedata.sas is still in appLoc/services/admin/
const makedataFilePath = nodePath.resolve(
driveRoot,
'files',
appLoc,
'services',
'admin',
'makedata.sas'
)
const makedataJsPath = nodePath.resolve(
driveRoot,
'files',
appLoc,
'services',
'admin',
'makedata.js'
)
try {
if (fs.existsSync(makedataFilePath)) {
fs.unlinkSync(makedataFilePath)
console.log('makedata.sas deleted (self-destruct)')
}
if (fs.existsSync(makedataJsPath)) {
fs.unlinkSync(makedataJsPath)
console.log('makedata.js deleted (self-destruct)')
}
} catch (err) {
console.log('Warning: could not delete makedata file: ' + err.message)
}
if (outfmt === 'JSON') {
_webout = JSON.stringify({
makedata_response: [
{
STATUS: 'SUCCESS',
MESSAGE: 'Data Controller Config created',
DCPATH: dataDir,
LIBREF: dcLibref,
ADMIN: adminGroup
}
]
})
} else {
// the deploy screen renders this: makedata is called as a URL redirect
_webout = `<h3>Data Controller Config</h3>
<p>The following items have been successfully configured:</p>
<ul><li>Library Location (${dataDir})</li>
<li>Table Creation (${dcLibref} library)</li>
<li>Data Controller Admin Group (${adminGroup})</li>
</ul>
<p>Next Steps:</p>
<ol><li><a href="/AppStream/clickme">Launch Data Controller</a></li></ol>`
}
break
}
}
} catch (err) {
// mpAbort already wrote and stopped the program; anything else is a refusal
// or a failure of the seeding, which the SAS service reports the same way
if (err && err.mockAbort) throw err
mpAbort(err && err.message ? err.message : String(err), _program)
}
} catch (err) {
// mpAbort has already written the abort response, which is what the client
// reads; anything else is a real failure and belongs in the log
if (!(err && err.mockAbort)) throw err
}