Import Data
Click here for aggregate storage version
Import data from data files, with or without a rules file.
Minimum permission required: Write.
Syntax

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 fromday1.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 data from an SQL source, provide your SQL user name and password. You must always use a rules file when you load SQL data sources.
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.
-
To import from a SQL data source, you must connect as the relational user name, and use a rules file.
Example
import database Sample.Basic data from server data_file 'expsamp.txt' on error abort;
import database Sample.Basic data from server data_file '/Sample/Basic/expsamp.txt' on error abort;