docs.datacontroller.io/docs/admin-services.md

99 lines
4.2 KiB
Markdown
Raw Normal View History

2021-08-23 20:56:28 +00:00
---
layout: article
title: Admin Services
description: Data Controller contains a number of admin-only web services, such as DB Export, Lineage Generation, and Data Catalog refresh.
---
# Admin Services
2022-06-21 15:17:59 +00:00
Several web services have been defined to provide additional functionality outside of the user interface. These somewhat-hidden services must be called directly, using a web browser.
In a future version, these features will be made available from an Admin screen (so, no need to manually modify URLs).
The URL is made up of several components:
2021-08-23 20:56:28 +00:00
2021-09-09 10:34:59 +00:00
* `SERVERURL` -> the domain (and port) on which your SAS server resides
* `EXECUTOR` -> Either `SASStoredProcess` for SAS 9, else `SASJobExecution` for Viya
* `APPLOC` -> The root folder location in which the Data Controller backend services were deployed
* `SERVICE` -> The actual Data Controller service being described. May include additional parameters.
2021-08-23 20:56:28 +00:00
2021-08-24 16:01:14 +00:00
To illustrate the above, consider the following URL:
2021-08-23 20:56:28 +00:00
2022-04-30 18:30:18 +00:00
[https://viya.4gl.io/SASJobExecution/?_program=/Public/app/viya/services/admin/exportdb&flavour=PGSQL](https://viya.4gl.io/SASJobExecution/?_program=/Public/app/viya/services/admin/exportdb&flavour=PGSQL
2021-08-23 21:02:24 +00:00
)
2021-08-23 20:56:28 +00:00
2021-08-24 16:01:14 +00:00
This is broken down into:
2021-08-23 20:56:28 +00:00
* `$SERVERURL` = `https://sas.analytium.co.uk`
* `$EXECUTOR` = `SASJobExecution`
* `$APPLOC` = `/Public/app/dc`
2021-08-24 16:01:14 +00:00
* `$SERVICE` = `services/admin/exportdb&flavour=PGSQL`
2021-08-23 20:56:28 +00:00
The below sections will only describe the `$SERVICE` component - you may construct this into a URL as follows:
2021-08-23 21:02:24 +00:00
* `$SERVERURL/$EXECUTOR?_program=$APPLOC/$SERVICE`
2021-08-23 20:56:28 +00:00
## Export Config
This service will provide a zip file containing the current database configuration. This is useful for migrating to a different data controller database instance.
EXAMPLE:
2021-09-09 10:34:59 +00:00
2021-08-23 21:02:24 +00:00
* `services/admin/exportconfig`
2021-08-23 20:56:28 +00:00
## Export Database
Exports the data controller control library in DB specific DDL. The following URL parameters may be added:
2021-09-09 10:34:59 +00:00
* `&flavour=` (only PGSQL supported at this time)
* `&schema=` (optional, if target schema is needed)
2021-08-23 20:56:28 +00:00
EXAMPLES:
2021-09-09 10:34:59 +00:00
2021-08-23 21:02:24 +00:00
* `services/admin/exportdb&flavour=PGSQL&schema=DC`
* `services/admin/exportdb&flavour=PGSQL`
2021-08-23 20:56:28 +00:00
2022-04-30 17:18:08 +00:00
## Refresh Data Catalog
2021-08-23 20:56:28 +00:00
2022-04-30 17:18:08 +00:00
In any SAS estate, it's unlikely the size & shape of data will remain static. By running a regular Catalog Scan, you can track changes such as:
2022-04-30 17:36:00 +00:00
2022-04-30 17:18:08 +00:00
- Library Properties (size, schema, path, number of tables)
- Table Properties (size, number of columns, primary keys)
2022-04-30 17:42:32 +00:00
- Variable Properties (presence in a primary key, constraints, position in the dataset)
2021-08-23 20:56:28 +00:00
2022-06-21 15:10:25 +00:00
The data is stored with SCD2 so you can actually **track changes to your model over time**! Curious when that new column appeared? Just check the history in [MPE_DATACATALOG_TABS](/tables/mpe_datacatalog_tabs).
2021-08-23 20:56:28 +00:00
2022-04-30 17:18:08 +00:00
To run the refresh process, just trigger the stored process, eg below:
2021-09-09 10:34:59 +00:00
2021-08-23 21:02:24 +00:00
* `services/admin/refreshcatalog`
2022-04-30 17:18:08 +00:00
* `services/admin/refreshcatalog&libref=MYLIB`
2022-04-30 17:36:00 +00:00
The optional `&libref=` parameter allows you to run the process for a single library. Just provide the libref.
2022-04-30 17:18:08 +00:00
When doing a full scan, the following LIBREFS are ignored:
* 'CASUSER'
* 'MAPSGFK'
* 'SASUSER'
* 'SASWORK
* 'STPSAMP'
* 'TEMP'
* `WORK'
2022-04-30 17:42:32 +00:00
Additional LIBREFs can be excluded by adding them to the `DCXXXX.MPE_CONFIG` table (where `var_scope='DC_CATALOG' and var_name='DC_IGNORELIBS'`). Use a pipe (`|`) symbol to seperate them. This can be useful where there are connection issues for a particular library.
Be aware that the scan process can take a long time if you have a lot of tables!
2022-04-30 17:18:08 +00:00
Output tables (all SCD2):
2022-06-21 15:10:25 +00:00
* [MPE_DATACATALOG_LIBS](/tables/mpe_datacatalog_libs) - Library attributes
* [MPE_DATACATALOG_TABS](/tables/mpe_datacatalog_tabs) - Table attributes
* [MPE_DATACATALOG_VARS](/tables/mpe_datacatalog_vars) - Column attributes
* [MPE_DATASTATUS_LIBS](/tables/mpe_datastatus_libs) - Frequently changing library attributes (such as size & number of tables)
* [MPE_DATASTATUS_TABS](/tables/mpe_datastatus_tabs) - Frequently changing table attributes (such as size & number of rows)
2022-04-30 17:18:08 +00:00
2022-06-21 15:17:59 +00:00
## Update Licence Key
Whenever navigating Data Controller, there is always a hash (`#`) in the URL. To access the licence key screen, remove all content to the RIGHT of the hash and add the following string: `/licensing/update`.
2022-04-30 17:18:08 +00:00
2022-06-21 15:17:59 +00:00
If you are using https protocol, you will have 2 keys (licence key / activation key). In http mode, there is just one key (licence key) for both boxes.