Skip to main content

Parse SAP BusinessObjects universe (*.unv) files

Project description

Introduction

This package reads a SAP BusinessObjects universe (.unv) file and creates a text manifest that includes universe settings, classes, objects, conditions, source tables, source columns, and joins. You can use your favorite diff tool to compare manifests and track changes between versions of your universes.

Installing

Install PyUnv with easy_install:

easy_install pyunv

Using

With PyUnv installed, this will create a universe manifest:

$ python docunv.py tests/universes/universe_xir2.unv

or write your own version using pyunv:

>>> from pyunv.reader import Reader
>>> from pyunv.manifest import Manifest
>>> universe = Reader(open('sample.unv', 'rb')).universe
>>> Manifest(universe).save(open('manifest.txt', 'w'))

This will create a text manifest of the tables, columns, classes, objects, and conditions in your universe. Use diff, FileMerge, or your favorite file comparison tool to compare manifests so you can track changes between releases.

Limitations

I’ve tested PyUnv with BusinessObjects XI R2 universes. It parses most of the information stored in a universe file, but not all. Try it on your universes to see if it extracts what you need. I haven’t tested PyUnv with BusinessObjects 6.5 or XI R3. Let me know how it works for you.

License

This library and sample program are licensed under the GNU Lesser General Public License.

Changes

0.2.4 October 26, 2009

  • Changes are now shown in the PyPi description

  • docunv.py now prevents you from accidentally overwriting universe files

0.2.3 October 25, 2009

  • Added docunv, a console program that creates universe manifests

  • Added support for py2exe (use “python setup.py py2exe” to create a Windows console version of docunv)

  • Manifest constructor now accepts a custom Mako template

  • Moved unit tests out of the pyunv source folder

  • Added more reader.Reader unit tests

  • Renamed Parameters.row_limit to query_row_limit

0.2.2 September 28, 2009

  • Manifest constructor now takes the universe an argument

  • PyUnv source now conforms to PEP8 (thanks pep8!)

0.2.1 September 27, 2009

  • Universe now shows object name (instead of index) in where clauses

  • Reader now parses contexts

  • Reader now handles universe files with “false” section markers

  • Reader now differentiates between tables and aliases

  • Reader now parses custom parameters from the universe file

  • Added universe.ClassVisitor to make it easier to apply your own logic to the class/object/condition tree

  • Manifest template now displays universe statistics – number of tables, classes, joins, etc.

  • Manifest template no longer produces extra blank lines

  • Universe now gracefully handles dangling references. When you delete a universe table, column, or object, Designer does not cleanup any references to the entity.

0.2.0 September 24, 2009

  • Now parses universe joins

  • Now sorts source database columns by id

  • Added a few unittests and XI R2 test universes (more on the way)

0.1.9 September 23, 2009

  • Added sample universes for unit tests

  • Fixed a bug that caused manifests to show a condition’s parent id instead of name.

  • The manifest template now creates a manifest that resembles the PDF file created by Designer.

  • setup.py now uses Setuptools instead of distutils

  • This works now – “python setup.py test”

0.1.8 September 18, 2009

  • Restructured project folder to prepare for unit tests.

  • Moved Subversion repository to Google Code.

  • Borrowed setup.py settings from Python project.

0.1.7 September, 2009

  • Fixes a bug with reading a source table that has certain metadata. This is a temporary workaround until I can decode this metadata.

  • Now reads source columns from the universe file.

0.1.6 September 2009

  • Added the Manifest class to generate a text manifest for a BusinessObjects universe. Manifest uses the Mako template engine.

  • Reader.read_short_string now strips carriage returns and line feeds from universe strings. It returns a unicode string instead of a string tuple.

0.1.5 September 2009

  • First PyPi release

  • Reads basic universe parameters, classes, objects, conditions, tables, and virtual tables.

  • Tested with several BusinessObjects XI R2 universes and Python 2.6.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyunv-0.2.4.tar.gz (94.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page