Scope

This test set is designed to test the loading of Links.

Only 1 instance of each Key combination must be present in the Source Table.

All related Hubs must already be populated with the requisite Hub Keys in order for the Link Load to be able to look up its keys.

Definitions

The Business Keys of the Source Table are used to detect Inserts.

Allowable Data Types:

  1. bigint
  2. binary
  3. bit
  4. char
  5. date
  6. datetime
  7. datetimeoffset
  8. datetime2
  9. decimal
  10. float
  11. int
  12. money
  13. nchar
  14. numeric
  15. nvarchar
  16. real
  17. smalldatetime
  18. smallint
  19. smallmoney
  20. time
  21. tinyint
  22. varbinary
  23. varchar

Functions

The following functions are tested:

  1. Inserts – when a new Key Combination is detected, a Link Row is created with:
    1. A Load Date/Time which reflects the current Server Clock Time;
    2. A Record Source, which is the Config Key of the Source Table which Sourced the New Key;
    3. Two or More columns holding the Relevant Hub Keys;
    4. A surrogate Key, which generates a unique integer key, which will be used throughout the Data Vault to refer to the Link Key Combination.

Test Scheme

In order to achieve a thorough test of the “Load Link” feature

Arrange:

  1. Create 3 Source Tables ST1, ST2 and  ST3;
  2. ST1 should have a single Column of Integer Data Type;
  3. ST2 should have a single Column of VarChar Data Type;
  4. ST3 should have Two Columns – an Integer and a Varchar, to match ST1 and ST2;
  5. Create the necessary Configuration to be able to load HUB1 from ST1, HUB2 from ST2;
  6. Create the necessary Configuration Data to be able to load LINK1 from ST3.

Act:

  1. Create Key1 in ST1;
  2. Create Key1 in ST2;
  3. Load ST1 and ST2 Hubs to ensure that the necessary Hub keys are present.
  4. Create a row in ST3 with  the Key1 from ST1 and Key1 from ST2;
  5. Run1: load all Tables;
  6. Create Key2 in ST1 with a new, distinct value;
  7. Delete Key1 in ST2;
  8. Load ST1 and ST2 Hubs to ensure that the necessary Hub keys are present.
  9. Create Key2 in ST2, with new values;
  10. Create a row in ST3 with  the Key2 from ST1 and Key2 from ST2;
  11. Run2: load all tables;

Assert:

  1. LINK1 Row1 ST1 Key1 + ST2 Key1:
    1. The Load Date/Time should be the Server Clock Time as at Run1;
    2. The record Source should point to ST3;
    3. The Payload should be the values of ST3 Row 1.
  2. LINK1 Row2 ST1Key2 + ST2 Key2:
    1. The Load Date/Time should be the Server Clock Time as at Run2;
    2. The record source should point to ST3;
    3. The Payload should be the values of ST3 Row 2;

Description of the Load Link Feature