genMartDef() function
The genMartDef() function returns a character large object (CLOB) that contains the data mart definition in XML format.
Syntax
- data_mart_name
- The name of the data mart.
Usage
You can either issue the genMartDef() function by itself, or incorporate it as a parameter within the LOTOFILE() function. Using the genMartDef() function with the LOTOFILE() function places the CLOB into an operating system file.Examples
Use the genMartDef() function as a parameter within the LOTOFILE() function:
EXECUTE FUNCTION LOTOFILE(genMartDef('salesmart'),
'salesmart.xml!','client')); The following example
generates the data mart definition for salesmart.
The resulting CLOB is used as a parameter within the LOTOFILE() function.
The LOTOFILE() function stores the resulting CLOB in an operating
system file named salesmart.xml on the client computer.
SELECT lotofile(genMartDef('salesmart'),'salesmart.xml!','client')
FROM iwa_marts WHERE martname='salesmart';