Expand my Community achievements bar.

ACS Tips & Tricks: Simple method to generate a schema data dictionary

Avatar

Community Advisor

5/10/23

In the event of a necessity to document custom schemas, the absence of a readily available data dictionary table on ACS poses a challenge in terms of copying and pasting information into a document.

 

To address this concern, my colleague, Marco Campagnolo, has created a practical script/tool that can be utilized offline (still in initial development phase). This tool generates an HTML file encompassing data dictionary tables for your schemas, complete with relationship links, keys, and indexes. The only prerequisite for utilizing this tool is to acquire the "Generated schema" XML code derived from your Adobe Campaign Standard (ACS) schema.

 

David__Garcia_0-1683762003419.png
  • schema.xml: where you will paste the custom schema(s) xml code
  • schema.xslt: transformation template
  • script.ps1: powershell code which triggers the transformation process from xml code to html

Example of a generated file:

David__Garcia_1-1683762492912.png

 

XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents,[1] or other formats such as HTML for web pages, plain text or XSL Formatting Objects. src: https://en.wikipedia.org/wiki/XSLT

 

Steps:

  1. Download the attached zip and uncompress
  2. Copy "Generated schema" XML code from ACS instance.
  3. Paste code within the root element of the file "schema.xml"
    • <schemas></schemas>
    • you may paste multiple schema(s) code inside the root element
  4. run the powershell script file "script.ps1"
    • if you get an "PSSecurityException" error, you need to enable RemoteSign on your Powershell command line to be able to execute the script.
    • execute the following Set-ExecutionPolicy RemoteSigned
  5. Re-execute, a new html file will be generated containing the schema dictionary.

 

Improvements: Whilst the script works, there are some improvements that could be made.

  1. enhanced html rendering
  2. ERD diagram generator --> goJS, mermaid.js?
  3. Compatibility with ACC

Credits: Marco Campagnolo, https://www.linkedin.com/in/marcocampagnolo/