Embedding Data in a Project
It may be desirable to create a project with embedded data from a project without embedded data:
You can eliminate the overhead of expensive database queries during production hours by pre-extracting the data.
You can control when queries are performed.
The embedded data is encrypted and compressed, so it is secure and takes less space than an extract.
Adv2Advm Utility
The Adv2Advm utility performs this task. It is available in the installation directory for ADVIZOR Analyst. This utility converts a ".adv" project file to a ".advm" profile file. It runs the ".adv" project file to extract the data from its Data Source, than saves the result to a ".advm" file.
You can use the Windows scheduler to run this utility at regular, specified intervals.
The process to use this utility is:
Publish a project to ADVIZOR Server with the "embedded data" option checked. This places a ".advm" version of the project in ADVIZOR Server.
Copy your ".adv" project to a spot on the ADVIZOR Server; it does not have to be in the ADVIZOR Server installation directory.
Use Windows Scheduler to schedule the Adv2Advm utility to convert this ".adv" project file to a ".advm" project at regular intervals.
Command Options
The command line parameters are:
-i: the input file
-o: the output file
-l: a list of files to convert
-p: keep the command running after completing conversions. Adv2Advm normally terminates immediately, but this makes it impossible to read any message on the screen; use this to have the process window remain so that message can be read.
Command switches that specify files should be followed by a ':' and then the file name, and file names with embedded spaces should be quoted. Command switches may appear in any order on the command line. For example:
adv2advm -i:"C:\Advizor Projects\MyProject.adv" -o:"C:\Advizor Projects\My Project.advm"
This example will convert the "My Project" project file into one with embedded data in the C:\Advizor Projects directory.
If multiple files are to be converted, a list file may be used to specify multiple projects. for example:
adv2advm -l:"C:\Advizor Projects\Project List.xml"
will convert the list of projects in the Project List.xml file.
The format of the project list file is a simple xml structure containing the list of input and output file names. An example of the contents of a list file is:
Note that the projectList and project elements may be called anything, but each 'project' element must contain an 'i' and 'o' element containing the input and output file names for that project.
The processing of the Adv2Advm utility is logged through the standard logging mechanism used in the other desktop applications, as well as to the displayed user interface.
Upon completion, Adv2Advm provides a return (or exit code) that can be used to determine whether any errors were encountered during processing:
0: Success
1: One or more errors ocurred
The return code can be accessed when Adv2Advm is run via a script. When using a standard batch file within a Command window, use ERRORLEVEL to access the return code. When using a script within a PowerShell window, use $LASTEXITCODE.
Installation Instructions
Please see the ADVIZOR Implementation Guide for instructions on installing adv2advm.
Last updated