Once an EDW 3NF object has been defined in the metadata and created in the database, an update procedure can be generated to handle the joining of any tables and the update of the EDW 3NF object.
|
To generate a procedure:
Options | Description | |
---|---|---|
Template | Enables you to generate update procedures via a template. | |
Business Key Columns | Columns that define the business key for update processing. Required to include Update options. Clicking the ellipsis button brings up the Business Key selection screen.
| |
Parameters | Any parameters selected are included in the generated update procedure as variables. The procedure includes code to retrieve the value of the parameter at run time and store it in the declared variable. Clicking the ellipsis button brings up the Parameters selection screen. For example, a parameter called MINIMUM_ORDER_NUMBER_SINCE_LAST_SOURCE_LOAD will be available as the variable v_MINIMUM_ORDER_NUMBER_SINCE_L.
| |
Include Initial Load Insert | Adds insert statement to the update procedure that runs if the target EDW 3NF object is empty. The benefit of this is improved performance inserting into an empty table without performing any checks to see if rows already exist. The default for this field is off (i.e. an initial insert statement is not added to the procedure). | |
Process by Batch | Enables you to select a column to drive data processing in a loop based on the distinct ordered values of the selected columns. The update procedure loops on this column and performs the delete, update and/or insert for each value. If the column chosen is a date data type (date, datetime or timestamp), then the user can specify yearly, monthly, daily or column level looping. The default for this field is off (do not do batch processing). | |
Delete Before Insert | Enables you to select how to process deletes. It enables a delete statement to be added to the update procedure before any update or insert statement. This is a particularly useful option for purging old data and for updates based on a source system batch number. If this option is selected, the following options are also available:
| |
Process Method | Select between Insert/Update and Merge which allows you to use the Merge statement instead of two separate Insert and update statements. | |
Include Insert Statement | Includes the insert statement in the procedure to insert new rows in the EDW 3NF Object.
| |
Insert New Rows Only | Uses change detection to work out what rows require inserting. | |
New Row Identification Method | Method used to identify that records in the source are not currently recorded in the target table. | |
Existing Data Selection Hint | Database-compliant hint to be used for the existing data select statement. | |
Include Update Statement | Includes an update statement in the procedure to update changing rows in the EDW 3NF Object. If this option is chosen, then the Update Changed rows only option is available.
| |
Update Changed Rows Only | Uses change detection to work out what rows require updating. Choosing this option, enables the Change Row identification Method. | |
Change Row Identification Method | Method used to identify that records in source have changed from what is currently recorded in the target table. | |
Existing Data Selection Hint | Database-compliant hint to be used for the existing data select statement.
|
Options | Description |
---|---|
Distinct Data Select | Ensures duplicate rows are not added to the EDW 3NF Object. This is achieved by the word DISTINCT being added to the source select in the update procedure. This is not selected by default. Select Hint: A database-compliant hint to be used in the source Select statement. |
Source Join | The From clause, including Source Join information. |
Where Clause | The Where clause. |
Group By | The Group By clause. |
A simple join only returns rows where data is matched in both tables. So for example, if table A has 100 rows and table B has a subset of 24 rows. If all the rows in table B can be joined to table A then 24 rows will be returned. The other 76 rows from table A will not be returned.
The outer join returns all rows in the master table regardless of whether or not they are found in the second table. So if the example above was executed with table A as the master table then 100 rows would be returned. 76 of those rows would have null values for the table B columns.
|
By default, a number of indexes will be created to support each EDW 3NF table. These indexes are added once the procedure has been built.
An example of the type of indexes created is as follows:
Additional indexes can be added, or these indexes changed. Refer to Indexes
for more details.
To convert an EDW 3NF table to an EDW 3NF history table:
If the existing EDW 3NF table is NOT to be dropped and recreated, then the following process must be followed:
The SQL statement in this window can be edited if required. |