Compare commits

..

No commits in common. "main" and "gh-pages" have entirely different histories.

301 changed files with 63704 additions and 4348 deletions

View File

@ -1,53 +0,0 @@
name: Publish to docs.datacontroller.io
on:
push:
branches:
- main
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Checkout master
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
RUNNER_TOOL_CACHE: /opt/hostedtoolcache
- name: Install pip3
run: |
apt-get update
apt-get install python3-pip -y
- name: Install Chrome
run: |
apt-get update
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install -y ./google-chrome*.deb;
export CHROME_BIN=/usr/bin/google-chrome
- name: Install Surfer
run: |
npm -g install cloudron-surfer
- name: build site
run: |
pip3 install mkdocs
pip3 install mkdocs-material
pip3 install fontawesome_markdown
pip3 install mkdocs-redirects
python3 -m mkdocs build --clean
mkdir site/slides
npx @marp-team/marp-cli slides/innovation/innovation.md -o ./site/slides/innovation/index.html
npx @marp-team/marp-cli slides/if/if.md -o site/if.pdf --allow-local-files --html=true
- name: Deploy docs
run: surfer put --token ${{ secrets.SURFERKEY }} --server docs.datacontroller.io site/* /

4
.gitignore vendored
View File

@ -1,4 +0,0 @@
site/
*.swp
node_modules/
**/.DS_Store

View File

@ -1,8 +0,0 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.
tasks:
- init: npm install

View File

@ -1,5 +0,0 @@
{
"recommendations": [
"marp-team.marp-vscode"
]
}

1026
404.html Normal file

File diff suppressed because it is too large Load Diff

1
CNAME Normal file
View File

@ -0,0 +1 @@
docs.datacontroller.io

View File

@ -1,3 +0,0 @@
Deploy steps in build.sh
Note that the readme has been renamed to README.txt to prevent github pages from considering it to be the index by default!

1275
admin-services/index.html Normal file

File diff suppressed because it is too large Load Diff

1271
api/index.html Normal file

File diff suppressed because it is too large Load Diff

