Application Import Export

Application definitions can be Imported and Exported by external processes through use of the following Methods in the CallistoAdmin Web Service.


1. ImportFromSQL( string sAppLabel, string sSourceDb )

  • sAppLabel – Label of the Application to be Imported into.

  • sSourceDb – Name of the SQL database containing definitions to be imported. Export from an Application to a SQL database with the Modeler for an example of database tables and content. Create an empty database with empty definition tables from the Modeler with “Create Import database” option on the Import Application dialog box.

Returns - an XmlDocument containing the results of the Import request. If everything is successfully imported a Result Code of 1 is returned. If any errors occur the XmlDocument will contain error messages.


2. ImportFromXml( string sAppLabel, XmlDocument xmlSourceDoc )

  • sAppLabel – Label of the Application to be Imported into.

  • xmlSourceDoc – An Xml document containing all the definitions to be imported. All tables and fields included in the SQL external database are included in the Xml document. Export for an Application to a File with the Modeler for an example of the required Xml formats.

Returns – an XmlDocument containing the results of the Import request. If everything is successfully imported a Result Code of 1 is returned. If any errors occur the XmlDocument will contain error messages.


3. Export( string sAppLabel, XmlDocument xmlRequest )

  • sAppLabel – Label of the Application to Exported from.

  • xmlRequest – An Xml document containing the request which defines the destination of the export, options for the export, and the items to be exported. See the following xmlRequest Examples for more information on the xmlRequest format.


4. xmlRequest Examples:

Sample request to Export all Model Definitions, Dimension Definitions, Dimensions Content, Security Role Definitions, and All UserDefinitions to a SQL database named “T4_Test”. The Export will include Internal Ids for reliable migration of definitions and reports between Production and Development systems.

<ExportRequest 
      Format="SQL" 
      Database="T4_Test" 
      AllModelsDefinition="1" 
      AllDimensionsDefinition="1" 
      AllDimensionsContent="1" 
      AllSecurityRolesDefinition="1" 
      AllUsersDefinition="1" 
      IncludeInternalIds="1" 
      OverwriteSqlDb="1">
</ExportRequest>

Sample request to Export selected Model Definitions, Dimension Definitions, Dimensions Content, and Security Role Definitions to a SQL database named “T4_Test”. Everything in the SQL database will be overwritten so that after the Export the database will only contain tables with information for the requested items. The export tables will not include Internal Ids. (Note: When Internal Ids are not included in the external tables, all existing Internal Ids are automatically maintained on an Import with new Ids assigned for any new items in the application.)

<ExportRequest Format="SQL" Database="T4_Test" OverwriteSqlDb="1">
      <ModelDefinition Label="Finance"/>
      <ModelDefinition Label="FXRates"/>
      <DimensionDefinition Label="Account"/>
      <DimensionDefinition Label="Entity"/>
      <DimensionContent Label="Account"/>
      <DimensionContent Label="Entity"/>
      <SecurityRoleDefinition Label="test2"/>
</ExportRequest>


5. External Table Formats

5.1 Model Definitions

XT_ModelDefinition

  • Action – Only default add/update supported. Delete action not available yet.

  • Label

  • Description

  • ModelType – Valid entries are “Generic” and “Status”

  • TextSupport

  • ChangeInfo

XT_ModelDimensions

  • Action – Only default add/update supported. Delete action not available yet.

  • Model

  • Dimension

XT_ModelAssumptions

  • Action – Only default add/update supported. Delete action not available yet.

  • Model

  • AssumptionModel

XT_BusinessRule

  • Action – Only default add/update supported. Delete action not available yet.

  • Model

  • Label

  • Type – Valid entries are “Dynamic”, “Library”, “SQL”

  • Text – Clear text MDX script for Dynamic rule or SQL script for SQL rule. Empty for Library rule. In the external Xml file format, this value must be stored with a .Net XmlConvert.EncodeName function.

XT_BusinessRuleSteps

  • Model

  • BusinessRule

  • Label

  • DefinitionLabel – Name of the rule in the Business Rule library.

  • SequenceNumber – A numeric value used to control the order of the Levels. In the External XML file format, this tag is not required since the order is determine by the order in the document.

XT_BusinessRuleStepRecords

  • Model

  • BusinessRule

  • BusinessRuleStep

  • Label

  • SequenceNumber – A numeric value used to control the order of the Levels. In the External XML file format, this tag is not required since the order is determine by the order in the document.

XT_BusinessRuleStepRecordParameters

  • Model

  • BusinessRule

  • BusinessRuleStep

  • BusinessRuleStepRecord

  • Parameter

  • Value – Clear value for the Parameter. In the external Xml file format, this value must be stored with a .Net XmlConvert.EncodeName function.


5.2 Dimension Definitiions

XT_DimensionDefinition

  • Action – Only default add/update supported. Delete action not available yet.

  • Label

  • Description

  • Type

  • Secured

  • DefaultHierarchy

XT_PropertyDefinition

  • Action – Only default add/update supported. Delete action not available yet.

  • Dimension

  • Label

  • DataType – Valid entries are “Text”, “Integer”, “Double”, “Member”, “TrueFalse”

  • Size

  • DefaultValue

  • MemberDimension

  • MemberHierarchy

XT_HierarchyDefinition

  • Action – Only default add/update supported. Delete action not available yet.

  • Dimension

  • Label

XT_HierarchyLevels

  • Action – Only default add/update supported. Delete action not available yet.

  • Dimension

  • Hierarchy

  • LevelName

  • SequenceNumber – A numeric value used to control the order of the Levels. In the External XML file format, this tag is not required since the order is determine by the order in the document.

XT_MemberViewDefinition

  • Action – Only default add/update supported. Delete action not available yet.

  • Dimension

  • Label

  • Property

  • ViewLevel – Number indicating which level this property is defining the parents for. Numbers must be contiguous starting with 1 for the top level of the hierarchy.


5.3 Dimension Content

XT_DS_dimensionname

  • MemberId – Optional value. If there is no MemberId entered for the member, then if a member with this Label already exists, the existing MemberId is assigned. Otherwise a new unique MemberId is assigned to the member.

  • Label

  • Description

  • Property Fields

XT_HS_dimensionname_hierarchyname

  • ParentLabel

  • ChildLabel

  • SequenceNumber – A numeric value used to control the order of the Levels. In the External XML file format, this tag is not required since the order is determine by the order in the document.


5.4 Security Role Definitions

XT_SecurityRoleDefinition

  • Action – Only default add/update supported. Delete action not available yet.

  • Label

  • Description

XT_SecurityUser

  • Role

  • WinUser

  • WinGroup – Not implemented yet.

XT_SecurityMemberAccess

  • Role

  • Model

  • Dimension

  • Hierarchy

  • Member

  • AccessType – Valid entries are “3” = Write access to this member and all children, “2” = Read access to this member and all children, “-1” = No access to this member and all children.

XT_SecurityActionAccess

  • Role

  • Label

  • HideAction – Valid entry is “1” = Hide or disable this Button or Tab in the Excel Addin.


5.5 User Definitions

XT_UserDefinition

  • Action – Only default add/update supported. Delete action not available yet.

  • WinUser

  • Active

  • Email

  • UserId – Internal id for this user. If no Userid then any existing WinUser that currently exists will be maintained with the current Userid, otherwise a new unique Userid will be assigned.