System Import Zip authoring

Introduction

BA-Server 5.0 introduces a new Import / Export feature which allows you to transport Repository content, models and connections via a ZipFile. Through this feature, you can export from one server to import into another. You can also have predefined content which can be setup to be imported into the system on startup. This simplifies provisioning of new servers and lifecycle management.

Contents of the Import Zip

The Import / Export zip file is composed of repository content in standard file/folder structures representing the repository content and a descriptor file "manifest.xml" at the top of the zip which contains metadata about the repository content such as owner, access control, as well as containing definitions for Mondrian Catalogs, Metadata Domains and Pentaho Datasources (JDBC connections).

Metadata Definitions

Metadata imports are done with a combination of an domain XMI file (produced from Pentaho Metadata Editor) and an XML entry in the manifest. The XMI file can be placed anywhere in the zip. The corresponding XML describing the Metadata model is as follows:

    <ExportManifestMetadata domainId="testDomain" file="metadata/steel-wheels.xmi"/>

ExportManifestMetadata tags are top-level tags in the document right under the main <ExportManifest> element.

Mondrian Definitions

Mondrian is similar to Metadata in that there's a file in the zip, in this case the Mondrian Schema XML and corresponding XML defining additional information used by the system.

    <ExportManifestMondrian file="mondrian/steelwheels.mondrian.xml">
        <catalogName>myCatalog</catalogName>
        <xmlaEnabled>false</xmlaEnabled>
        <parameters>
            <entries>
                <entry key="Provider" value="mondrian"/>
                <entry key="datasourceName" value="SampleData"/>
                <entry key="EnableXmla" value="false"/>
            </entries>
        </parameters>
    </ExportManifestMondrian>

Pentaho Datasources

Pentaho managed JDBC datasources are defined in XML alone. All you need to have a datasource imported is to define it as follows in the exportManifest.xml

<ExportManifestDatasource>
  <name>SampleDataImport</name>
  <accessType>NATIVE</accessType>
  <accessTypeValue>NATIVE</accessTypeValue>
  <attributes/>
  <changed>false</changed>
  <connectionPoolingProperties/>
  <databaseName>SampleData</databaseName>
  <databasePort>9001</databasePort>
  <databaseType>
    <defaultDatabasePort>0</defaultDatabasePort>
    <name>Hypersonic</name>
    <shortName>HYPERSONIC</shortName>
  </databaseType>
  <extraOptions/>
  <forcingIdentifiersToLowerCase>false</forcingIdentifiersToLowerCase>
  <forcingIdentifiersToUpperCase>false</forcingIdentifiersToUpperCase>
  <hostname>localhost</hostname>
  <initialPoolSize>0</initialPoolSize>
  <maximumPoolSize>20</maximumPoolSize>
  <partitioned>false</partitioned>
  <password>password</password>
  <quoteAllFields>false</quoteAllFields>
  <streamingResults>false</streamingResults>
  <username>pentaho_user</username>
  <usingConnectionPool>false</usingConnectionPool>
  <usingDoubleDecimalAsSchemaTableSeparator>false</usingDoubleDecimalAsSchemaTableSeparator>
</ExportManifestDatasource>

Schedules

Schedules can also be described using the following XML element. Any resource which can be scheduled through the PUC UI can be scheduled thought this as well.

<ExportManifestSchedule>
    <duration>0</duration>
    <inputFile>/your/schedulable/content.xaction</inputFile>
    <jobName>Your Schedule Name</jobName>
    <jobParameters>
        <name>autoCreateUniqueFilename</name>
        <stringValue>false</stringValue>
        <type>boolean</type>
    </jobParameters>
    <outputFile>/public/pentaho-operations-mart/generated_logs</outputFile>
    <simpleJobTrigger>
        <duration>-1</duration>
        <uiPassParam>MINUTES</uiPassParam>
        <repeatCount>-1</repeatCount>
        <repeatInterval>1800</repeatInterval>
    </simpleJobTrigger>
</ExportManifestSchedule>