Documentation Automation

Contents:

The Goal

The goal of this project is to create a process that will allow to automate documentation of ETL processes.

Starting Point

The content of PDI files (jobs and transformations) and Mondrian files is in XML format. These can be parsed to extract the text specified between the defined tags and use this for documentation. This should allow for example, to get the names of all transformations included in the job, all the dimensions referred to in a cube etc.

Note that a similar project has been specified to also look at documenting and analysing files.

Implementation Ideas

To parse xml files we can try to use XSLT. Useful links:

First Results

The xsl templates are attached to this page. The following steps will allow you to create the documentation:

  1. Download the templates and save them in the same folder with the files are that you want to document.
  2. Create a copy of the files that should be documented.
  3. Insert the following code after
    <?xml version="1.0" encoding="UTF-8"?>
    into the copied files:
    1. .kjb files:
      <?xml-stylesheet type="text/xsl" href="documentationjob.xsl"?>
    2. .ktr files:
      <?xml-stylesheet type="text/xsl" href="documentationtrans.xsl"?>
    3. .mondrian.xml files:
      <?xml-stylesheet type="text/xsl" href="documentationcube.xsl"?>
  4. Open your copied and edited files in the web browser and see a formatted description of those files
Note, the attached template is configured to only include notes starting with '#'. Please start the notes from the ktr and kjb files that should be included in the documentation with a '#'. This allows the developer to control which notes should be included in the documentation and which should be left out.

Warning: When you create a copy of the .kjb or .ktr file to insert the reference for the xsl template, do not name the copy *.html - this will break the preview. Name it *.ktr or *.kjb - same as the original file. You can also call it *.documentation

Creator: Julia Gusman on 2009/09/12 17:54
XWiki Enterprise 1.7.2.16857 - Documentation