BIN
assets/images/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,18 @@
/*!
* Lunr languages, `Danish` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=function(){var r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){function e(){var e,r=f.cursor+3;if(d=f.limit,0<=r&&r<=f.limit){for(a=r;;){if(e=f.cursor,f.in_grouping(w,97,248)){f.cursor=e;break}if(f.cursor=e,e>=f.limit)return;f.cursor++}for(;!f.out_grouping(w,97,248);){if(f.cursor>=f.limit)return;f.cursor++}d=f.cursor,d<a&&(d=a)}}function n(){var e,r;if(f.cursor>=d&&(r=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,e=f.find_among_b(c,32),f.limit_backward=r,e))switch(f.bra=f.cursor,e){case 1:f.slice_del();break;case 2:f.in_grouping_b(p,97,229)&&f.slice_del()}}function t(){var e,r=f.limit-f.cursor;f.cursor>=d&&(e=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,f.find_among_b(l,4)?(f.bra=f.cursor,f.limit_backward=e,f.cursor=f.limit-r,f.cursor>f.limit_backward&&(f.cursor--,f.bra=f.cursor,f.slice_del())):f.limit_backward=e)}function s(){var e,r,i,n=f.limit-f.cursor;if(f.ket=f.cursor,f.eq_s_b(2,"st")&&(f.bra=f.cursor,f.eq_s_b(2,"ig")&&f.slice_del()),f.cursor=f.limit-n,f.cursor>=d&&(r=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,e=f.find_among_b(m,5),f.limit_backward=r,e))switch(f.bra=f.cursor,e){case 1:f.slice_del(),i=f.limit-f.cursor,t(),f.cursor=f.limit-i;break;case 2:f.slice_from("løs")}}function o(){var e;f.cursor>=d&&(e=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,f.out_grouping_b(w,97,248)?(f.bra=f.cursor,u=f.slice_to(u),f.limit_backward=e,f.eq_v_b(u)&&f.slice_del()):f.limit_backward=e)}var a,d,u,c=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],l=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],m=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],w=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],p=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],f=new i;this.setCurrent=function(e){f.setCurrent(e)},this.getCurrent=function(){return f.getCurrent()},this.stem=function(){var r=f.cursor;return e(),f.limit_backward=r,f.cursor=f.limit,n(),f.cursor=f.limit,t(),f.cursor=f.limit,s(),f.cursor=f.limit,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}}(),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.ja=function(){this.pipeline.reset(),this.pipeline.add(e.ja.trimmer,e.ja.stopWordFilter,e.ja.stemmer),r?this.tokenizer=e.ja.tokenizer:(e.tokenizer&&(e.tokenizer=e.ja.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.ja.tokenizer))};var t=new e.TinySegmenter;e.ja.tokenizer=function(i){var n,o,s,p,a,u,m,l,c,f;if(!arguments.length||null==i||void 0==i)return[];if(Array.isArray(i))return i.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(o=i.toString().toLowerCase().replace(/^\s+/,""),n=o.length-1;n>=0;n--)if(/\S/.test(o.charAt(n))){o=o.substring(0,n+1);break}for(a=[],s=o.length,c=0,l=0;c<=s;c++)if(u=o.charAt(c),m=c-l,u.match(/\s/)||c==s){if(m>0)for(p=t.segment(o.slice(l,c)).filter(function(e){return!!e}),f=l,n=0;n<p.length;n++)r?a.push(new e.Token(p[n],{position:[f,p[n].length],index:a.length})):a.push(p[n]),f+=p[n].length;l=c+1}return a},e.ja.stemmer=function(){return function(e){return e}}(),e.Pipeline.registerFunction(e.ja.stemmer,"stemmer-ja"),e.ja.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Z--0-9-",e.ja.trimmer=e.trimmerSupport.generateTrimmer(e.ja.wordCharacters),e.Pipeline.registerFunction(e.ja.trimmer,"trimmer-ja"),e.ja.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.ja.stopWordFilter,"stopWordFilter-ja"),e.jp=e.ja,e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.Pipeline.registerFunction(e.jp.trimmer,"trimmer-jp"),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});

View File

@ -0,0 +1 @@
module.exports=require("./lunr.ja");

View File

@ -0,0 +1 @@
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var t=Array.prototype.slice.call(arguments),i=t.join("-"),r="",n=[],s=[],p=0;p<t.length;++p)"en"==t[p]?(r+="\\w",n.unshift(e.stopWordFilter),n.push(e.stemmer),s.push(e.stemmer)):(r+=e[t[p]].wordCharacters,e[t[p]].stopWordFilter&&n.unshift(e[t[p]].stopWordFilter),e[t[p]].stemmer&&(n.push(e[t[p]].stemmer),s.push(e[t[p]].stemmer)));var o=e.trimmerSupport.generateTrimmer(r);return e.Pipeline.registerFunction(o,"lunr-multi-trimmer-"+i),n.unshift(o),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,n),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,s))}}}});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,18 @@
/*!
* Lunr languages, `Norwegian` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.no=function(){this.pipeline.reset(),this.pipeline.add(e.no.trimmer,e.no.stopWordFilter,e.no.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.no.stemmer))},e.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.no.trimmer=e.trimmerSupport.generateTrimmer(e.no.wordCharacters),e.Pipeline.registerFunction(e.no.trimmer,"trimmer-no"),e.no.stemmer=function(){var r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){function e(){var e,r=w.cursor+3;if(a=w.limit,0<=r||r<=w.limit){for(s=r;;){if(e=w.cursor,w.in_grouping(d,97,248)){w.cursor=e;break}if(e>=w.limit)return;w.cursor=e+1}for(;!w.out_grouping(d,97,248);){if(w.cursor>=w.limit)return;w.cursor++}a=w.cursor,a<s&&(a=s)}}function i(){var e,r,n;if(w.cursor>=a&&(r=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,e=w.find_among_b(m,29),w.limit_backward=r,e))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:n=w.limit-w.cursor,w.in_grouping_b(c,98,122)?w.slice_del():(w.cursor=w.limit-n,w.eq_s_b(1,"k")&&w.out_grouping_b(d,97,248)&&w.slice_del());break;case 3:w.slice_from("er")}}function t(){var e,r=w.limit-w.cursor;w.cursor>=a&&(e=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,w.find_among_b(u,2)?(w.bra=w.cursor,w.limit_backward=e,w.cursor=w.limit-r,w.cursor>w.limit_backward&&(w.cursor--,w.bra=w.cursor,w.slice_del())):w.limit_backward=e)}function o(){var e,r;w.cursor>=a&&(r=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,e=w.find_among_b(l,11),e?(w.bra=w.cursor,w.limit_backward=r,1==e&&w.slice_del()):w.limit_backward=r)}var s,a,m=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],u=[new r("dt",-1,-1),new r("vt",-1,-1)],l=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],c=[119,125,149,1],w=new n;this.setCurrent=function(e){w.setCurrent(e)},this.getCurrent=function(){return w.getCurrent()},this.stem=function(){var r=w.cursor;return e(),w.limit_backward=r,w.cursor=w.limit,i(),w.cursor=w.limit,t(),w.cursor=w.limit,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}}(),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var r;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(t){r=t,this.cursor=0,this.limit=t.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var t=r;return r=null,t},in_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e<=s&&e>=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor++,!0}return!1},in_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e<=s&&e>=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor--,!0}return!1},out_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e>s||e<i)return this.cursor++,!0;if(e-=i,!(t[e>>3]&1<<(7&e)))return this.cursor++,!0}return!1},out_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e>s||e<i)return this.cursor--,!0;if(e-=i,!(t[e>>3]&1<<(7&e)))return this.cursor--,!0}return!1},eq_s:function(t,i){if(this.limit-this.cursor<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor+s)!=i.charCodeAt(s))return!1;return this.cursor+=t,!0},eq_s_b:function(t,i){if(this.cursor-this.limit_backward<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor-t+s)!=i.charCodeAt(s))return!1;return this.cursor-=t,!0},find_among:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=t[a],m=l;m<_.s_size;m++){if(n+l==u){f=-1;break}if(f=r.charCodeAt(n+l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var _=t[s];if(o>=_.s_size){if(this.cursor=n+_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n+_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},find_among_b:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit_backward,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=t[a],m=_.s_size-1-l;m>=0;m--){if(n-l==u){f=-1;break}if(f=r.charCodeAt(n-1-l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var _=t[s];if(o>=_.s_size){if(this.cursor=n-_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n-_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},replace_s:function(t,i,s){var e=s.length-(i-t),n=r.substring(0,t),u=r.substring(i);return r=n+s+u,this.limit+=e,this.cursor>=i?this.cursor+=e:this.cursor>t&&(this.cursor=t),e},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>r.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),r.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});

View File

@ -0,0 +1,18 @@
/*!
* Lunr languages, `Swedish` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.sv=function(){this.pipeline.reset(),this.pipeline.add(e.sv.trimmer,e.sv.stopWordFilter,e.sv.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sv.stemmer))},e.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.sv.trimmer=e.trimmerSupport.generateTrimmer(e.sv.wordCharacters),e.Pipeline.registerFunction(e.sv.trimmer,"trimmer-sv"),e.sv.stemmer=function(){var r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,t=new function(){function e(){var e,r=w.cursor+3;if(o=w.limit,0<=r||r<=w.limit){for(a=r;;){if(e=w.cursor,w.in_grouping(l,97,246)){w.cursor=e;break}if(w.cursor=e,w.cursor>=w.limit)return;w.cursor++}for(;!w.out_grouping(l,97,246);){if(w.cursor>=w.limit)return;w.cursor++}o=w.cursor,o<a&&(o=a)}}function t(){var e,r=w.limit_backward;if(w.cursor>=o&&(w.limit_backward=o,w.cursor=w.limit,w.ket=w.cursor,e=w.find_among_b(u,37),w.limit_backward=r,e))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:w.in_grouping_b(d,98,121)&&w.slice_del()}}function i(){var e=w.limit_backward;w.cursor>=o&&(w.limit_backward=o,w.cursor=w.limit,w.find_among_b(c,7)&&(w.cursor=w.limit,w.ket=w.cursor,w.cursor>w.limit_backward&&(w.bra=--w.cursor,w.slice_del())),w.limit_backward=e)}function s(){var e,r;if(w.cursor>=o){if(r=w.limit_backward,w.limit_backward=o,w.cursor=w.limit,w.ket=w.cursor,e=w.find_among_b(m,5))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:w.slice_from("lös");break;case 3:w.slice_from("full")}w.limit_backward=r}}var a,o,u=[new r("a",-1,1),new r("arna",0,1),new r("erna",0,1),new r("heterna",2,1),new r("orna",0,1),new r("ad",-1,1),new r("e",-1,1),new r("ade",6,1),new r("ande",6,1),new r("arne",6,1),new r("are",6,1),new r("aste",6,1),new r("en",-1,1),new r("anden",12,1),new r("aren",12,1),new r("heten",12,1),new r("ern",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",18,1),new r("or",-1,1),new r("s",-1,2),new r("as",21,1),new r("arnas",22,1),new r("ernas",22,1),new r("ornas",22,1),new r("es",21,1),new r("ades",26,1),new r("andes",26,1),new r("ens",21,1),new r("arens",29,1),new r("hetens",29,1),new r("erns",21,1),new r("at",-1,1),new r("andet",-1,1),new r("het",-1,1),new r("ast",-1,1)],c=[new r("dd",-1,-1),new r("gd",-1,-1),new r("nn",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1),new r("tt",-1,-1)],m=[new r("ig",-1,1),new r("lig",0,1),new r("els",-1,1),new r("fullt",-1,3),new r("löst",-1,2)],l=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],d=[119,127,149],w=new n;this.setCurrent=function(e){w.setCurrent(e)},this.getCurrent=function(){return w.getCurrent()},this.stem=function(){var r=w.cursor;return e(),w.limit_backward=r,w.cursor=w.limit,t(),w.cursor=w.limit,i(),w.cursor=w.limit,s(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return t.setCurrent(e),t.stem(),t.getCurrent()}):(t.setCurrent(e),t.stem(),t.getCurrent())}}(),e.Pipeline.registerFunction(e.sv.stemmer,"stemmer-sv"),e.sv.stopWordFilter=e.generateStopWordFilter("alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" ")),e.Pipeline.registerFunction(e.sv.stopWordFilter,"stopWordFilter-sv")}});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.vi=function(){this.pipeline.reset(),this.pipeline.add(e.vi.stopWordFilter,e.vi.trimmer)},e.vi.wordCharacters="[A-Za-ẓ̀͐́͑̉̃̓ÂâÊêÔôĂ-ăĐ-đƠ-ơƯ-ư]",e.vi.trimmer=e.trimmerSupport.generateTrimmer(e.vi.wordCharacters),e.Pipeline.registerFunction(e.vi.trimmer,"trimmer-vi"),e.vi.stopWordFilter=e.generateStopWordFilter("là cái nhưng mà".split(" "))}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,38 +0,0 @@
#!/bin/bash
####################################################################
# PROJECT: Data Controller Docs #
####################################################################
## Create regular mkdocs docs
echo 'extracting licences'
OUTFILE='docs/licences.md'
cat > $OUTFILE <<'EOL'
<!-- this page is AUTOMATICALLY updated!! -->
# Data Controller for SAS® - Source Licences
## Overview
Data Controller source licences are extracted automatically from our repo using the [license-checker](https://www.npmjs.com/package/license-checker) NPM module
```
EOL
license-checker --production --relativeLicensePath --direct --start ../dcfrontend >> docs/licences.md
echo '```' >> docs/licences.md
echo 'building mkdocs'
pip3 install mkdocs
pip3 install mkdocs-material
pip3 install fontawesome_markdown
python3 -m mkdocs build --clean
#mkdocs serve
# update slides
mkdir site/slides
npx @marp-team/marp-cli slides/innovation/innovation.md -o ./site/slides/innovation/index.html
rsync -avz --exclude .git/ --del -e "ssh -p 722" site/ macropeo@77.72.0.226:/home/macropeo/docs.datacontroller.io

File diff suppressed because it is too large Load Diff

1318
dc-overview/index.html Normal file

File diff suppressed because it is too large Load Diff

1359
dc-userguide/index.html Normal file

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

1180
dcc-dates/index.html Normal file

File diff suppressed because it is too large Load Diff

1176
dcc-groups/index.html Normal file

File diff suppressed because it is too large Load Diff

1373
dcc-options/index.html Normal file

File diff suppressed because it is too large Load Diff

1269
dcc-security/index.html Normal file

File diff suppressed because it is too large Load Diff

1262
dcc-selectbox/index.html Normal file

File diff suppressed because it is too large Load Diff

1594
dcc-tables/index.html Normal file

File diff suppressed because it is too large Load Diff

1276
dcc-validations/index.html Normal file

File diff suppressed because it is too large Load Diff

1444
dci-deploysas9/index.html Normal file

File diff suppressed because it is too large Load Diff

1469
dci-deploysasviya/index.html Normal file

File diff suppressed because it is too large Load Diff

15
dci-evaluation/index.html Normal file
View File

@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Redirecting...</title>
<link rel="canonical" href="/dci-deploysas9/">
<meta name="robots" content="noindex">
<script>var anchor=window.location.hash.substr(1);location.href="/dci-deploysas9/"+(anchor?"#"+anchor:"")</script>
<meta http-equiv="refresh" content="0; url=/dci-deploysas9/">
</head>
<body>
Redirecting...
</body>
</html>

1245
dci-requirements/index.html Normal file

File diff suppressed because it is too large Load Diff

1422
dci-stpinstance/index.html Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1237
dcu-datacatalog/index.html Normal file

File diff suppressed because it is too large Load Diff

1225
dcu-fileupload/index.html Normal file

File diff suppressed because it is too large Load Diff

1197
dcu-lineage/index.html Normal file

File diff suppressed because it is too large Load Diff

1231
dcu-tableviewer/index.html Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,98 +0,0 @@
---
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
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:
* `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.
To illustrate the above, consider the following URL:
[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
)
This is broken down into:
* `$SERVERURL` = `https://sas.analytium.co.uk`
* `$EXECUTOR` = `SASJobExecution`
* `$APPLOC` = `/Public/app/dc`
* `$SERVICE` = `services/admin/exportdb&flavour=PGSQL`
The below sections will only describe the `$SERVICE` component - you may construct this into a URL as follows:
* `$SERVERURL/$EXECUTOR?_program=$APPLOC/$SERVICE`
## 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:
* `services/admin/exportconfig`
## Export Database
Exports the data controller control library in DB specific DDL. The following URL parameters may be added:
* `&flavour=` (only PGSQL supported at this time)
* `&schema=` (optional, if target schema is needed)
EXAMPLES:
* `services/admin/exportdb&flavour=PGSQL&schema=DC`
* `services/admin/exportdb&flavour=PGSQL`
## Refresh Data Catalog
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:
- Library Properties (size, schema, path, number of tables)
- Table Properties (size, number of columns, primary keys)
- Variable Properties (presence in a primary key, constraints, position in the dataset)
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).
To run the refresh process, just trigger the stored process, eg below:
* `services/admin/refreshcatalog`
* `services/admin/refreshcatalog&libref=MYLIB`
The optional `&libref=` parameter allows you to run the process for a single library. Just provide the libref.
When doing a full scan, the following LIBREFS are ignored:
* 'CASUSER'
* 'MAPSGFK'
* 'SASUSER'
* 'SASWORK
* 'STPSAMP'
* 'TEMP'
* `WORK'
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!
Output tables (all SCD2):
* [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)
## 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`.
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.

View File

@ -1,102 +0,0 @@
---
layout: article
title: API
description: The Data Controller API provides a machine-programmable interface for loading spreadsheets into SAS
---
!!! warning
Work in Progress!
# API
Where a project has a requirement to load Excel Files automatically into SAS, from a remote machine, an API approach is desirable for many reasons:
* Security. Client access can be limited to just the endpoints they need (rather than being granted full server access).
* Flexibility. Well documented, stable APIs allow consumers to build and extend additional products and solutions.
* Cost. API solutions are typically self-contained, quick to implement, and easy to learn.
A Data Controller API would enable teams across an entire enterprise to easily and securely send data to SAS in a transparent and fully automated fashion.
The API would also benefit from all of Data Controllers existing [data validation](https://docs.datacontroller.io/dcc-validations/) logic (both frontend and backend), data auditing, [alerts](https://docs.datacontroller.io/emails/), and [security control](https://docs.datacontroller.io/dcc-security/) features.
It is however, a significant departure from the existing "SAS Content" based deployment, in the following ways:
1. Server Driven. A machine is required on which to launch, and run, the API application itself.
2. Fully Automated. There is no browser, or interface, or - human, involved.
3. Extends outside of SAS. There are firewalls, and authentication methods, to consider.
The Data Controller technical solution will differ, depending on the type of SAS Platform being used. There are three types of SAS Platform:
1. Foundation SAS - regular, Base SAS.
2. SAS EBI - with Metadata.
3. SAS Viya - cloud enabled.
And there are three main options when it comes to building APIs on SAS:
1. Standalone DC API (Viya Only). Viya comes with [REST APIs](https://developer.sas.com/apis/rest/) out of the box, no middleware needed.
2. [SAS 9 API](https://github.com/analytium/sas9api). This is an open-source Java Application, using SAS Authentication.
3. [SASjs Server](https://github.com/sasjs/server). An open source NodeJS application, compatible with all major authentication methods and all versions of SAS
An additional REST API option for SAS EBI might have been [BI Web Services](https://documentation.sas.com/doc/en/bicdc/9.4/bimtag/p1acycjd86du2hn11czxuog9x0ra.htm), however - it requires platform changes and is not highly secure.
The compatibility matrix is therefore as follows:
| Product | Foundation SAS| SAS EBI | SAS VIYA |
|---|---|---|---|
| DCAPI | ❌ | ❌ | ✅ |
| DCAPI + SASjs Server | ✅ | ✅ | ✅ |
| DCAPI + SAS 9 API | ❌ | ✅ | ❌ |
In all cases, a Data Controller API will be surfaced, that makes use of the underlying (raw) API server.
The following sections break down these options, and the work remaining to make them a reality.
## Standalone DC API (Viya Only)
For Viya, the investment necessary is relatively low, thanks to the API-first nature of the platform. In addition, the SASjs framework already provides most of the necessary functionality - such as authentication, service execution, handling results & logs, etc. Finally, the Data Controller team have already built an API Bridge (specific to another customer, hence the building blocks are in place).
The work to complete the Viya version of the API is as follows:
* Authorisation interface
* Creation of API services
* Tests & Automated Deployments
* Developer docs
* Swagger API
* Public Documentation
Cost to complete - £5,000 (Viya Only)
## SASjs Server (Foundation SAS)
[SASjs Server](https://github.com/sasjs/server) already provides an API interface over Foundation SAS. An example of building a web app using SASjs Server can be found [here](https://www.youtube.com/watch?v=F23j0R2RxSA). In order for it to fulfill the role as the engine behind the Data Controller API, additional work is needed - specifically:
* Secure (Enterprise) Authentication
* Users & Groups
* Feature configuration (ability to restrict features to different groups)
On top of this, the DC API part would cover:
* Authorisation interface
* Creation of API services
* Tests & Automated Deployments
* Developer docs
* Swagger API
* Public Documentation
Cost to complete - £10,000 (fixed)
Given that all three SAS platforms have Foundation SAS available, this option will work everywhere. The only restriction is that the sasjs/server instance **must** be located on the same server as SAS. `
## SAS 9 API (SAS EBI)
This product has one major benefit - there is nothing to install on the SAS Platform itself. It connects to SAS in much the same way as Enterprise Guide (using the SAS IOM).
Website: [https://sas9api.io](https://sas9api.io)
Github: [https://github.com/analytium/sas9api](https://github.com/analytium/sas9api)
The downside is that the features needed by Data Controller are not present in the API. Furthermore, the tool is not under active development. To build out the necessary functionality, it will require us to source a senior Java developer on a short term contract to first, understand the tool, and secondly, to update it in a sustainable way.
We estimate the cost to build Data Controller API on this mechanism at £20,000 - but it could be higher.

View File

@ -1,99 +0,0 @@
---
layout: article
title: Column Level Security
description: Column Level Security prevents end users from viewing or editing specific columns in SAS according to their group membership.
og_image: https://docs.datacontroller.io/img/cls_table.png
---
# Column Level Security
Column level security is implemented by mapping _allowed_ columns to a list of SAS groups. In VIEW mode, only allowed columns are visible. In EDIT mode, allowed columns are _editable_ - the remaining columns are read-only.
Below is an example of an EDIT table with only one column enabled for editing:
![lockanytable example](/img/cls_example.png)
See also: [Row Level Security](/row-level-security/).
## Configuration
The variables in MPE_COLUMN_LEVEL_SECURITY should be configured as follows:
### CLS_SCOPE
Determines whether the rule applies to the VIEW page, the EDIT page, or ALL pages. The impact of the rule varies as follows:
#### VIEW Scope
When `CLS_SCOPE in ('VIEW','ALL')` then only the listed columns are _visible_ (unless `CLS_HIDE=1`)
#### EDIT Scope
When `CLS_SCOPE in ('EDIT','ALL')` then only the listed columns are _editable_ (the remaining columns are read-only, and visible). Furthermore:
* The user will be unable to ADD or DELETE records.
* Primary Key values are always read only
* Primary Key values cannot be hidden (`CLS_HIDE=1` will have no effect)
### CLS_GROUP
The SAS Group to which the rule applies. The user could also be a member of a [DC group](/dcc-groups).
- If a user is in ANY of the groups, the columns will be restricted.
- If a user is in NONE of the groups, no restrictions apply (all columns available).
- If a user is in MULTIPLE groups, they will see all allowed columns across all groups.
- If a user is in the [Data Controller Admin Group](/dcc-groups/#data-controller-admin-group), CLS rules DO NOT APPLY.
### CLS_LIBREF
The library of the target table against which the security rule will be applied
### CLS_TABLE
The target table against which the security rule will be applied
### CLS_VARIABLE_NM
This is the name of the variable against which the security rule will be applied. Note that
### CLS_ACTIVE
If you would like this rule to be applied, be sure this value is set to 1.
### CLS_HIDE
This variable can be set to `1` to _hide_ specific variables, which allows greater control over the EDIT screen in particular. CLS_SCOPE behaviour is impacted as follows:
* `ALL` - the variable will not be visible in either VIEW or EDIT.
* `EDIT` - the variable will not be visible. **Cannot be applied to a primary key column**.
* `VIEW` - the variable will not be visible. Can be applied to a primary key column. Simply omitting the row, or setting CLS_ACTIVE to 0, would result in the same behaviour.
It is possible that a variable can have multiple values for CLS_HIDE, eg if a user is in multiple groups, or if different rules apply for different scopes. In this case, if the user is any group where this variable is NOT hidden, then it will be displayed.
## Example Config
Example values as follows:
|CLS_SCOPE:$4|CLS_GROUP:$64|CLS_LIBREF:$8| CLS_TABLE:$32|CLS_VARIABLE_NM:$32|CLS_ACTIVE:8.|CLS_HIDE:8.|
|---|---|---|---|---|---|---|
|EDIT|Group 1|MYLIB|MYDS|VAR_1|1||
|ALL|Group 1|MYLIB|MYDS|VAR_2|1||
|ALL|Group 2|MYLIB|MYDS|VAR_3|1||
|VIEW|Group 1|MYLIB|MYDS|VAR_4|1||
|EDIT|Group 1|MYLIB|MYDS|VAR_5|1|1|
If a user is in Group 1, and viewing `MYLIB.MYDS` in EDIT mode, **all** columns will be visible but only the following columns will be editable:
* VAR_1
* VAR_2
The user will be unable to add or delete rows.
If the user is in both Group 1 AND Group 2, viewing `MYLIB.MYDS` in VIEW mode, **only** the following columns will be visible:
* VAR_2
* VAR_3
* VAR_4
## Video Example
This short video does a walkthrough of applying Column Level Security from end to end.
<iframe width="560" height="315" src="https://www.youtube.com/embed/jAVt-omtjVc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

View File

@ -1,46 +0,0 @@
# Data Controller for SAS®: Overview
## What does the Data Controller do?
The Data Controller allows users to add, modify, and delete data. All changes are staged and approved before being applied to the target table. The review process, as well as using generic and repeatable code to perform updates, works to ensure data integrity.
## What is a Target Table?
A Target Table is a physical table, such as a SAS dataset or a Table in a database. The attributes of this table (eg Primary Key, loadtype, library, SCD variables etc) will have been predefined by your administrator so that you can change the data in that table safely and easily.
## How does it work?
From the Editor tab, a user selects a library and table for editing. Data can then be edited directly, or a uploaded from a file. After submitting the change, the data is loaded to a secure staging area, and the approvers are notified. The approver (which may also be the editor, depending on configuration) reviews the changes and accepts / or rejects them. If accepted, the changes are applied to the target table by the system account, and the history of that change is recorded.
## Who is it for?
There are 5 roles identified for users of the Data Controller:
1. *Viewer*. A viewer uses the Data Controller as a means to explore data without risk of locking datasets. By using the Data Controller to view data, it also becomes possible to 'link' to data (eg copy the url to share a table with a colleague).
2. *Editor*. An editor makes changes to data in a table (add, modify, delete) and submits those changes to the approver(s) for acceptance.
3. *Approver*. An approver accepts / rejects proposed changes to data under their control. If accepted, the change is applied to the target table.
4. *Auditor*. An auditor has the ability to review the [history](dc-userguide.md#history) of changes to a particular table.
5. *Administrator*. An administrator has the ability to add new [tables](dcc-tables.md) to the Data Controller, and to configure the security settings (at metadata group level) as required.
## What is a submission?
The submission is the data that has been staged for approval. Note - submissions are never applied automatically! They must always be approved by 1 or more approvers first. The process of submission varies according to the type of submit.
### Web Submission
When using the Web editor, a frontend check is made against the subset of data that was filtered for editing to see which rows are new / modified / marked deleted. Only those changed rows (from the extract) are submitted to the staging area.
### Excel Submission
When importing an excel file, all rows are loaded into the web page. You have an option to edit those records. If you edit them, the original excel is discarded, and only changed rows are submitted (it becomes a web submission). If you hit SUBMIT immediately, then ALL rows are staged, and a copy of the excel file is uploaded for audit purposes.
### CSV submission
A CSV upload bypasses the part where the records are loaded into the web page, and ALL rows are sent to the staging area directly. This makes it suitable for larger uploads.
## Edit Stage Approve Workflow
Up to 500 rows can be edited (in the web editor) at one time. These edits are submitted to a staging area. After one or more approvals (acceptances) the changes are applied to the source table.
![screenshot](img/dcu_flow.png)
## Use Case Diagram
There are five roles (Viewer, Editor, Approver, Auditor, Administrator) which correspond to 5 primary use cases (View Table, Edit Table, Approve Change, View Change History, Configure Table)
<img src="/img/dcu-usecase.svg" height="350" style="border:3px solid black" >

View File

@ -1,70 +0,0 @@
# Data Controller for SAS: User Guide
## Interface
The Data Controller has 5 tabs, as follows:
* *[Viewer](#viewer)*. This tab lets users view any table to which they have been granted access in metadata. They can also download the data as csv, excel, or as a SAS program (datalines). Primary key fields are coloured green.
* *[Editor](#editor)*. This tab enables users to add, modify or delete data. This can be done directly in the browser, or by uploading a CSV file. Values can also be copy-pasted from a spreadsheet. Once changes are ready, they can be submitted, with a corresponding reason.
* *[Submitted](#submitted)*. This shows and editor the outstanding changes that have been submitted for approval (but have not yet been approved or rejected).
* *[Approvals](#approvals)*. This shows an approver all their outstanding approval requests.
* *[History](#history)*. This shows an auditor, or other interested party, what changes have been submitted for each table.
### Viewer
#### Overview
The viewer screen provides users with a raw view of underlying data. It is only possible to view tables that have been registered in metadata.
Advantages of using the viewer (over client tools) for browsing data include:
* Ability to provide links to tables / filtered views of tables (just copy url)
* In the case of SAS datasets, prevent file locks from ocurring
* Ability to quickly download a CSV / Excel / SAS Cards program for that table
#### Usage
Choose a library, then a table, and click view to see the first 5000 rows.
A filter option is provided should you wish to view a different section of rows.
The Download button gives three options for obtaining the current view of data:
1) CSV. This provides a comma delimited file.
2) Excel. This provides a tab delimited file.
3) SAS. This provides a SAS program with data as datalines, so that the data can be rebuilt as a SAS table.
Note - if the table is registered in Data Controller as being TXTEMPORAL (SCD2) then the download option will prefilter for the _current_ records and removes the valid from / valid to variables. This makes the CSV a suitable format for subsequent DC file upload, if desired.
### Editor
The Editor screen lets users who have been pre-authorised (via the `DATACTRL.MPE_SECURITY` table) to edit a particular table. A user selects a particular library, and table and then has 3 options:
1 - *Filter*. The user can filter before proceeding to perform edits.
2 - *Upload*. If you have a lot of data, you can [upload it directly](files). The changes are then approved in the usual way.
3 - *Edit*. This is the main interface, data is displayed in tabular format. The first column is always "Delete?", as this allows you to mark rows for deletion. Note that removing a row from display does not mark it for deletion! It simply means that this row is not part of the changeset being submitted.
The next set of columns are the Primary Key, and are shaded grey. If the table has a surrogate / retained key, then it is the Business Key that is shown here (the RK field is calculated / updated at the backend). For SCD2 type tables, the 'validity' fields are not shown. It is assumed that the user is always working with the current version of the data, and the view is filtered as such.
After this, remaining columns are shown. Dates / datetime fields have appropriate datepickers. Other fields may also have dropdowns to ensure entry of standard values, these can be configured in the `DATACTRL.MPE_SELECTBOX` table.
New rows can be added using the right click context menu, or the 'Add Row' button. The data can also be sorted by clicking on the column headers.
When ready to submit, hit the SUBMIT button and enter a reason for the change. The owners of the data are now alerted (so long as their email addresses are in metadata) with a link to the approve screen.
If you are also an approver you can approve this change yourself.
#### Special Missings
Data Controller supports special missing numerics, ie - a single letter or underscore. These should be submitted _without_ the leading period. The letters are not case sensitive.
#### BiTemporal Tables
The Data Controller only permits BiTemporal data uploads at a single point in time - so for convenience, when viewing data in the edit screen, only the most recent records are displayed. To edit earlier records, either use file upload, or apply a filter.
### Submitted
This page shows a list of the changes you have submitted (that are not yet approved).
### Approvals
This shows the list of changes that have been submitted to you (or your groups) for approval.
### History
View the list of changes to each table, who made the change, when, etc.

View File

@ -1,43 +0,0 @@
# Data Controller for SAS® - Dates & Datetimes
## Overview
Dates & datetimes are actually stored as plain numerics in regular SAS tables. In order for the Data Controller to recognise these values as dates / datetimes a format must be applied.
![displayed](img/dcc-dates1.png) ![source](img/dcc-dates2.png)
Supported date formats:
* DATE.
* DDMMYY.
* MMDDYY.
* YYMMDD.
* E8601DA.
* B8601DA.
Supported datetime formats:
* DATETIME.
Supported time formats:
* TIME.
* HHMM.
In SAS 9, this format must also be present / updated in the metadata view of the (physical) table to be displayed properly. This can be done using DI Studio, or by running the following (template) code:
```sas
proc metalib;
omr (library="Your Library");
folder="/Shared Data/table storage location";
update_rule=(delete);
run;
```
If you have other dates / datetimes / times you would like us to support, do [get in touch](https://datacontroller.io/contact)!

View File

@ -1,24 +0,0 @@
---
layout: article
title: Groups
description: By default, Data Controller will work with the SAS Groups defined in Viya, Metadata, or SASjs Server. It is also possible to define custom groups with Data Controller itself.
og_image: https://i.imgur.com/drGQBBV.png
---
# Adding Groups
## Overview
By default, Data Controller will work with the SAS Groups defined in Viya, Metadata, or SASjs Server. It is also possible to define custom groups with Data Controller itself - to do this simply add the user and group name (and optionally, a group description) in the `DATACTRL.MPE_GROUPS` table.
![](https://i.imgur.com/drGQBBV.png)
## Data Controller Admin Group
When configuring Data Controller for the first time, a group is designated as the 'admin' group. This group has unrestricted access to Data Controller. To change this group, modify the `%let dc_admin_group=` entry in the settings program, located as follows:
* **SAS Viya:** $(appLoc)/services/settings.sas
* **SAS 9:** $(appLoc)/services/public/Data_Controller_Settings
* **SASjs Server:** $(appLoc)/services/public/settings.sas
To prevent others from changing this group, ensure the Data Controller appLoc (deployment folder) is write-protected - eg RM (metadata) or using Viya Authorisation rules.

View File

@ -1,69 +0,0 @@
---
layout: article
title: DC Options
description: Options in Data Controller are set in the MPE_CONFIG table and apply to all users.
og_title: Data Controller for SAS® Options
og_image: /img/mpe_config.png
---
# Data Controller for SAS® - Options
The [MPE_CONFIG](/tables/mpe_config/) table provides a number of system options, which apply to all users. The table may be re-purposed for other applications, so long as scopes beginning with "DC_" are avoided.
Currently used scopes include:
* DC
* DC_CATALOG
## DC Scope
### DC_EMAIL_ALERTS
Set to YES or NO to enable email alerts. This requires email options to be preconfigured (mail server etc).
### DC_MAXOBS_WEBEDIT
By default, a maximum of 100 observations can be edited in the browser at one time. This number can be increased, but note that the following factors will impact performance:
* Number of configured [Validations](/dcc-validations)
* Browser type and version (works best in Chrome)
* Number (and size) of columns
* Speed of client machine (laptop/desktop)
### DC_REQUEST_LOGS
On SASjs Server and SAS9 Server types, at the end of each DC SAS request, a record is added to the [MPE_REQUESTS](/tables/mpe_requests) table. In some situations this can cause table locks. To prevent this issue from occuring, the `DC_REQUEST_LOGS` option can be set to `NO` (Default is `YES`).
### DC_RESTRICT_EDITRECORD
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.
Anything other than YES will mean that the modal _is_ available.
Default=NO
### DC_RESTRICT_VIEWER
Set to YES to restrict the list of libraries and tables in VIEWER to only those explicitly set to VIEW in the MPE_SECURITY table. The default is NO (users can see all tables they already have permission to see).
### DC_VIEWLIB_CHECK
Set to YES to enable library validity checking in viewLibs service. This means that on first load, SAS will attempt to open each library to see if it is possible to do so. This reduces the number of libraries in the list, but means that it is slow to load the first time around.
The default is NO.
### DC_LOCALE
Set to a locale (such as `en_gb` or `en_be`) to override the system value (which may be derived from client browser settings).
This feature 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.
!!! note
If you have clients in different geographies loading excel in local formats, you can also address this issue by ensuring the locale of the windows _user_ profile is not set to the default (eg `English (United States)`). When leaving the DC_LOCALE as SYSTEM, the locale settings in SAS are not added or modified.
## DC_CATALOG Scope
### DC_IGNORELIBS
When running the [Refresh Data Catalog](/admin-services/#refresh-data-catalog) service, it is often that case the the process will fail due to being unable to assign a library. To avoid the need to resolve the connection issue elsewhere in SAS, you can simply exclude it from the Data Catalog, by including the LIBREF in this field (pipe-separated)
## DC_REVIEW Scope
### HISTORY_ROWS
Number of rows to return for each HISTORY page. Default - 100. Increasing this will increase for all users. Using very large numbers here can result in a sluggish page load time. If you need large amounts of HISTORY data, it is generally better to extract it directly from the [MPE_REVIEW](/tables/mpe_review/) table.

View File

@ -1,42 +0,0 @@
# Data Controller for SAS® - Security
## Summary
DC security is applied at the level of Table and Group. Permissions can only be set at group level. There are two parts to adding a user:
1 - Adding the user to the relevant [group](/dcc-groups)
2 - Ensuring that group has the appropriate access level in the MPE_SECURITY table
For guidance with adding SAS users in SAS 9, see [SAS Documentation](http://support.sas.com/documentation/cdl/en/mcsecug/69854/HTML/default/viewer.htm#n05epzfefjyh3dn1xdw2lkaxwyrz.htm).
## Details
In order to surface a table to a new group, simply add a record to the `DATACTRL.MPE_SECURITY` table. The `library.dataset` value should go in the `BASE_TABLE` field, the level of access (either _EDIT_ or _APPROVE_) should go in the `ACCESS_LEVEL` field, and the exact name of the relevant metadata group should go in the `SAS_GROUP` field. The change should then be submitted, and approved, at which point the new security setting will be applied.
![Screenshot](img/securitytable.png)
## ACCESS_LEVEL
### EDIT
The `EDIT` permission determines which groups will be able to upload CSVs and submit changes via the web interface for that table.
### APPROVE
The `APPROVE` permission determines which groups will be able to approve those changes, and hence enable the target table to be loaded. If you wish to have members of a particular group both edit AND approve, then two lines (one for each group) must be entered, per table.
### VIEW
The default behaviour when installing Data Controller is that the [viewer](dcu-tableviewer.md) lets all SAS Users see all the tables that they are authorised to view in SAS. However there may be reasons to further restrict the tables in this component.
There is a global setting that will disable ALL tables in VIEWER unless explicitly authorised - this is available in MPE_CONFIG. Set `DC_RESTRICT_VIEWER=YES`, submit, and approve.
If authorising groups without this setting, it means that tables will be restricted only in that library (the rest will still be visible).
Groups can be given VIEW access for all libraries or all tables within a library by using the keyword `*ALL*` instead of the libref / tablename.
It's also worth being aware of the `DC_VIEWLIB_CHECK` option in MPE_CONFIG. When this is switched on, SAS will confirm that the library is valid and contains tables, before adding to the list. This can sometimes be slow (depending on your library configurations), hence disabled - but as the list is actually cached on frontend (until the next hard refresh) the impact may worth it.
## Determining Group Members
Before adding a group to Data Controller, it helps to know the members of that group! A User navigator is available in both the SAS 9 and Viya version of Data Controller. You can navigate Users, Groups and Roles (roles are only visible in the SAS 9 version).
This means you do not need SAS Management Console or SAS Environment Manager to manage Data Controller users. However you will need those tools for managing SAS Groups, unless you define your own groups in the [MPE_GROUPS](dcc-groups.md) table.

View File

@ -1,24 +0,0 @@
# Data Controller for SAS® - Selectboxes
## Overview
To ensure data validity and to improve user experience, it is possible to predesignate specific values for data entry. These appear to the user as a selectbox within the editor interface.
## Configuration
Values are added by populating the `DATACTRL.MPE_SELECTBOX` table, eg below:
![selectboxtable](img/mpe_selectboxtable.png)
### BASE_LIBDS
The library.dataset to which the selectbox needs to be applied
### BASE_COLUMN
The column in which the selectbox values will be entered
### SELECTBOX_VALUE
The actual values to be shown in the selectbox
### SELECTBOX_ORDER
The order in which the selectbox values should be displayed
### SELECTBOX_TYPE
Reserved for future use.

View File

@ -1,224 +0,0 @@
---
layout: article
title: MPE_TABLES
description: Adding tables to the Data Controller is a matter of configuration, specifically the addition of a new record to `DATACTRL.MPE_TABLES`, and corresponding entries in `DATACTRL.MPE_SECURITY`.
og_image: https://i.imgur.com/DtVU62u.png
---
# Data Controller for SAS® - Adding Tables
## Overview
Adding tables to the Data Controller is a matter of configuration, specifically the addition of a new record to the `DATACTRL.MPE_TABLES` table, and corresponding entries in the `DATACTRL.MPE_SECURITY` table.
!!! note
In order to surface the table to (non admin) users, appropriate groups should be configured as per [security](dcc-security.md) settings.
![screenshot](img/configtable.png)
## MPE_TABLES Configuration Details
Each table to be edited in the Data Controller is represented by one record in `DATACTRL.MPE_TABLES`. The fields should be populated as follows:
### LIBREF
The libref of the table. If not pre-assigned, and the serverType is SAS 9 (EBI), DC will assign it at runtime using the first definition found in metadata, using this [macro](https://core.sasjs.io/mm__assigndirectlib_8sas.html).
### DSN
The dataset (table) name as visible when assigning a direct libref connection to `LIBREF`. If the target is a format catalog, it should have a "-FC" suffice (eg `FORMATS-FC`). More info on formats [here](formats.md).
### NUM_OF_APPROVALS_REQUIRED
This is an integer representing the number of approvals required before a table is updated. This mechanism lets you insist on, for example, 2 or 3 approvals before sensitive data is updated following a submission. Note that only one rejection is ever necessary to remove the submission.
This is a required field.
### LOADTYPE
The loadtype determines the nature of the update to be applied. Valid values are as follows:
- UPDATE. This is the most basic type - simply provide the primary key fields in the `BUSKEY` column.
- FORMAT_CAT. For updating Format Catalogs, the BUSKEY should be `FMTNAME START`. See [formats](/formats).
- TXTEMPORAL. This signifies an SCD2 type load. For this type the validity fields (valid from, valid to) should be specified in the `VAR_TXFROM` and `VAR_TXTO` fields. The table itself should include `VAR_TXFROM` in the physical key. The remainder of the primary key fields (not including `VAR_TXFROM`) should be specified in `BUSKEY`.
- BITEMPORAL. These tables have two time dimensions - a version history, and a business history. The version history (SCD2) fields should be specified in `VAR_TXFROM` and `VAR_TXTO` and the business history fields should be specified in `VAR_BUSFROM` and `VAR_BUSTO`. Both the `VAR_TXFROM` and `VAR_BUSFROM` fields should be in the physical key of the actual table, but should NOT be specified in the `BUSKEY` field.
- REPLACE. This loadtype simply deletes all the rows and appends the staged data. Changes are NOT added to the audit table. In the diff screen, previous rows are displayed as deleted, and staged rows as new (modified values are not displayed). Can be useful for updating single-row tables.
This is a required field.
!!! Note
The support for BITEMPORAL loads is restricted, in the sense it is only possible to load data at a single point in time (no support for loading _multiple_ business date ranges for a _specific_ BUSKEY). The workaround is simply to load each date range separately. As a result of this restriction, the EDIT page will only show the latest business date range for each key. To modify earlier values, a filter should be applied.
!!! Warning
If your target table contains referential constraints (eg primary key values that are linked to a child table with a corresponding foreign key) then this will cause problems with the UPDATE and REPLACE load types. This is due to the fact these both involve delete operations. If removal of these constraints is not an option, the workaround would be to create a separate (mirror) table, and update that using PRE-EDIT and POST-APPROVE hook scripts. Please contact Data Controller support for advice / assistance.
### BUSKEY
The business (natural) key of the table. For SCD2 / Bitemporal, this does NOT include the validity dates. For Retained / Surrogate key tables, this contains the actual surrogate key - the underlying fields that are used to create the surrogate key are specified in [RK_UNDERLYING](#rk_underlying).
This is a required field.
### VAR_TXFROM / VAR_TXTO
The SCD2 type validity dates, representing the point in time at which the field was created (`VAR_TXFROM`) and when it was closed out (`VAR_TXTO`) from a change or deletion. If the record is active, the `VAR_TXTO` field would contain a high value. `VAR_TXFROM` is a part of the physical key of the underlying table.
These fields should contain the NAME of the variables which contain the open / close timestamps in the underlying table.
Leave blank if not required.
### VAR_BUSFROM / VAR_BUSTO
The BITEMPORAL _business_ dates which represent the reporting period to which the record is valid. Typically these contain _date_ values (rather than _datetime_ values). If variables are specified here, then the [LOADTYPE](#loadtype) should be `BITEMPORAL`.
Leave blank if not required.
### VAR_PROCESSED
Set the name of a variable (eg `processed_dttm`) which should be given a current timestamp whenever the table is updated.
Leave blank if not required.
### CLOSE_VARS
By default, the Data Controller will only process the records that are part of a changeset. This means that records should be explicity marked for deletion. But what if you are performing a reload of a monthly batch, and the _absence_ of a record implies that it is no longer required? For this scenario, it is necessary to specify the range within a 'complete' load is expected. For instance, by reporting month, or month + product. When performing loads, the DC will then first extract a distinct list of values for this key and close them out in the target table, before performing the upload. The `CLOSE_VARS` are typically a subset of the [BUSKEY](#buskey) fields.
Leave blank if not required.
### PRE_EDIT_HOOK
[Hook script](#hook-scripts) to execute _prior_ to an edit being made. This allows data to be modified before being presented for editing, or for display formats to be applied.
Leave blank if not required.
SAS Developer Notes:
* Target dataset: `work.OUT`
* Filters will have been applied, and table sorted on [BUSKEY](#buskey)
* Base libref.table or catalog variable: `&orig_libds`
### POST_EDIT_HOOK
[Hook script](#hook-scripts) to execute _after_ an edit has been made. Useful when there is a need to augment data (derived / calculated columns), or perform advanced data quality checks prior to approval.
Leave blank if not required.
SAS Developer Notes:
* Staged dataset: `work.STAGING_DS`
* Target libref.table or catalog variable: `&orig_libds`
If your DQ check means that the program should not be submitted, then simply exit with `&syscc > 4`. You can even set a message to go back to the user by using the [mp_abort](https://core.sasjs.io/mp__abort_8sas.html) macro:
```
%mp_abort(iftrue= (&syscc ne 0) /* if this condition is true, the process will exit */
,msg=%str(YOUR MESSAGE GOES HERE)
)
```
### PRE_APPROVE_HOOK
This [hook script](#hook-scripts) will execute twice during a typical workflow - firstly, before the approval diff is generated, and again after the approval (not rejection) and _before_ the change is applied.
This makes it a helpful place to prevent changes being made, eg in situations where the target table needs to be locked by alternative systems.
It can also be used to apply display formats, or to prepare any derived 'system' columns such as "LAST_APPROVER_NM".
Leave blank if not required.
SAS Developer Notes:
* Staged dataset: `work.STAGING_DS`
* Target libref.table or catalog variable: `&orig_libds`
### POST_APPROVE_HOOK
This [hook script](#hook-scripts) is `%inc`'d _after_ an approval is made. This is the most common type of hook script, and is useful for, say, running a SAS job after a mapping table is updated, or running a model after changing a parameter.
Leave blank if not required.
SAS Developer Notes:
At the point of running this script, the data has already been loaded (successfully) to the target table. Therefore the target is typically the base libref.table (or format catalog) itself and can be referenced directly (YOURLIB.YOURDATASET), or using either of the following macro variable:
* `&orig_libds`
* `&libref..&ds`
The staged table is also available, as `work.STAGING_DS`.
If you are making changes to the target table as part of the hook, then in order to prevent contention from other users making concurrent edits, you are advised to "LOCK" and "UNLOCK" it using the [mp_lockanytable](https://core.sasjs.io/mp__lockanytable_8sas.html) macro:
```
/* lock SOMELIB.SOMETABLE */
%mp_lockanytable(LOCK,
lib=SOMELIB,
ds=SOMETABLE,
ref=Locking table to peform a post approve hook action
ctl_ds=&mpelib..mpe_lockanytable
)
/* do stuff */
proc sort data=somelib.sometable;
run;
/* unlock */
%mp_lockanytable(UNLOCK,
lib=SOMELIB,
ds=SOMETABLE,
ctl_ds=&mpelib..mpe_lockanytable
)
```
The SAS session will already contain the mp_lockanytable macro definition.
### SIGNOFF_COLS
Used to determine a range (eg reporting month) to which a 'final version' can be marked. This allows a particular version of data to be marked as final, meaning that the data can continue to change afterwards (reports can simply query for the timestamp of the 'final' version of the data).
Leave blank if not required.
### SIGNOFF_HOOK
This [hook script](#hook-scripts) is `%inc`'d after a 'final version' has been signed off.
Leave blank if not required.
### NOTES
Content entered here will be displayed to the approver on signoff.
Not required, but recommended.
### RK_UNDERLYING
For retained / surrogate keys, an auto-incrementing field is used to represent each unique record. In this case, the RK (integer) field itself should be added in the [BUSKEY](#buskey) column, and the natural / underlying key should be added here.
Leave blank unless using retained / surrogate keys.
### AUDIT_LIBDS
If this field is blank (ie empty, missing), **every** change is captured in the [MPE_AUDIT](/tables/mpe_audit). This can result in large data volumes for frequently changing tables.
Alternative options are:
1. Enter a zero (`0`) to switch off audit logging completely
2. Enter a library.dataset reference of an alternative audit table in which to capture the change history.
For option 2, the base table structure can be generated using this macro: [https://core.sasjs.io/mddl__dc__difftable_8sas_source.html](https://core.sasjs.io/mddl__dc__difftable_8sas_source.html).
## HOOK Scripts
Data Controller allows SAS programs to be executed at certain points in the ingestion lifecycle, such as:
* Before an edit (to control the edit screen)
* After an edit (perform complex data quality)
* Before an approval (control the approve screen)
* After an approval (trigger downstream jobs with new data)
The code is simply `%include`'d at the relevant point during backend execution. The program may be:
* Physical, ie the full path to a `.sas` program on the physical server directory
* Logical, ie a Viya Job (SAS Drive), SAS 9 Stored Process (Metadata Folder) or SASJS Stored Program (SASjs Drive).
If the entry ends in `".sas"` it is assumed to be a physical, filesystem file. Otherwise, the source code is extracted from SAS Drive or Metadata.
To illustrate:
* Physical filesystem (ends in .sas): `/opt/sas/code/myprogram.sas`
* Logical filesystem: `/Shared Data/stored_processes/mydatavalidator`
!!! warning
Do not place your hook scripts inside the Data Controller (logical) application folder, as they may be inadvertently lost during a deployment (eg in the case of a backup-and-deploy-new-instance approach).

View File

@ -1,56 +0,0 @@
---
layout: article
title: Data Validation
description: Quality in, Quality out! Enforce data quality checks at the point of SAS data entry, both directly via the web interface and also via Excel uploads.
og_image: https://i.imgur.com/P64ijBB.png
---
# Data Controller for SAS® - DQ Validations
## Overview
Quality in, Quality out! Data Controller lets you enforce quality checks at the point of data entry, both directly via the web interface and also via Excel uploads.
## Default Checks
By default, the following frontend rules are always applied:
* Length checking per target table variable lengths
* Type checking per target table datatypes (Character, Numeric, Date, Time, Datetime)
* Not Null check per target table constraints
* Primary Key checking per business key defined in MPE_TABLES
It is possible to configure a number of other rules by updating the MPE_VALIDATIONS table. Simply set the `BASE_LIB`, `BASE_DS` and `BASE_COL` values, and ensure `RULE_ACTIVE=1` for it to be applied.
## Configurable Checks
Check back frequently as we plan to keep growing this list of checks.
|Rule Type|Example Value |Description|
|---|---|---|
|CASE|UPCASE|Will enforce the case of cell values. Valid values: UPCASE, LOWCASE, PROPCASE|
|NOTNULL|(defaultval)|Will prevent submission if null values are present. Optional - provide a default value.|
|MINVAL|1|Defines a minimum value for a numeric cell|
|MAXVAL|1000000|Defines a maximum value for a numeric cell|
|HARDSELECT|sashelp.class.name|A distinct list of values (max 1000) are taken from this library.member.column reference, and the value **must** be in this list. This list may be supplemented by entries in the MPE_SELECTBOX table.|
|SOFTSELECT|dcdemo.mpe_tables.libref|A distinct list of values (max 1000) are taken from this library.member.column reference, and the user-provided value may (or may not) be in this list. This list may be supplemented by entries in the MPE_SELECTBOX table.|
|[HARDSELECT_HOOK](/dynamic-cell-dropdown)|/logical/folder/stpname|A SAS service (STP or Viya Job) or a path to a SAS program on the filesystem. User provided values **must** be in this list. Cannot be used alongside a SOFTSELECT_HOOK.|
|[SOFTSELECT_HOOK](/dynamic-cell-dropdown)|/physical/path/program.sas|A SAS service (STP or Viya Job) or a path to a SAS program on the filesystem. User-provided values may (or may not) be in this list. Cannot be used alongside a HARDSELECT_HOOK.|
## Dropdowns
There are now actually FIVE places where you can configure dropdowns!
1. The [MPE_SELECTBOX](/dcc-selectbox/) table
2. The HARDSELECT validation (library.member.column reference)
3. The SOFTSELECT validation (library.member.column reference)
4. The HARDSELECT_HOOK validation (SAS Program)
5. The SOFTSELECT_HOOK validation (SAS Program)
How do these inter-operate?
Well - if you have values in MPE_SELECTBOX and/or HARDSELECT / SOFTSELECT tables, they will be merged together, and served in ADDITION to the values provided by any HOOK program.
Dropdowns are SOFT by default, unless a HARD rule is present.
Data Controller will not let you submit both a HARDSELECT_HOOK and a SOFTSELECT_HOOK on the same variable.

View File

@ -1,190 +0,0 @@
---
layout: article
title: DC SAS 9 Deployment
description: How to deploy Data Controller in a production SAS 9 environment
og_image: https://docs.datacontroller.io/img/dci_deploymentdiagram.png
---
# SAS 9 Deployment
## Deployment Process
There are two ways to deploy Data Controller on SAS 9:
* Full Deployment (preferred)
* Streaming (for quick demos)
### Full Deployment
#### 1 - Deploy Stored Processes
The Stored Processes are deployed using a SAS Program. This should be executed using an account that has WRITE METADATA (WM) permissions to the necessary root folder (`appLoc`) in metadata.
```sas
%let appLoc=/Shared Data/apps/DataController; /* CHANGE THIS!! */
filename dc url "https://git.datacontroller.io/dc/dc/releases/download/vX.X.X/sas9.sas; /* use correct release */
%inc dc;
```
If you don't have internet access from SAS, download `sas9.sas` from [here](https://git.datacontroller.io/dc/dc/releases), and change the `compiled_apploc` on line 2:
![](img/sas9_apploc.png)
You can also change the `serverName` here, which is necessary if you are using any other logical server than `SASApp`.
#### 2 - Deploy the Frontend
The Data Controller frontend comes pre-built, and ready to deploy to the root of the SAS Web Server (mid-tier).
Deploy as follows:
1. Download the `frontend.zip` file from: [https://git.datacontroller.io/dc/dc/releases](https://git.datacontroller.io/dc/dc/releases)
2. Unzip and place in the [htdocs folder of your SAS Web Server](https://sasjs.io/frontend-deployment/#sas9-deploy) - typically `!SASCONFIG/LevX/Web/WebServer/htdocs`.
3. Open the `index.html` file and update the values as follows:
* `appLoc` - same as per SAS code in the section above
* `serverType` - should be `SAS9`
* `serverUrl` - Provide only if your SAS Mid Tier is on a different domain than the web server (protocol://SASMIDTIERSERVER:port)
* `loginMechanism` - set to `Redirected` if using SSO or 2FA
* `debug` - set to `true` to debug issues on startup (otherwise it's faster to leave it off and turn on in the application itself when needed)
The remaining properties are not relevant for a SAS 9 deployment.
![](img/indexhtml_settings.png)
You can now open the app at `https://YOURWEBSERVER/unzippedfoldername` and follow the configuration steps (DC Physical Location and Admin Group) to complete deployment.
#### 3 - Run the Configurator
When opening Data Controller for the first time, a configuration screen is presented. Be sure to log in with an account that has WRITE METADATA (WM) on the following metadata folders:
* `services/admin` - so the configurator STP can be deleted after being run
* `services/common` - so the `Data_Controller_Settings` STP can be updated
* `Data` - so the library and tables can be registered (using proc metalib)
There are two things to configure:
1. Path to the designated physical staging area. Make sure that the SAS Spawned Server account (eg `sassrv`) has WRITE access to this location.
2. Admin Group. ⚠️ Note that anyone in this group will have unrestricted access to Data Controller! ⚠️ "Unrestricted access" is provided by code logic. Post installation, Data Controller will never update nor modify metadata.
!!! note
If you do not see any groups, then it is possible your Stored Process is running from a different metadata repository to the location of your SAS users (eg Foundation). To fix this, update the `services/admin/configurator` STP with this code: `%let dc_repo_users=YOUUSERRMETAREPO;`
After you click submit, the Stored Process will run, configure the staging area and create the library tables (as datasets).
You will then be presented with three further links:
1. Refresh Data Catalog. Run this to scan all available datasets and update the catalog.
2. Refresh Table Metadata. Run this to update the table-level data lineage.
3. Launch. Currently this feature only works for streaming apps - just refresh the page for a full deployment.
#### 4 - Performance Enhancement
The most common performance bottlenecks (# of available connections, memory in each connection) can be addressed by the following (administrator) actions:
* Increasing the number of multibridge connections in SMC
* Increasing MEMSIZE (eg `-memsize 4G`) in the STP Options file
### Streaming
The streaming approach is optimised for rapid deployment, and works by bundling the frontend into metadata. This is a highly inefficient way to serve web content, and thus should only really be used for demos / evaluation purposes.
Deployment is very easy - just run the SAS code below (after changing the `appLoc`):
```sas
%let appLoc=/Shared Data/apps/DataController; /* CHANGE THIS!! */
filename dc url "https://git.datacontroller.io/dc/dc/releases/download/vX.X.X/demostream_sas9.sas"; /* use actual version number */
%inc dc;
```
If you don't have internet access from your SAS environment, just download `demostream_sas9.sas` from [https://git.datacontroller.io/dc/dc/releases](https://git.datacontroller.io/dc/dc/releases) and modify the `appLoc` on line 2, as follows:
![](img/sas9_apploc.png)
After that, continue to the configuration as described above.
## Deployment Diagram
A Full Deployment of Data Controller for SAS 9 consists of:
* Frontend on the web server
* Stored Processes (+ Library & Table definitions) in metadata
* Staging Area on the physical filesystem
* Database _or_ SAS Base library
The below areas of the SAS platform are modified when deploying Data Controller:
![](img/dci_deploymentdiagram.svg)
<!--img src="/img/dci_deploymentdiagram.svg" height="350" style="border:3px solid black" -->
### Client Device
Nothing needs to be deployed or modified on the client device. We support a wide range of browsers (the same as SAS). Browsers make requests to the SAS Web Server, and will cache assets such as JS, CSS and images. Some items (such as dropdowns) are kept in local storage to improve responsiveness.
### SAS Mid Tier
A single `index.html` file plus several CSS / JS / image files are served from a subfolder in the static content area SAS Web Server.
This is served up by the _existing_ SAS Web Server, no additional server (running) process is required.
If you are running more than one web server, you will need to deploy to them all.
### SAS Application Server
Given the enhanced permissions needed of the system account, a dedicated / secured STP instance is recommended as described [here](/dci-stpinstance).
All deployments of Data Controller also make use of a physical staging directory. This is used to store staged data, logs, plus CSV and Excel files as uploaded by end users. This directory should NOT be accessible by end users - only the SAS system account (eg `sassrv`) requires access to this directory.
A typical small deployment will grow by a 10-20 mb each month. A very large enterprise customer, with 100 or more editors, might generate up to 1 GB or so per month, depending on the size and frequency of the Excel EUCs and CSVs being uploaded. Web modifications are restricted only to modified rows, so are typically just a few kb in size.
### SAS Metadata Server
The items deployed to metadata include:
* Folder tree
* Stored Processes
* Library Object & tables
All SAS code is embedded in Stored Processes (so there is no need to deploy programs to the file system, no SASAUTOs). There is no use of X commands, no use of external internet access, full LOCKDOWN is supported.
After the installation process (which updates `public/settings` and removes the `admin/makedata` STP), there are no write actions performed against metadata.
### Databases
We strongly recommend that the Data Controller configuration tables are stored in a database for concurrency reasons.
We have customers in production using Oracle, Postgres, Netezza, Redshift and SQL Server to name a few. Contact us for support with DDL and migration steps for your chosen vendor.
!!! note
Data Controller does NOT modify schemas! It will not create or drop tables, or add/modify columns or attributes. Only data _values_ (not the model) can be modified using this tool.
To caveat the above - it is also quite common for customers to use a BASE engine library. Data Controller ships with mechananisms to handle locking (internally) but it cannot handle external contentions, such as those caused when end users open datasets directly, eg with Enterprise Guide or Base SAS.
## Redeployment
The full redeployment process is as follows:
* Back up metadata (export DC folder as SPK file)
* Back up the physical tables in the DC library
* Do a full deploy of a brand new instance of DC
- To a new metadata folder
- To a new frontend folder (if full deploy)
* _Delete_ the **new** DC library (metadata + physical tables)
* _Move_ the **old** DC library (metadata only) to the new DC metadata folder
* Copy the _content_ of the old `services/public/Data_Controller_Settings` STP to the new one
- This will link the new DC instance to the old DC library / logs directory
- It will also re-apply any site-specific DC mods
* Run any/all DB migrations between the old and new DC version
- See [migrations](https://git.datacontroller.io/dc/dc/src/branch/main/sas/sasjs/db/migrations) folder
* Test and make sure the new instance works as expected
* Delete (or rename) the **old** instance
- Metadata + frontend, NOT the underlying DC library data
* Rename the new instance so it is the same as the old
- Both frontend and metadata
* Run a smoke test to be sure everything works!
If you are unfamiliar with, or unsure about, the above steps - don't hesitate to contact the Data Controller team for assistance and support.

View File

@ -1,185 +0,0 @@
---
layout: article
title: DC SAS Viya Deployment
description: How to deploy Data Controller in a production SAS Viya environment
og_image: https://docs.datacontroller.io/img/dci_deploymentdiagramviya.png
---
# SAS Viya Deployment
## Overview
Data Controller for SAS Viya consists of a frontend, a set of Job Execution Services, a staging area, a Compute Context, and a database library. The library can be a SAS Base engine if desired, however this can cause contention (eg table locks) if end users are able to connect to the datasets directly, eg via Enterprise Guide or Base SAS.
A database that supports concurrent access is highly recommended.
## Prerequisites
### System Account
Data Controller makes use of a system account for performing backend data updates and writing to the staging area. This needs to be provisioned in advance using the Viya admin-cli. The process is well described here: [https://communities.sas.com/t5/SAS-Communities-Library/SAS-Viya-3-5-Compute-Server-Service-Accounts/ta-p/620992](https://communities.sas.com/t5/SAS-Communities-Library/SAS-Viya-3-5-Compute-Server-Service-Accounts/ta-p/620992)
### Database
Whilst we do recommend that Data Controller configuration tables are stored in a database for concurrency reasons, it is also possible to use a BASE engine library, which is adequate if you only have a few users.
To migrate the control library to a database, first perform a regular deployment, and afterwards you can generate the DDL and update the settings file..
Make sure the system account (see above) has full read / write access.
!!! note
"Modify schema" privileges are not required.
### Staging Directory
All deployments of Data Controller make use of a physical staging directory. This is used to store logs, as well as CSV and Excel files uploaded by end users. This directory should NOT be accessible by end users - only the SAS system account requires access to this directory.
A typical small deployment will grow by a 5-10 mb each month. A very large enterprise customer, with 100 or more editors, might generate up to 0.5 GB or so per month, depending on the size and frequency of the Excel EUCs and CSVs being uploaded. Web modifications are restricted only to modified rows, so are typically just a few kb in size.
## Deployment Diagram
The below areas of the SAS Viya platform are modified when deploying Data Controller:
<img src="/img/dci_deploymentdiagramviya.svg" height="350" style="border:3px solid black" >
## Deployment
Data Controller deployment is split between 3 deployment types:
* Demo version
* Full Version (manual deploy)
* Full Version (automated deploy)
<!--
## Full Version - Manual Deploy
-->
There are several parts to this proces:
1. Create the Compute Context
2. Deploy Frontend
4. Prepare the database and update settings (optional)
5. Update the Compute Context autoexec
### Create Compute Context
The Viya Compute context is used to spawn the Job Execution Services - such that those services may run under the specified system account, with a particular autoexec.
We strongly recommend a dedicated compute context for running Data Controller. The setup requires an Administrator account.
* Log onto SASEnvironment Manager, select Contexts, View Compute Contexts, and click the Create icon.
* In the New Compute Context dialog, enter the following attributes:
* Context Name
* Launcher Context
* Attribute pairs:
* reuseServerProcesses: true
* runServerAs: {{the account set up [earlier](#system-account)}}
* Save and exit
!!! note
XCMD is NOT required to use Data Controller.
### Deploy frontend
Unzip the frontend into your chosen directory (eg `/var/www/html/DataController`) on the SAS Web Server. Open `index.html` and update the following inside `dcAdapterSettings`:
- `appLoc` - this should point to the root folder on SAS Drive where you would like the Job Execution services to be created. This folder should initially, NOT exist (if it is found, the backend will not be deployed)
- `contextName` - here you should put the name of the compute context you created in the previous step.
- `dcPath` - the physical location on the filesystem to be used for staged data. This is only used at deployment time, it can be configured later in `$(appLoc)/services/settings.sas` or in the autoexec if used.
- `adminGroup` - the name of an existing group, which should have unrestricted access to Data Controller. This is only used at deployment time, it can be configured later in `$(appLoc)/services/settings.sas` or in the autoexec if used.
- `servertype` - should be SASVIYA
- `debug` - can stay as `false` for performance, but could be switched to `true` for debugging startup issues
- `useComputeApi` - use `true` for best performance.
![Updating index.html](img/viyadeployindexhtml.png)
Now, open https://YOURSERVER/DataController (using whichever subfolder you deployed to above) using an account that has the SAS privileges to write to the `appLoc` location.
You will be presented with a deployment screen like the one below. Be sure to check the "Recreate Database" option and then click the "Deploy" button.
![viya deploy](img/viyadeployauto.png)
Your services are deployed! And the app is operational, albeit still a little sluggish, as every single request is using the APIs to fetch the content of the `$(appLoc)/services/settings.sas` file.
To improve responsiveness by another 700ms we recommend you follow the steps in [Update Compute Context Autoexec](/dci-deploysasviya/#update-compute-context-autoexec) below.
### Deploy Database
If you have a lot of users, such that concurrency (locked datasets) becomes an issue, you might consider migrating the control library to a database.
The first part to this is generating the DDL (and inserts). For this, use the DDL exporter as described [here](/admin-services/#export-database). If you need a flavour of DDL that is not yet supported, [contact us](https://datacontroller.io/contact/).
Step 2 is simply to run this DDL in your preferred database.
Step 3 is to update the library definition in the `$(appLoc)/services/settings.sas` file using SAS Studio.
### Update Compute Context Autoexec
First, open the `$(appLoc)/services/settings.sas` file in SAS Studio, and copy the code.
Then, open SASEnvironment Manager, select Contexts, View Compute Contexts, and open the context we created earlier.
Switch to the Advanced tab and paste in the SAS code copied from SAS Studio above.
It will look similar to:
```
%let DC_LIBREF=DCDBVIYA;
%let DC_ADMIN_GROUP={{YOUR DC ADMIN GROUP}};
%let DC_STAGING_AREA={{YOUR DEDICATED FILE SYSTEM DRIVE}};
libname &dc_libref {{YOUR DC DATABASE}};
```
To explain each of these lines:
* `DC_LIBREF` can be any valid 8 character libref.
* `DC_ADMIN_GROUP` is the name of the group which will have unrestricted access to Data Controller
* `DC_STAGING_AREA` should point to the location on the filesystem where the staging files and logs are be stored
* The final libname statement can also be configured to point at a database instead of a BASE engine directory (contact us for DDL)
If you have additional libraries that you would like to use in Data Controller, they should also be defined here.
<!--
## Full Version - Automated Deploy
The automated deploy makes use of the SASjs CLI to create the dependent context and job execution services. In addition to the standard prerequisites (a registered viya system account and a prepared database) you will also need:
* a local copy of the [SASjs CLI](https://sasjs.io/sasjs-cli/#installation)
* a Client / Secret - with an administrator group in SCOPE, and an authorization_code GRANT_TYPE. The SASjs [Viya Token Generator](https://github.com/sasjs/viyatoken) may help with this.
### Prepare the Target and Token
To configure this part (one time, manual step), we need to run a single command:
```
sasjs add
```
A sequence of command line prompts will follow for defining the target. These prompts are described [here](https://sasjs.io/sasjs-cli-add/). Note that `appLoc` is the SAS Drive location in which the Data Controller jobs will be deployed.
### Prepare the Context JSON
This file describes the context that the CI/CD process will generate. Save this file, eg as `myContext.json`.
```
{
"name": "DataControllerContext",
"attributes": {
"reuseServerProcesses": true,
"runServerAs": "mycasaccount"
},
"environment": {
"autoExecLines": [
"%let DC_LIBREF=DCDBVIYA;",
"%let DC_ADMIN_GROUP={{YOUR DC ADMIN GROUP}};",
"%let DC_STAGING_AREA={{YOUR DEDICATED FILE SYSTEM DRIVE}};",
"libname &dc_libref {{YOUR DC DATABASE}};",
],
"options": []
},
"launchContext": {
"contextName": "SAS Job Execution launcher context"
},
"launchType": "service",
}
```
### Prepare Deployment Script
The deployment script will run on a build server (or local desktop) and execute as follows:
```
# Create the SAS Viya Target
sasjs context create --source myContext.json --target myTarget
```
-->

View File

@ -1,57 +0,0 @@
# Data Controller for SAS® - Evaluation Version
## Overview
A free version of Data Controller is available for evaluation purposes. Compiled into a single SPK, it is very easy to install and configure. However it must not be used in production environments for all the reasons mentioned in the [caveats](#caveats) section.
<iframe src="https://player.vimeo.com/video/328175910" width="640" height="360" frameborder="0" allowfullscreen></iframe>
## Installation
### Deployment
#### Import
Simply import the SPK (using SAS Management Console or Data Integration Studio) to the desired location in the metadata tree. During the import (step 5 of the wizard), be sure to change the location of the library (BASE engine) to a physical **directory folder** to which the Stored Process system account (eg `sassrv`) has **write access**.
#### Permissions
Be sure that the user account you will use in the [configuration](#configuration) step below has WRITE METADATA (WM) on the `/DataController/services/admin` and `/DataController/Data` folders, and that anyone who will use the app has READ.
### Configuration
Navigate to the web application (eg `https://[YOURHOST]/SASStoredProcess?_action=1063`) and find the location where the app was imported. Then run the `DataController/services/admin/configurator` stored process.
!!! note
Use the same user account as you used to import the SPK, to avoid metadata permissions issues! This may mean logging out / logging back in to the web application.
![evaltree](img/dci_evaltree.png)
This displays a screen with a choice of SAS Metadata Groups (to which your account belongs) can be chosen. Selecting any of these groups will build / rebuild all the configuration tables (placing logs in a subfolder of the previously configured library location) and provide the chosen group with **unrestricted** access to the tool.
If you do not see any groups, then it is possible your Stored Process is running from a different metadata repository to the location of your SAS users (eg Foundation). To fix this, re-run the configuration stp with the `&dc_repo_users=YOURMETAREPO` url parameter.
![evaltree](img/dci_evalconfig.png)
!!! note
"Unrestricted access" is provided by code logic. Once installed, Data Controller does not ever update or modify metadata. During installation, the services in the `/services/admin` folder are updated (configuration) or removed (to prevent accidental reinstall). Also the tables are registered in the `/Data` folder using `proc metalib`.
## Usage
Simply navigate to the imported location from the Stored Process Web App, right click on the 'clickme' stored process, and open in new window!
![evaltree](img/dci_evallaunch.png)
## Caveats
The demo version has been optimised for a rapid install, and should not be considered for production / commercial use, or for use by more than 2-5 people, for the following reasons:
1) Static content is compiled into SAS web services, which is inefficient (not scalable)
2) Requires BASE engine for config tables, with high risk of table locks
3) Interface is not licenced for commercial (or production) use, and not supported
4) Underlying macros are not licensed for re-use on other (internal) projects
5) The embedded HandsOnTable library is not licenced for commercial use without a licence key
[Contact us](https://datacontroller.io/contact) for a full-featured, fully licenced, scalable and supported deployment of Data Controller at your earliest convenience!

View File

@ -1,18 +0,0 @@
# Data Controller for SAS® - System Requirements
## Overview
The Data Controller is a SAS Web Application, deployed into an existing SAS platform, and as such has no special requirements beyond what is typically available in a SAS Foundation or Viya environment.
## SAS 9
### Backend
A SAS Foundation deployment of at least 9.4M3 must be available. Earlier versions of SAS can be supported, on request. A SAS Stored Process Server must be configured, running under a system account.
### Mid-Tier
A web server with `/SASLogon` and the SAS SPWA must be available to end users
## SAS Viya
A minimum of Viya 3.5 is recommended to make use of the ability to run a shared compute instance.
## Frontend
All major browsers supported, including IE11 (earlier versions of IE may not work properly).
For IE, note that [compatibility view](dci-troubleshooting#Internet Explorer - blank screen) must be disabled.

View File

@ -1,137 +0,0 @@
# Data Controller for SAS® - Stored Process Server
## Overview
Data Controller requires that the operating system account (eg sassrv) has the ability to WRITE to each of the libraries set up for editing. For SAS installations where business users have the unrestricted ability to create Stored Processes in production, this can represent a security risk.
Under these circumstances, it is recommended to create a dedicated STP server instance for Data Controller, with a dedicated system account.
!!! note
Data Controller only updates data (add, delete, modify records). It does not need the ability to create new (permanent) tables, or modify the structure of existing tables.
## Set up DC account
It is recommended to have a user for each environment in which DC is deployed, eg:
* dcsrv_dev
* dcsrv_test
* dcsrv_prod
After these OS users are created, log into SMC in relevant environment and open User Manager. Adjust as follows:
* Open SAS General Servers group
* Select Accounts tab
* Add the dcsrv_[ENV] user in DefaultAuth domain
## STP Server Configuration - 9.4
Open the SAS Deployment Wizard and deploy a new Application Context Server from the panel windows.
Be sure to use the relevant dcsrv_[env] user as configured above.
Now head to the [security](#security) section.
## STP Server Configuration - 9.3
As the wizard does not exist in 9.3 it is necessary to copy the folder structure.
### Clone existing directory
Navigate to the SASApp directory on relevant machine (eg `!SASCONFIG/Lev1/SASApp`) and make a copy of the StoredProcessServer folder, and rename it (eg DataControllerSTPsvr).
Modify the contents of the new folder as follows:
* Autoexec (and usermods) adjust content to ensure it is relevant to a DC context
* sasv9_usermods.cfg suggested items:
```
- memsize 0
- UTILLOC “/change/only/if/needed”
- logconfigloc "location of DataControllerSTPsvr logconfig.xml file (in new folder)"
```
The following files should have all instances of “\StoredProcessServer\” replaced
with “\DataControllerSTPsvr\”:
* Logconfig.xml
* Logconfig.trace.xml
* StoredProcessServer.bat
* Logconfig.apm.xml
* Sasv9.cfg
* Dtest folder we dont believe this is used but make the changes anyway (same as
above, change all files within it to swap “storedprocessserver” for
DataControllerSTPsvr
* Sasuser folder EMPTY CONTENTS (remove all files). They arent relevant in the
data controller context.
### Add Server
Open ServerManager and adjust as follows:
* Log into SMC in relevant environment
* Open ServerManager
* Right click / new server
* Select Application Server
* Name as “SAS_App_DataController”
* Click Next / select “Stored Process Server” / Next
* Select “Custom” / Next
* Command = `“C:\SAS92\Config\Lev1\SASApp\SASDataEditorStoredProcessServer\StoredProcessServe
r.bat”` (adjust as appropriate)
* Object server parameters = empty
* Multiuser - select dcsrv_[Env]
* Choose SASApp server machine (put in RH box)
* Next / Bridge Connection(default) / Next
* Bridge Port: 8602
* Add / Single Port / 8612
* Add / Single Port / 8622
* Add / Single Port / 8632
* Add at least NINE connections, up to a maximum of (5 per CPU core).
* Next / finish
Next, refresh Server Manager to see the new SAS_App_DataController server. Expand and adjust as follows:
* Right click SAS_App_DataController-Logical server (first nest), properties, Load Balancing tab, select “Response Time”
- Availability timeout 10 seconds
- Ok / exit
* Right click SAS_App_DataController Stored Process (second nest), properties, options
tab, Advanced options, Load Balancing
- Max clients 1
- Launch timeout 10 seconds
- Recycle activation limit 1
* Right click Object Spawner (inside Server Manager) / Properties / Servers, and add the new
Data Controller STP from “Available Servers” to “Selected Servers”
* Bounce the object spawner
#### VALIDATION (windows)
* Open command prompt as an administrator, and run : `netstat aon | find /I “8602”` (this will check if the new server is listening on the relevant port)
* Execute the .bat file to ensure a base sas session can be created in the relevant context (`“!SASConfig\Lev1\SASApp\SASDataEditorStoredProcessServer\StoredProcessServer.bat”`)
* In SMC (server manager), right click / validate the new server & test the connection
## Security
### STP Server Context
To protect the new STP server context, the following initialisation code must be added.
This code contains:
```
data _null_;
if !('/APPROVED/DC/FOLDER/LOCATION'=:symget('_program')) then do;
file _webout;
put 'Access to this location has not been approved';
put 'This incident may be reported';
abort cancel;
end;
run;
```
Save this program in the `DataControllerSTPsvr` folder. Then open Server Manager in SMC and expand SAS_App_DataController server. Right click SAS_App_DataController-Logical server (first nest), properties, Options tab,Set Server Properties, Request.
The `init program` value should be set to the location of the program above.

View File

@ -1,105 +0,0 @@
---
layout: article
title: Troubleshooting
description: Descriptions of common issues when working with Data Controller, and steps for resolution.
og_image: https://docs.datacontroller.io/img/cannotimport.png
---
# Data Controller for SAS® - Troubleshooting
## Overview
[Let us know](https://datacontroller.io/contact/) if you experience an installation problem that is not described here!
## Internet Explorer - blank screen
If you have an older, or 'locked down' version of Internet Explorer you may get a blank / white screen when navigating to the Data Controller url. To fix this, click settings (cog icon in top right), *Compatibility View settings*, and **uncheck** *Display intranet sites in Compatibility view* as follows:
![menu](img/dci-trouble1.png)
## Workspace Server Type Only
Data Controller requires the OS account to have disk write privileges for a number of reasons:
* log capture
* folder creation (initial setup)
* table creation (demo version)
* writing staging data (editors)
* updating databases / datasets (approvers)
On Viya, this is the default case.
On SAS 9, if your Stored Process Shared Server account (typically `sassrv`) is unavailable, or overly restricted, you may need to use a Workspace Server account for your STPs. This means that your Approvers must have the requisite access to perform the database updates.
The imported version of Data Controller is set up to work with the Stored Process Server. To switch this to Workspace Server, you can run the following code *after* importing the SPK:
```
/* get the macros (or download / %include seperately) */
filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc;
/* put the path to your Data Controller folder here */
%let DCROOT=/YOUR/META/PATH/DataController;
/* this will extract all the objects in that folder */
%mm_getfoldertree(root=&dcroot, outds=stps)
/* this creates the program to update all the STPs in that folder */
filename tmp temp;
data _null_;
set stps;
file tmp;
if publictype='StoredProcess' then do;
str=cats('%mm_updatestpservertype(target='
,path,'/',name,',type=WKS)');
put str;
end;
run;
/* run the program */
%inc tmp;
```
## Custom Library
If you wish to change the default *libref* or *libname* then there are TWO items to configure:
1) The library itself
2) The `mpelib` macro variable and the libname statement in the `/Admin/Data_Controller_Settings` stored process.
!!! note
Be sure to make this change *after* running the configurator, to ensure the tables are first registered!
## Permission is needed to access the ServerContext Object
After a successful install, your business user may see the following message:
![Permission is needed to access the ServerContext object attached to the stored process.](img/error_obtaining_stp.png)
> Error obtaining stored process from repository
>
> Permission is needed to access the ServerContext object attached to the stored process.
The reason is that the context chosen when importing the SPK (perhaps, SASApp) is not available to your business user. It's likely you have multiple contexts.
The SPK must be re-imported with the correct context chosen. This may require regenerating the tables, or adjusting the permissions, if the new context uses a different system account.
## Stored Processes Cannot Be Imported Into A Project Repository
During the SPK import on a SAS 9 instance you may see the following dialog:
![Stored processes cannot be imported into a project repository](img/cannotimport.png)
> Stored processes cannot be imported into a project repository
This can happen when importing with Data Integration Studio and your user profile is making use of a personal project repository. Try re-connecting with the Foundation repository, or import with SAS Management Console (which does not support project repositories).
## There is no LogicalServer of the type requested associated with the ServerContext in metadata.
This can happen if you enter the wrong `serverName` when deploying the SAS program on an EBI platform. Make sure it matches an existing Stored Process Server Context.
The error may also be thrown due to an encoding issue - changing to a UTF-8 server has helped at least one customer.
## Determining Application Version
The app version is bundled into the frontend during the release, and is visible by clicking your username in the top right.
You can also determine the app version (and SASjs Version, and build time) by opening browser Development Tools and running `appinfo()` in the console.

View File

@ -1,33 +0,0 @@
# Data Controller for SAS: Data Catalog
Data Controller collects information about the size and shape of the tables and columns. The Catalog does not contain information about the data content (values).
The catalog is based primarily on the existing SAS dictionary tables, augmented with attributes such as primary key fields, filesize / libsize, and number of observations (eg for database tables).
Frequently changing data (such as nobs, size) are stored on the MPE_DATASTATUS_XXX tables. The rest is stored on the MPE_DATACATALOG_XXX tables.
## Tables
### Libraries
This table contains library level attributes to provide a high level overview of data coverage. Note that unless you are an administrator, you are unlikely to have the ability to view / open all of these libraries. To avoid errors when opening invalid libraries, you can add pipe-separated LIBREFs to the DCXXXX.MPE_CONFIG table (var_scope='DC_CATALOG', var_name='DC_IGNORELIBS').
### Tables
Table attributes are split between those that change infrequently (eg PK_FIELDS) and those that change often (eg size, modified date, and NOBS).
### Variables
Variable attributes come from dictionary tables with an extra PK indicator. A PK is identified by the fact the variable is within an index that is both UNIQUE and NOTNULL. Variable names are always uppercase.
## Assumptions
The following assumptions are made:
* Data _Models_ (eg attributes) are not sensitive. If so the catalog tables should be disabled.
* Users can see all tables in the libraries they can access. The refresh process will close out any tables that are not found, if the user can see at least one table in a library.
* For a particular site, libraries are unique on LIBREF.
If you have duplicate librefs, specific table security setups, or sensitive models - contact us.

View File

@ -1,30 +0,0 @@
# Data Lineage
The Data Lineage feature is available for SAS 9 installs. The implementation differs depending on whether the lineage is table level or column level.
## Table Level lineage
Table level lineage is relatively straightforward, and so it is extracted in a single ad-hoc `proc metadata` call and stored in the `DATACTRL.MPE_LINEAGE_TABS` table. To trigger the population (or refresh) of this table, simply execute the `YOURSERVER/SASStoredProcess/?_program={appLoc}/DataController/admin/refreshtablelineage` service from a browser.
![jobmetadata](img/dcu-jobmeta.png)
This data is stored with SCD2 so it is possible to track changes to lineage over time.
When users execute table level lineage, queries are made against this table, so there is very little metadata impact.
## Column Level lineage
Column level lineage is more complex as it also includes all the different transforms, and calculation logic along the way. For this reason it is performed at runtime, which means the initial request can take some time if there is a lot of lineage.
After the first request, subsequent lineage requests (for that particular column and direction) are cached in the `DATACTRL.MPE_LINEAGE_COLS` table for faster response times.
If the job is changed and a new diagram is needed, the user can click the 'refresh' checkbox.
## Export Types
Both Table and column level lineage pages allow the following export formats:
* SVG - high res digram format
* PNG - image format
* DOT - the graphviz language format used to generate the diagram
* CSV - a download of all the sources and targets in the diagram

View File

@ -1,42 +0,0 @@
# Data Controller for SAS: Viewer
The viewer screen provides a raw view of the underlying table.
Choose a library, then a table, and click view to see the first 5000 rows.
A filter option is provided should you wish to view a different section of rows.
The following libraries will be visible:
* All libraries available on startup (session autoexec)
* Any libraries configured in the `services/public/[Data_Controller_Settings/settings]` Stored Process / Viya Job
* All libraries available to the logged in user in metadata (SAS 9 only)
Row and Column level security can also be applied in VIEW mode, as can additional table-level permissions (MPE_SECURITY table).
## Full Table Search
A single search box can be used to make a full table search on any character or numeric value, using this [macro](https://core.sasjs.io/mp__searchdata_8sas.html).
<iframe width="560" height="315" src="https://www.youtube.com/embed/i27w-xq85WQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
## Options
This button shows a range of options. If the table is editable, you will also see a EDIT option.
### Download
The Download button gives several options for obtaining the current view of data:
1) CSV. This provides a comma delimited file.
2) Excel. This provides a tab delimited file.
3) SAS Datalines. This provides a SAS program with data as datalines, so that the data can be rebuilt as a SAS table.
4) SAS DDL. A download of a DDL file using SAS flavoured syntax.
5) TSQL DDL. A DDL download using SQL Server flavoured syntax.
Note - if the table is registered in Data Controller as being TXTEMPORAL (SCD2) then the download option will prefilter for the _current_ records and removes the valid from / valid to variables. This makes the CSV suitable for DC file upload, if desired.
### Web Query URL
This option gives you a URL that can be used to import data directly into third party tools such as Power BI or Microsoft Excel (as a "web query"). You can set up a filter, eg for a particular month, and refresh the query on demand using client tooling such as VBA.

View File

@ -1,186 +0,0 @@
---
layout: article
title: Dynamic Cell Dropdown
description: Configure SAS programs to determine exactly which values can appear within which cells in your Data Controller table!
og_image: https://docs.datacontroller.io/img/cell_validation1.png
---
# Dynamic Cell Dropdown
This is a simple, but incredibly powerful feature! Configure a SAS process to run when clicking a particular cell. Data Controller will send the *row* to SAS, and your SAS program can use the values in the row determine a *column* of values to send back - which will be used in the frontend selectbox.
So if you'd like the user to only see products for a particular category, or ISIN's for a particular asset group, you can perform that easily.
This feature is used extensively in Data Controller to fetch tables specific to a library, or columns specific to a table:
![](img/cell_validation1.png)
You can also use the response to populate _other_ dropdowns (also in the same row) in the same request - these are called 'extended validations'.
<iframe width="560" height="315" src="https://www.youtube.com/embed/rmES77aIr90" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
## Frontend Configuration
Open the MPE_VALIDATIONS table and configure the library, table and column that should contain the selectbox. In the RULE_TYPE column, enter either:
* HARDSELECT_HOOK - The user entry MUST match the returned values
* SOFTSELECT_HOOK - The user can view the list but type something else if they wish
The RULE_VALUE column should contain the full path to the SAS Program, Viya Job or SAS 9 Stored process that you would like to execute. If the value ends in ".sas" then it is assumed to be a SAS program on a directory, otherwise a SAS web service (STP or Viya Job).
## Backend Configuration
If creating a Stored Process, be sure to deselect the 'automatic SAS macros' - the presence of %stpbegin or %stpend autocall macros will cause problems with the Data Controller backend.
You can write any SAS code you wish. For examples of hook scripts you can look at the Data Controller internal validation programs (listed in the MPE_VALIDATIONS table). You will receive the following as inputs:
* `work.source_row` -> A dataset containing the **current row** being modified in Data Controller. This will have already been created in the current SAS session. All variables are available. Use this to filter the initial values in `work.dynamic_values`.
* `&DC_LIBREF` -> The DC control library
* `&LIBDS` - The library.dataset being filtered
* `&VARIABLE_NM` - The column for which to supply the validation
The following tables should be created in the WORK library as outputs:
* `work.dynamic_values`
* `work.dynamic_extended_values` (optional)
### `WORK.DYNAMIC_VALUES`
This output table can contain up to three columns:
* `display_index` (optional, mandatory if using `dynamic_extended_values`). Is a numeric key used to join the two tables.
* `display_value` - always character
* `raw_value` - unformatted character or numeric according to source data type
Example values:
|DISPLAY_INDEX:best.|DISPLAY_VALUE:$|RAW_VALUE|
|---|---|---|
|1|$77.43|77.43|
|2|$88.43|88.43|
### `WORK.DYNAMIC_EXTENDED_VALUES`
This output table is optional. If provided, it will map the DISPLAY_INDEX from the DYNAMIC_VALUES table to additional column/value pairs, that will be used to populate dropdowns for _other_ cells in the _same_ row.
The following columns should be provided:
* `display_index` - a numeric key joining each value to the `dynamic_values` table
* `extra_col_name` - the name of the additional variable(s) to contain the extra dropdown(s)
* `display_value` - the value to display in the dropdown. Always character.
* `display_type` - Either C or N depending on the raw value type
* `raw_value_num` - The unformatted value if numeric
* `raw_value_char` - The unformatted value if character
* `forced_value` - set to 1 to force this value to be automatically selected when the source value is changed. If anything else but 1, the dropdown will still appear, but the user must manually make the selection.
Example Values:
|DISPLAY_INDEX:best.|EXTRA_COL_NAME:$32|DISPLAY_VALUE:$|DISPLAY_TYPE:$1.|RAW_VALUE_NUM|RAW_VALUE_CHAR:$5000|FORCED_VALUE|
|---|---|---|---|---|---|---|
|1|DISCOUNT_RT|"50%"|N|0.5||.|
|1|DISCOUNT_RT|"40%"|N|0.4||0|
|1|DISCOUNT_RT|"30%"|N|0.3||1|
|1|CURRENCY_SYMBOL|"GBP"|C||"GBP"|.|
|1|CURRENCY_SYMBOL|"RSD"|C||"RSD"|.|
|2|DISCOUNT_RT|"50%"|N|0.5||.|
|2|DISCOUNT_RT|"40%"|N|0.4||1|
|2|CURRENCY_SYMBOL|"EUR"|C||"EUR"|.|
|2|CURRENCY_SYMBOL|"HKD"|C||"HKD"|1|
### Code Examples
Simple dropdown
```sas
/**
@file
@brief Simple dynamic cell dropdown for product code
@details The input table is simply one row from the
target table called "work.source_row".
Available macro variables:
@li DC_LIBREF - The DC control library
@li LIBDS - The library.dataset being filtered
@li VARIABLE_NM - The column being filtered
<h4> Service Outputs </h4>
Output should be a single table called
"work.dynamic_values" in the format below.
|DISPLAY_VALUE:$|RAW_VALUE:??|
|---|---|
|$44.00|44|
**/
%dc_assignlib(READ,mylibref)
proc sql;
create table work.DYNAMIC_VALUES as
select distinct some_product as raw_value
from mylibref.my_other_table
where area in (select area from work.source_row)
order by 1;
```
Extended dropdown
```sas
proc sql;
create table work.source as
select libref,dsn
from &DC_LIBREF..MPE_TABLES
where tx_to > "%sysfunc(datetime(),E8601DT26.6)"dt
order by 1,2;
data work.DYNAMIC_VALUES (keep=display_index raw_value display_value);
set work.source end=last;
by libref;
if last.libref then do;
display_index+1;
raw_value=libref;
display_value=libref;
output;
end;
if last then do;
display_index+1;
raw_value='*ALL*';
display_value='*ALL*';
output;
end;
run;
data work.dynamic_extended_values(keep=display_index extra_col_name display_type
display_value RAW_VALUE_CHAR raw_value_num forced_value);
set work.source end=last;
by libref dsn;
retain extra_col_name 'ALERT_DS';
retain display_type 'C';
retain raw_value_num .;
raw_value_char=dsn;
display_value=dsn;
forced_value=0;
if first.libref then display_index+1;
if last.libref then do;
display_value='*ALL*';
raw_value_char='*ALL*';
forced_value=1;
output;
end;
else output;
if last then do;
display_value='*ALL*';
raw_value_char='*ALL*';
forced_value=1;
output;
end;
run;
```
## Technical Notes
When first clicking on a 'dynamic dropdown' cell, the frontend will first hash the entire row, and store the subsequent response from SAS against this hash in an internal lookup table. In this way, the lookup table can be subsequently referenced to vastly improve performance (by avoiding unnecessary server requests).
The lookup event will occur immediately upon clicking on the (dynamic dropdown) cell. If the row has not changed since the previous click, the response will be instant. If any value in the row HAS changed, and that particular combination of values has not previously been requested (in the same browser session), then a request to SAS will need to take place before the dropdown values are shown.

View File

@ -1,34 +0,0 @@
Data Controller for SAS® - Emails
====================
## Overview
Data Controller enables email alerts for users when tables are:
* SUBMITTED - a proposed change has been submitted.
* APPROVED - the proposed change was approved and applied.
* REJECTED - the proposed change was rejected.
Emails are sent after any post edit / post approve hooks. They can be sent when specific tables are updated, or when any tables in a particular library are updated, or for all changes to all tables. See configuration section below.
Email addresses are looked for first in `DCXXXXXX.MPE_EMAILS`. If they are not found there, then a metadata search is made (the first email found in metadata for that user is used).
<iframe src="https://player.vimeo.com/video/343401440" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
## Setup
As not every site has emails configured, this feature is switched OFF by default.
To switch it on, navigate to `DCXXXXXX.MPE_CONFIG` and set the value for `DC_EMAIL_ALERTS` to be `YES` (uppercase).
![alerttable](img/mpe_alertconfig.png)
!!! tip
If your Stored Process session does not have the email options configured, then the appropriate options statement must be invoked. These options may need to be done at startup, or in the configuration file. See [documentation](https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=lrcon&docsetTarget=n05iwqtqxzvtvun1eyw11nrd9i9r.htm&locale=en)
## Configuration
The `DCXXXXXX.MPE_ALERTS` table must be updated with the following attributes:
* ALERT_EVENT - either `*ALL*`, `SUBMITTED`, `APPROVED` or `REJECTED`
* ALERT_LIB - either `*ALL*` or the libref to be alerted on
* ALERT_DS - either `*ALL*` or the dataset name to be alerted on
* ALERT_USER - the metadata name (not displayname) of the user to be alerted
If your site does not put emails in metadata, then the user emails must instead be entered in `DCXXXXXX.MPE_EMAILS`.

View File

@ -1,51 +0,0 @@
Data Controller for SAS® Evaluation Agreement
====================
The terms and conditions contained below constitute a legal agreement. This agreement ("Agreement") contains herein the entire agreement between the licensee ("Licensee") and Bowe IO Ltd. Read this agreement carefully. By downloading, installing, and/or examining the product, you acknowledge:
1 - You are authorized to enter this agreement for and on behalf of your company, and are doing so, and 2 - You have read, understand and agree that you and the company shall be bound by these terms and conditions and every modification and addition provided for.
Software products included with this product that are not Bowe IO Ltd products are licensed to you by the software provider. Please refer to the license contained in the provider's product for their terms of use.
## 1. License Grant.
Bowe IO Ltd grants you a limited, non-exclusive, non-transferable license to use, **for evaluation/non-production purposes only**, the Bowe IO Ltd software program(s) known as Data Controller for SAS® (the "Software") - and related product documentation - at no charge, subject to the terms and restrictions set forth in this License Agreement. You are not permitted to use the Software in any manner not expressly authorized by this License. You acknowledge and agree that ownership of the Software and all subsequent copies thereof regardless of the form or media are held by Bowe IO Ltd.
## 2. Term of Agreement.
Your license is effective until terminated by Bowe IO Ltd (at the sole discretion of Bowe IO Ltd and without notice). The License will terminate automatically if you fail to comply with any of the limitations or other requirements described herein. At termination you shall cease all use of the Software and destroy all copies, full or partial, of the Software.
## 3. Ownership Rights.
The Software and related documentation are protected by United Kingdom copyright laws and international treaties. Bowe IO Ltd, third party component providers and open source component providers own and retain all right, title and interest in and to the Software and related documentation, including all copyrights, patents, trade secret rights, trademarks and other intellectual property rights therein.
## 4. Use of Name and Trademarks.
You shall not use the name, trade names or trademarks of Bowe IO Ltd or any of its affiliates in any advertising, promotional literature or any other material, whether in written, electronic or other form, without prior approval.
## 5. Restrictions
5.1 - You may not rent, lease, lend, redistribute or sublicense the Software. You may not copy the Software other than to make archival or backup copies - provided that the backup copy includes all copyright or other proprietary notices contained on the original. You may not copy related product documentation. You may not modify, reverse engineer, decompile, or disassemble the Software, except to the extent the such restriction is expressly prohibited by applicable law.
5.2 - Certain components of the Software are provided under various Open Source licenses that have been made available to Bowe IO Ltd. You may modify or replace only these Open-Sourced Components; provided that (i) the resultant Software is used in place of the unmodified Software, on a single computer; and (ii) you otherwise comply with the terms of this License and any applicable licensing terms governing use of the Open-Sourced Components. Bowe IO Ltd is not obligated to provide any maintenance, technical or other support for the resultant Software.
## 6. Exclusion of Warranties.
THE SOFTWARE IS PROVIDED TO LICENSEE "AS IS", AND ANY USE BY LICENSEE OF THE SOFTWARE WILL BE AT LICENSEE'S SOLE RISK. Bowe IO Ltd makes no warrranties relating to the softwtare, and disclaims all warranties (express or implied), including without limitation those of merchantability and fitness for any particular purpose.
## 7. Limitation of Liability.
In no event shall Bowe IO Ltd be liable for any incidental, special, indirect or consequential damages whatsoever, including, without limitation, damages for loss of profits, loss of data, business interrupton or any other commercial damages or losses, arising out of or related to your use or inability to use the Bowe IO Ltd software, however caused, regardless of the theory of liabilty (contract, tort or otherwise) and even if Bowe IO Ltd has been advised of the possibility of such damages.
## 8. Governing law and jurisdiction
8.1 - This agreement and any disputes or claims arising out of or in connection with its subject matter are governed by and construed in accordance with the law of England.
8.2 - The parties irrevocably agree that the courts of England have exclusive jurisdiction to settle any dispute or claim that arises out of or in connection with this agreement.
## 9. Assignment/Transfers.
You may not assign or transfer this Agreement, in whole or in part, without the prior written consent of Bowe IO Ltd. Any attempted assignment or transfer in violation of this Section will be null and void.
## 10.Third Party Acknowledgements
(A) Aspects of the Software utilize or include third party software and other copyrighted material. Acknowledgements, licensing terms and disclaimers for such material are available when accessing the Software on the Bowe IO Ltd website, and your use of such material is governed by their respective terms.
(B) The Software includes certain software provided under various Open Source licenses. You may obtain complete machine-readable copies of the source code and licenses for the Open Source software at the Bowe IO Ltd Open Source website (https://docs.datacontroller.io/licenses). Open Source Software is distributed WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
## 11. Severability.
If any provision of this Agreement is held invalid, illegal or unenforceable, the validity, legality and enforceability of any of the remaining provisions of this Agreement shall not in any way be affected or impaired.
## 12. Entire Agreement.
This Agreement is the entire agreement between you and Bowe IO Ltd concerning the Software and all related documentation and supersedes any other prior or contemporaneous agreements or communications with respect to the Software and related documentation, either written or oral.

View File

@ -1,126 +0,0 @@
---
layout: article
title: Excel
description: Data Controller can extract all manner of data from within an Excel file (including formulae) ready for ingestion into SAS. All versions of excel are supported.
og_image: https://docs.datacontroller.io/img/excel_results.png
---
# Excel Uploads
Data Controller supports two approaches for importing Excel data into SAS:
- Simple - source range in tabular format, with column names/values that match the target Table. No configuration necessary.
- Complex - data is scattered across multiple ranges in a dynamic (non-fixed) arrangement. Pre-configuration necessary.
Thanks to our pro license of [sheetJS](https://sheetjs.com/), we can support all versions of excel, large workbooks, and fast extracts. We also support the ingest of [password-protected workbooks](/videos#uploading-a-password-protected-excel-file).
Note that data is extracted from excel from _within the browser_ - meaning there is no need for any special SAS modules / products.
A copy of the original Excel file is also uploaded to the staging area. This means that a complete audit trail can be captured, right back to the original source data.
## Simple Excel Uploads
To make a _simple_ extract, select LOAD / Tables / (library/table) and click "UPLOAD" (or drag the file onto the page). No configuration necessary.
![](img/xltables.png)
The rules for data extraction are:
* Scan the each sheet until a row is found with all target columns
* Extract rows until the first *blank primary key value*
This is incredibly flexible, and means:
* data can be anywhere, on any worksheet
* data can start on any row, and any column
* data can be completely surrounded by other data
* columns can be in any order
* additional columns are simply ignored
!!! note
If the excel contains more than one range with the target columns (eg, on different sheets), only the FIRST will be extracted.
Uploaded data may *optionally* contain a column named `_____DELETE__THIS__RECORD_____` - if this contains the value "Yes", the row is marked for deletion.
If loading very large files (eg over 10mb) it is more efficient to use CSV format, as this bypasses the local rendering engine, but also the local DQ checks - so be careful! Examples of local (excel) but not remote (CSV) file checks include:
* Length of character variables - CSV files are truncated at the max target column length
* Length of numeric variables - if the target numeric variable is below 8 bytes then the staged CSV value may be rounded if it is too large to fit
* NOTNULL - this rule is only applied at backend when the constraint is physical (rather than a DC setting)
* MINVAL
* MAXVAL
* CASE
Note that the HARDSELECT_*** hooks are not applied to the rendered Excel values (they are only applied when actively editing a cell).
![image](https://user-images.githubusercontent.com/4420615/233036372-87b8dd02-a4cd-4f19-ac1b-bb9fdc850607.png)
### Formulas
It is possible to configure certain columns to be extracted as formulae, rather than raw values. The target column must be character, and it should be wide enough to support the longest formula in the source data. If the order of values is important, you should include a row number in your primary key.
Configuration is as follows:
![](img/excel_config_setup.png)
Once this is done, you are ready to upload:
<iframe width="560" height="315" src="https://www.youtube.com/embed/Reg803vI2Ak" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
The final table will look like this:
![](img/excel_results.png)
## Complex Excel Uploads
Through the use of "Excel Maps" you can dynamically extract individual cells or entire ranges from anywhere within a workbook - either through absolute / relative positioning, or by reference to a "matched" (search) string.
Configuration is made in the following tables:
1. [MPE_XLMAP_RULES](/tables/mpe_xlmap_rules) - detailed extraction rules for a particular map
2. [MPE_XLMAP_INFO](/tables/mpe_xlmap_info) - optional map-level attributes
Each [rule](/tables/mpe_xlmap_rules) will extract either a single cell or a rectangular range from the source workbook. The target will be [MPE_XLMAP_DATA](/tables/mpe_xlmap_data), or whichever table is configured in [MPE_XLMAP_INFO](/tables/mpe_xlmap_info).
To illustrate with an example - consider the following excel. The yellow cells need to be imported.
![](img/xlmap_example.png)
The [MPE_XLMAP_RULES](/tables/mpe_xlmap_rules) configuration entries _might_ (as there are multiple ways) be as follows:
|XLMAP_ID|XLMAP_RANGE_ID|XLMAP_SHEET|XLMAP_START|XLMAP_FINISH|
|---|---|---|---|---|
|MAP01|MI_ITEM|Current Month|`MATCH B R[1]C[0]: ITEM`|`LASTDOWN`|
|MAP01|MI_AMT|Current Month|`MATCH C R[1]C[0]: AMOUNT`|`LASTDOWN`|
|MAP01|TMI|Current Month|`ABSOLUTE F6`||
|MAP01|CB|Current Month|`MATCH F R[2]C[0]: CASH BALANCE`||
|MAP01|RENT|/1|`MATCH E R[0]C[2]: Rent/mortgage`||
|MAP01|CELL|/1|`MATCH E R[0]C[2]: Cell phone`||
To import the excel, the end user simply needs to navigate to the LOAD tab, choose "Files", select the appropriate map (eg MAP01), and upload. This will stage the new records in [MPE_XLMAP_DATA](/tables/mpe_xlmap_data) which will go through the usual approval process and quality checks. A copy of the source excel file will be attached to each upload.
The corresponding [MPE_XLMAP_DATA](/tables/mpe_xlmap_data) table will appear as follows:
| LOAD_REF | XLMAP_ID | XLMAP_RANGE_ID | ROW_NO | COL_NO | VALUE_TXT |
|---------------|----------|----------------|--------|--------|-----------------|
| DC20231212T154611798_648613_3895 | MAP01 | MI_ITEM | 1 | 1 | Income Source 1 |
| DC20231212T154611798_648613_3895 | MAP01 | MI_ITEM | 2 | 1 | Income Source 2 |
| DC20231212T154611798_648613_3895 | MAP01 | MI_ITEM | 3 | 1 | Other |
| DC20231212T154611798_648613_3895 | MAP01 | MI_AMT | 1 | 1 | 2500 |
| DC20231212T154611798_648613_3895 | MAP01 | MI_AMT | 2 | 1 | 1000 |
| DC20231212T154611798_648613_3895 | MAP01 | MI_AMT | 3 | 1 | 250 |
| DC20231212T154611798_648613_3895 | MAP01 | TMI | 1 | 1 | 3750 |
| DC20231212T154611798_648613_3895 | MAP01 | CB | 1 | 1 | 864 |
| DC20231212T154611798_648613_3895 | MAP01 | RENT | 1 | 1 | 800 |
| DC20231212T154611798_648613_3895 | MAP01 | CELL | 1 | 1 | 45 |
### Video
<iframe title="Complex Excel Uploads" width="560" height="315" src="https://vid.4gl.io/videos/embed/3338f448-e92d-4822-b3ec-7f6d7530dfc8?peertubeLink=0" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe>

View File

@ -1,42 +0,0 @@
# Data Controller for SAS: File Uploads
Data Controller supports the ingestion of two file formats - Excel (any version) and CSV.
If you would like to support other file types, do [get in touch](https://datacontroller.io/contact)!
## Excel Uploads
Data can be uploaded in regular (tabular) or dynamic (complex) format. For details, see the [excel](/excel) page.
## CSV Uploads
The following should be considered when uploading data in this way:
- A header row (with variable names) is required
- Variable names must match those in the target table (not case sensitive). An easy way to ensure this is to download the data from Viewer and use this as a template.
- Duplicate variable names are not permitted
- Missing columns are not permitted
- Additional columns are ignored
- The order of variables does not matter EXCEPT for the (optional) `_____DELETE__THIS__RECORD_____` variable. When using this variable, it must be the **first**.
- The delimiter is extracted from the header row - so for `var1;var2;var3` the delimeter would be assumed to be a semicolon
- The above assumes the delimiter is the first special character! So `var,1;var2;var3` would fail
- The following characters should **not** be used as delimiters
- doublequote
- quote
- space
- underscore
When loading dates, be aware that Data Controller makes use of the `ANYDTDTE` and `ANYDTDTTME` informats (width 19).
This means that uploaded date / datetime values should be unambiguous (eg `01FEB1942` vs `01/02/42`), to avoid confusion - as the latter could be interpreted as `02JAN2042` depending on your locale and options `YEARCUTOFF` settings. Note that UTC dates with offset values (eg `2018-12-26T09:19:25.123+0100`) are not currently supported. If this is a feature you would like to see, contact us.
!!! tip
To get a copy of a file in the right format for upload, use the [file download](/dc-userguide/#usage) feature in the Viewer tab
!!! warning
Lengths are taken from the target table. If a CSV contains long strings (eg `"ABCDE"` for a $3 variable) then the rest will be silently truncated (only `"ABC"` staged and loaded). If the target variable is a short numeric (eg 4., or 4 bytes) then floats or large integers may be rounded. This issue does not apply to excel uploads, which are first validated in the browser.
When loading CSVs, the entire file is passed to backend for ingestion. This makes it more efficient for large files, but does mean that frontend validations are bypassed.

View File

@ -1,26 +0,0 @@
---
layout: article
title: Filter
description: Data Controller for SAS&reg; enable complex filters to be created on any variable. The "dynamic" where claue setting enables new values to be filtered by remaining filter clauses. Filtered views are shareable!
og_image: https://docs.datacontroller.io/img/filter_dynamic_on.png
---
# Filtering
Data Controller for SAS&reg; enables you to create complex table filters. The "dynamic" setting enables the dropdown values to be pre-filtered by previous filter clauses. Filtered views are shareable!
## Shared Filters
When filters are submitted, the query is stored, and a unique URL is generated. This means you can share the link to a filtered view of a table! This can be used for VIEW, for EDIT and also for downloading data.
![](img/filter_url.png)
## Dynamic Where Clause
When filtering *without* a dynamic where clause, all values are always returned in the selection box.
![](img/filter_dynamic_off.png)
By contrast, when the dynamic where clause box is checked (default), the values in the *second and subsequent* filter clauses are filtered by the previous filter clause settings, eg:
![](img/filter_dynamic_on.png)

View File

@ -1,27 +0,0 @@
---
layout: article
title: API
description: Viewing and Modifying SAS Format Catalogs in Data Controller
---
# Formats
Data Controller allows formats to be viewed and edited directly from the web interface - avoiding the need to create and maintain parallel 'CNTLIN' datasets.
Formats are displayed with a special icon (`bolt`), in the same library as other tables (in both the VIEW and EDIT screens):
![formats](img/formats.png)
Viewing or editing a format catalog will always mean that the entire catalog is exported, before being filtered (if filters applied) and displayed. For this reason, it is recommended to split a large format catalog over several catalogs, if performance is a consideration.
The usual export mechanisms can also be applied - you can downlad the DDL, or export the catalog in CSV / Excel / Datalines / Markdown / DDL formats.
When adding a format to MPE_TABLES, the `DSN` should contain the format catalog name plus a `-FC` extension. The LOADTYPE should be `FORMAT_CAT` and the BUSKEY should be `FMTNAME START`. HOOK scripts can also be applied (ie, run some DQ after an edit, or re-run a batch job after an approval).
Example:
|LIBREF:$8.|DSN:$32.|LOADTYPE:$12.|BUSKEY:$1000.|
|---|---|---|---|
|`MYLIB `|`FORMATS-FC `|`FORMAT_CAT `|`FMTNAME START `|
Just like regular table edits, all changes to formats are logged in the `MPE_AUDIT` table.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

Some files were not shown because too many files have changed in this diff Show More