Import Data

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

Click here for aggregate storage version

You can import data from data files or external sources, with or without a rules file.

Minimum permission required: Write.

Syntax


Description of imp_data.gif follows
Description of the illustration imp_data.gif

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

Keywords

...using max_threads INTEGER

Optionally specify a maximum number of threads to use, if this is a parallel data load.

If this clause is omitted for a parallel data load, Essbase uses a number of pipelines equal to the lesser of number of files, or half the number of CPU cores.

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

Specify whether the data import file(s) are local or on the server, and specify the type of import file(s).

To import from multiple files in parallel, use the wildcard characters * and/or ? in the IMP-FILE name so that all intended import files are matched.

  • * substitutes any number of characters, and can be used anywhere in the pattern. For example, day*.txt matches an entire set of import files ranging from day1.txt - day9.txt.

  • ?* substitutes one occurrence of any character, and can be used anywhere in the pattern. For example, 0?-*-2011.txt matches data source files named by date, for the single-digit months (Jan to Sept).

...using ... rules_file

Import data into the database using a specified rules file. If you are using a rules file for a parallel data load, all the data files in the load must be able to use the same rules file.

...<data error spec> (on error...)

Required. Tell Essbase what to do in case of errors during the data load: abort the operation, or write or append to a specified error log.

...<data record spec> from data_string

Load a single data record into the selected database. The string following data_string must be a contiguous line, without newline characters.

...<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. For example:

    import database Sample.Basic data connect as "Essbaseadmin" identified by "Essbasepa55w0RD" using server rules_file "myrulefile" on error write to 'loadds.err';
  • Otherwise, provide the user name and password required to connect to the external RDBMS source. For example:

    import database Sample.Basic data connect as "RDBMSuser" identified by "RDBMSpa55w0RD" using server rules_file "myrulefile" on error write to 'loadds.err';

Notes

  • This statement requires the database to be started.

  • When using the import statement, you must specify what should happen in case of an error.

Example

When the Essbase file catalog location is unspecified, the cube directory is the assumed location.

The following example performs a data load 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' data from server data_file 'catalog/shared/Data_Basic' using server rules_file 'Data' on error write to "dataload.err";