Jiwa BI / QlikView model won't load data due to loops

Problem

The Jiwa BI model won't load and the re-load scripts report an error

One or more loops have been detected in your database structure. Loops may cause ambiguous results and should therefore be avoided. Loop(s) will be cut by setting one or more tables as loosely coupled."

Solution

The error indicates that there are duplicate references in the data.  Usually this is found amongst the categories.  For example, check that all inventory category labels are unique. Check that the contents of each inventory category are unique.  E.g. 'Default category' for category 1 and 'Default category' for category 2 should be renamed to 'Default category 1' and 'Default category 2' respectively.  Repeat for debtors

In addition, make sure the category labels between debtors and inventory are unique.  'Category 1' in debtors and 'Category 1' in inventory will cause a loop.  Re-name them to 'Debtors Category 1' and 'Inventory Category 1'.  Or, as per the demo data 'Market' and 'Product Type'.

Thirdly, make sure the category labels don't conflict with another standard field in Jiwa.  Eg. If you call debtor category 1 'Region', this is going to conflict with the standard Region field in purchasing.  Other examples are Branch, Currency, Size, Style.  Call them DB Region, DB Branch, DB Currency, Sizes, Styles and the like.

Fourthly, make sure there are no inventory items with duplicate suppliers.  In 7.2.1 and earlier it is possible for duplicate and multiple default suppliers to be set against an inventory item.  This has been fixed on https://jiwa.atlassian.net/browse/DEV-9143.  See that bug log for detailed steps to identify, fix and prevent duplicate and multiple default suppliers

Summary of things to check


  1. Category labels - inventory and debtors

  2. Category contents - within and between inventory and debtors

  3. Category labels don't conflict with other potential standard field names in Jiwa

  4. Multiple default suppliers on any or some inventory items.