Import Dimensions

The MaxL import dimensions statement helps you load dimensions into an Essbase database.

Minimum permission required: Write.

Syntax


Description of imp_dims.gif follows
Description of the illustration imp_dims.gif

You can import dimensions to a database in the following ways using import dimensions.

Keywords

import database <dbs-name> dimensions from...

Specify whether the dimension import is from a local or server file, and what type of file to import the dimension from.

...using ... rules_file

Import dimensions into the database outline using a specified rules file.

...enforce verification

Verify the outline resulting from the dimension build. This is the default behavior.

...suppress verification

Do not verify the outline resulting from the dimension build.

Caution:

Using this option defers restructuring.

...preserve all data

If you need to preserve all data when importing dimensions, specify that here.

...on error...

Tell Essbase what to do in case of errors during the dimension build: abort the operation, or write or append to an error log.

...<SQL connect spec> (connect as...)

If you are importing from an SQL source, you must always use a rule file. Provide the appropriate user name and password:

  • If the network connectivity to the source data is saved in an Essbase connection and Datasource, provide your Essbase credentials in the MaxL statement.

  • Otherwise, provide the user name and password required to connect to the external RDBMS source.

...<preserve spec alt> (preserve...data)

If you need to preserve level-0 or input data when importing dimensions, specify that here.

Notes

  • This statement requires the database to be started.

  • When using the import statement, you must specify how error logs should be handled.

  • When multiple files are included in the same statement, restructure is deferred until all files have been processed. The deferred-restructure type of dimension build has been called an incremental dimension build.

  • When the suppress verification option is used, restructure is deferred.

  • When multiple files are included in the same statement, be sure verification is enforced for the last file.

Example

The following example performs a dimension build using a data file stored in the shared folder of the Essbase file catalog. The rule file is in the cube directory for Sample Basic.

import database 'Sample'.'Basic' dimensions from server data_file 'catalog/shared/addproducts' using server rules_file 'addproduct' on error write to "dimrule.err";

The following example performs a dimension build using a data file and rule file located in the cube directory for Sample Basic. When the Essbase file catalog location are unspecified, as in this example, the cube directory is assumed to be the location of the files. In other words, if dims.txt and rulesfile.rul both exist in the cube directory, then the dimension build will use these files.

import database sample.basic dimensions
from data_file 'dims.txt' using rules_file 'rulesfile.rul'
on error append to "dimbuild.log";

The following example performs a dimension build using a data file stored in a user directory in the Essbase file catalog. The rule file is in the shared directory in the catalog.

import database 'Sample'.'Basic' dimensions from server data_file 'catalog/users/user1/Dim_Market' using server rules_file 'catalog/shared/Dim_Market' on error write to "dimrule.err";