Documentation Automation

Contents:

The Background

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.

Instructions

The xsl templates are attached to this page as well as the scripts required to use them. These scripts are configured to work in the following structure

-${ProjectFolder}
|-etl
--|-JOBS
--|-TRANSFORMATIONS
--|-DOCUMENTATION

The following steps will allow you to create the documentation:

  1. Download the attached templates and scripts and save them in a convenient location.
  2. To create a xslt documentation for a specific project:
  3. Open the command line
  4. cd into the folder where you downloaded the scripts to
  5. run ./createxsltdocumentation.sh ${ProjectFolder}/etl
    Note: the ${ProjectFolder} is an input parameter required for the script, that defines which project where the documentation scripts will be applied.
  6. Open either:
    1. the DOCUMENTATION/index.html or
    2. the DOCUMENTATION/.kjb or DOCUMENTATION/.ktr files in a web-browser to view the HTML documentation
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.

The attached scripts will copy the documentationjob.xsl and documentationtrans.xsl into the required folders as well as insert the references to them in all the jobs and transformations.

Resources

Further on XSLT.


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