24.3 ADD_BLUEPRINT_FROM_TABLES Procedure
This procedure creates a blueprint and adds the tables specified based on the data dictionary.
For all the table names specified by the user, the Data Generator retrieves each table from the current schema, plus its definition, column names, data types, and attributes as they come from the DB data dictionary.
Syntax
APEX_DG_DATA_GEN.ADD_BLUEPRINT_FROM_TABLES (
p_name IN VARCHAR2,
p_tables IN wwv_flow_t_varchar2,
p_preserve_case IN VARCHAR2 DEFAULT 'N',
p_exclude_columns IN wwv_flow_t_varchar2 DEFAULT c_empty_t_varchar2,
p_description IN VARCHAR2 DEFAULT NULL,
p_lang IN VARCHAR2 DEFAULT 'en',
p_default_schema IN VARCHAR2 DEFAULT NULL,
p_blueprint_id OUT NUMBER );
Parameters
Parameter | Description |
---|---|
p_name |
Name of blueprint, combination of name and language are unique. Name is automatically upper cased. |
p_tables |
List of tables and the number of records. The format is:
For example: apex_t_varchar2('PRODUCTS:10','CUSTOMERS:50', 'SALES:1000') The ordering of tables should be: master tables before child tables (for FK relationships). |
p_preserve_case |
Defaults to N which forces table name to uppercase. If Y , preserves table case.
|
p_exclude_columns |
String array (apex_t_varchar2 ) of column names to exclude from the auto column generation. The exclude columns parameter applies to all tables in the p_tables parameter.
|
p_description |
Description of blueprint. |
p_lang |
Blueprint language determines values from built-in data sources. If the built-in data source has 0 records in this language, en is used.
|
p_default_schema |
The default schema name for the blueprint. |
p_blueprint_id |
ID of the added blueprint (OUT ).
|
Example
DECLARE
l_blueprint_id number;
BEGIN
apex_dg_data_gen.add_blueprint_from_tables(
p_name => 'Product Sales',
p_tables => apex_t_varchar2('PRODUCTS:10','CUSTOMERS:50','SALES:1000'),
p_exclude_columns => apex_t_varchar2('CREATED_BY','CREATED_DATE'),
p_description => 'A blueprint to generate product sales data',
p_lang => 'en',
p_blueprint_id => l_blueprint_id
);
END;
Parent topic: APEX_DG_DATA_GEN