Category: data warehousing

  • Requirements analysis

    Recently I read a very interesting book on requirements analysis “Mastering the Requirements Process: Getting Requirements Right” by Suzanne Robertson and James Robertson. They wrote a practical book that lead to a template for such a document
    They advocate to spend enough time on requirements analysis, which can be described shortly as “getting to know what the user wants”. The idea is that a project should be based upon the users’ requirements. If one understands these requirements, one knows the scope of the project. Moreover, the priority within the project can be set better as it is based on user’ sensitivities.
    Formulating the requirements is fundamentally different from writing a design. A design provides a solution and is formulated in technical terms. Requirements provides a list of user wants and it is formulated in business terms. Hence a discussion on databases doesn’t belong in a requirements document as it is part of a solution. The same holds for a user interface; this is part of a solution; it is not a requirement.

    The requirements fall into three groups:

    • Functional requirements that indicate what functionalities (data, business logic) is delivered by the system. It indicates what the system must do.
    • Non-functional requirements that indicate how the data/ business logic is delivered. One may include security requirements here, performance requirements. This indicates a property of the system.
    • Constraints that indicate to which rules a project must comply. An example is the toolset that might be used to implement the solution.

    The requirements must comply to a certain format:

    • They must be numbered as to make them traceable.
    • They must be testable. Hence they must be formulated in a quantified way. Examples of requirements that are formulated wrong are: “The application must generate an exciting user experience. ” Any experience may be labelled as exciting. Hence it is not testable. Better is: the application can be understood by a user within 30 seconds, or the report must be generated in 30 seconds.

    The requirements should fall within the scope of the project. This scope is identified with a context diagramme. See my other post. A requirement falls within the circle that in shown in the context diagramme and which describes the project. This context diagramme also provides a nice starting point for further requirements analysis. The context diagramme displays dataflows to and fro the system. These dataflows are indicated by arrows. For each of these arrows, logic must be created in the systems that handles these input- and output flows. This logic is derived from business requirements.

  • Context diagrammes – understanding a scope

    I came accross a very nice technique that can be used to show the scope of a project.
    It is called the Context Diagramme.
    The idea is that the system is shown as one item. The internal structure within the system is not displayed. Instead the diagramme shows the interaction from the system with external interfaces. The end result is an overview where the external interfaces are displayed clearly with the type of interaction that they have with the system. The nice thing is that a graphical overview is given of the project that can be used for discussion with the end-user. In that discussion, the boundaries of the system will become clearer to all. Moreover, the external interfaces will be made explicit. As the end-user will be involved in discussions on these external interfaces, it is good to be able to inform him upfront on these interfaces and why they are needed.

    If the external interfaces are listed explicitly with their interaction with the system, the scope of the system can be made clear. The system should be able to deal with all stimuli and data that stem from the external interfaces. In other words: the system should be able to consume the datastreams, or generate the dataflows that are indicated by the diagramme. Such streams are shown explicitly in the diagramme. The scope should then include all handling of such streams. In principle, the scope is indicated by the circle in the middle of the diagramme. The external interfaces are outside the scope. Whether the arrows between the external interfaces and the system are within scope is subject of negotiation between the project and others that are responsible for the interfaces.

    TERADATA_FALLBACK

    Such a context diagramme uses three types of symbols:

    • A circle that contains the system. The system is understood as one entity where the internal working is not displayed.
    • A block that displays the external party. Think of customers as an external party.
    • An arrow that shows the interaction between an external interfaces and the system.

     

    The external interfaces can be manifold. Let me give a few examples:

    • Users that actively use the system. An example is a user who issues an order to the system. Likewise, a user who required a certain report is an example of an external party.
    • Users who depend on the system. An example is an accountant who receives a certain plan that is created by the system. The user doesn’t explicitly require such a plan; he only receives such a plan.
    • An independent body who influences the system. One may think of a body that issues standards that need to be followed. Such standards may influence the system that is described in the diagramme.
    • A system that sends data to the system. The system may have a role as data-provider. In that case the external system doesn’t benefit from the system that is described; it only must provide data.
    • A system that cooperates with the system in question. An example might be an internet provides who provides the infra structute that is used by the system.

    But one may also think of abstract types of interfaces, such as:

    • A time dependent event, such as the end of a month when sales overviews must be provided.
    • An event, such as the introduction of a new product.

    The relations are mostly expressed as datastreams. As an example, one may think of a request for a report. The data that are conveyed to the system are: a reportindicator, a period for which the report is generated, a possible filter condition etc. The idea is that these diagrammes are mostly used for software engineering and communication between actors can always described with data.
    This diagramme will be used in the discussion with the end-user. Hence the language that is used must be business terminology. Hence, system names should be avoided as such usage may lead to unnecessary discussions. It is better to use business names for the interfaces involved as the picture can be understood more easily.

    Context_FALLBACK

    I took the example of a data warehouse project. This project uses Balance Sheet data, Profit & Loss data, Inventory data and Cost data that are uploaded on a monthly base to a data warehouse. From that data warehouse, data are sent to external systems and the data that are used in a reporting environment.

    The workpackage is above diagramme consists of collecting and storing data. The reporting environment is outside the workpackage. Hence the interface reporting (O2) is displayed outside the circle W1.

    If reporting is part of the workpackage, the diagramme must be changed into:
    Context_FALLBACK

    In this diagramme, the work package W1 consists of reporting as well. The external interface is then directly with the end users who send paramters and receive reports.

    This context diagramme is often seen as part of an hierarchy. In a related diagramme, the circle that indicates the system is detailed. In that related diagramme, the internal working within the system is shown. When such a hierarchy is used, the context diagramme is labelled as level-0 Data Flow Diagramme. The diagrammes that show the internal workings of the system are labelled as level-1 or level-2 Data Flow Diagrammes. In the example above, I labelled the items to allow later decomposition. As an example, in a level-1 Data Flow Diagramme, one might have P1.1, P1.2, P1.3 that are part of the P1 process.
    More or less the same holds for time-depencies. The context diagramme cannot be used to indicate time dependencies. For that purpose, other techniques can be used, such as sequence diagrammes. If one would like to show the time-depencies, the context diagrammes could be expanded into sequence diagrammes.

  • Yet another checklist

    I often come across checklists. Such checklists are used to assess the quality of, say, a database. See here for an example of such a checklist. In this case, we have a checklist that is created to assess the quality of a Teradata database.
    Such checklist are very interesting. They are generally based on a very good understanding of the subject area. Moreover, such knowledge is written in a very concise form which provides the reader with a quick insight as to whether the list might benefit the reader.

  • MOLAP and ROLAP

    I currently work in an organisation that has a debate on whether to use MOLAP or ROLAP. But first of all: what is discussed here?
    ROLAP and MOLAP are two different techniques to store data that are meant for OLAP analysis. In ROLAP the data are stored in tables in a relational database and each data search in OLAP is translated into a SQL query that is fired upon the relational database. In MOLAP, the data are stored in a proprietary structure that is fully optimised to return data from OLAP investigations.
    Both system have their advantages. The big advantage of ROLAP is that one takes full advantage of an existing DBMS. The data are stored in a DBMS. Any SQL query may then use the computing power of a DBMS without the need of installing yet another programme. It is also true that in a modern data warehouse environment with an existing data warehouse, one may directly use the tables that reside in a data warehouse. Hence a ROLAP doesn’t need to copy the data in a proprietary structure to allow retrieving OLAP outcomes.
    The big advantage of MOLAP is that a separate proprietary data structure is created that geared towards fast returning OLAP outcomes from an OLAP question. To do so, the data structure needs to anticipate on every possible OLAP question. This implies that with an increasing number of different outcomes, the proprietary data structure increases in size.
    This shows that one may have a case to advocate MOLAP if:
    – the number of different outcomes from OLAP is not too big (hence the proprietary data structure is not too big in size)

    In a ROLAP structure, each OLAP question is translated into a SQL query. If the same OLAP is raised multiple times, multiple SQL queries will be fired. As these SQL queries are identical, it might be that the DBMS undertakes the same actions multiple times (assuming results are not cached). In a MOLAP structure, the possible OLAP outcomes are pregenerated in a proprietary data structure. Hence, complex calculations are not only doable, they return quickly, once they are stored in the MOLAP structure, as the are pregenerated. An update can be done after a fresh data load in the data warehouse. Once the data structure is ready, each OLAP question can be answered from that data structure. If the same OLAP question is raised, the same data are retrieved from that proprietary datastructure.
    This shows that one has a case to advocate MOLAP if:
    – the queries in the database are complicated; examples of such complex queries are

    • queries with a complex CASE statement,
    • CASE in the group by,
    • queries that generate running totals,
    • queries that process large chunks of data
    • queries with complex joins
    • etc.

    – the same OLAP question is repeated multiple times
    – the data are refreshed at large time intervals

    One uses an OLAP structure to undertake an analysis that summarises data and, if required, allocates data into lower levels of detail. I realise that an OLAP structure is also used to create a framework to retrieve a series of reports. Within these reports, no summarisations or allocations are done. Hence, one may say that only a part of the OLAP functionality is used. That also means that the proprietary data structure that is created in MOLAP is only partly used if no summarisations are undertaken. In that case a MOLAP might not be the best solution.
    This shows that one has a case to advocate MOLAP if:
    – one undertakes many OLAP movements, like summarisation, consolidation and detailing.

    The case for ROLAP can be made if we have:

    • ad hoc reports or infrequently used reports,
    • near real time reports,
    • high cardinal dimension tables
    • a request for non-summary reports
    • reports that are only require a simple SQL that returns results quickly

     

  • The Teradata answer on materialised views

    Teradata has a feature that is designed to increase the performance of queries. This feature is called the “join index”. Such a join index is a structure that stores the outcomes from a query. These outcomes are stored permanently and they wait for the moment when they are called.
    The syntax of such a join index is straightforward:

    CREATE JOIN INDEX SAN_D_FAAPOC_01.EMP_DEPT
    AS
    SELECT
    DEPT.DEPT_NO,
    DEPT.DEPT_NAME,
    EMP.EMP_NUM,
    EMP.EMP_NAME
    FROM
    SAN_D_FAAPOC_01.EMPLOYEE EMP
    INNER JOIN   
    SAN_D_FAAPOC_01.DEPARTMENT DEPT
    ON
    DEPT.DEPT_NO = EMP.DEPT_NO
    PRIMARY INDEX(EMP_NUM); 
    

    The syntax contains the definition of a query. These outcomes are permanently stored in the database as an object that is called here as “EMP_DEPT”.

    If a record gets added to one of the base tables that are used in the join index, the join index gets updated to reflect the new situation. This is the downside of the join index: each update in base table is automatically followed by an update of the join index. This involves extra overhead processing time.
    Hence the creation of a join index must be weighted against the costs of a continuous update of the join index as result from changes in the base tables.

    It can be decided to create a permanent table that contains the query outcomes. Such a table can be updated at fixed time intervals (in stead of an automatic update as with the join index).

    Two final remark.
    One. One can not address a join index directly. A statement like “select * from join_index” will only return an error code. One only uses such a join index indirectly. It is used if a query is written that looks similar to the join index. In that case, the optimiser decides that join index reduces the time to return the outcomes.
    Two. One might know that a join index is used when the explain plan is read. This explain plan is show if the query is preceded by the keyword “explain”. In that case a well-written text shows how the optimiser works. One may then see whether the join index is used or not.

  • Soft RI in Teradata

    Teradata has the concept of “Soft RI”. In this concept, a foreign key is created but its restriction is not enforced.
    What happens in that situation?

    Let’s look at the normal situation of referential integrity. Suppose, we have two tables. One table is referred to by a second table. If a foreign key is created, we have a limitation on which records we may insert into the table under normal referential integrity. We cannot insert records that have a foreign key for which no relational record exist in the referring table. That is the normal foreign integrity constraint.
    Example: we have an “employee” table that has a foreign key “dept_no” that refers to a record in a “department” table. Suppose the department table has records for department 101, 102 and 103. If a foreign key is created, one cannot add records in the employee table that refer to department 104, as this doesn’t exist in the department table.

    To enforce this referential integrity, each insert must be followed by a check as to whether the inserted record complies to the referring table. This check costs time. Hence an insert incurs additional processing time.

    In a data warehouse environment, this overhead may be prohibitive. Moreover it might not be necessary as we retrieve the records from a source that has already enforced the referential integrity.

    In that situation, we may apply “Soft RI”. In that case a foreign key relationship is created but its referential integrity is not enforced during loading.
    In that case, we avoid the costs of the check of referential integrity. This leads to more records that can be loaded in a given time frame.

    DROP TABLE SAN_D_FAAPOC_01.EMPLOYEE;
    DROP TABLE SAN_D_FAAPOC_01.DEPARTMENT;
    
    
    CREATE SET TABLE SAN_D_FAAPOC_01.DEPARTMENT ,NO FALLBACK ,
         NO BEFORE JOURNAL,
         NO AFTER JOURNAL,
         CHECKSUM = DEFAULT,
         DEFAULT MERGEBLOCKRATIO
         (
          DEPT_NO INTEGER NOT NULL,
          DEPT_NAME VARCHAR(30) CHARACTER SET LATIN NOT CASESPECIFIC,
          DEPT_LOC VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC)
    UNIQUE PRIMARY INDEX ( DEPT_NO );
    
    
    
    INSERT INTO SAN_D_FAAPOC_01.DEPARTMENT VALUES (101,'SALES','MUMBAI');
    INSERT INTO SAN_D_FAAPOC_01.DEPARTMENT VALUES (102,'ACCOUNTS','MUMBAI');
    INSERT INTO SAN_D_FAAPOC_01.DEPARTMENT VALUES (103,'HUMAN RESOURCES','MUMBAI');
    
    
    CREATE  TABLE SAN_D_FAAPOC_01.EMPLOYEE
    (
    EMP_NUM INTEGER NOT NULL,
    EMP_NAME CHAR(30) NOT NULL,
    DEPT_NO INTEGER NOT NULL
    ,CONSTRAINT FOREIGN_EMP_DEPT FOREIGN KEY ( DEPT_NO)  REFERENCES  WITH NO CHECK OPTION DEPARTMENT(DEPT_NO)   
    )
    UNIQUE PRIMARY INDEX(EMP_NUM);
    
    
    INSERT INTO SAN_D_FAAPOC_01.EMPLOYEE VALUES (123456,'VINAY',101);
    INSERT INTO SAN_D_FAAPOC_01.EMPLOYEE VALUES (123457,'SACHIN',104);
    
    SEL
    DEPT.DEPT_NO,
    EMP.EMP_NUM,
    EMP.EMP_NAME
    FROM
    SAN_D_FAAPOC_01.EMPLOYEE EMP
    INNER JOIN   ----> HERE INNER JOIN DOES SOFT REFERENTIAL INTEGRITY & PICKS ONLY MATCHING COLUMNS
    SAN_D_FAAPOC_01.DEPARTMENT DEPT
    ON
    DEPT.DEPT_NO = EMP.DEPT_NO;
    
  • Running scripts in teradata

    Let us assume, we have a data warehouse in teradata. Let us suppose that this data warehouse is loaded with a set of scripts. In principle it could be done. The question then arises how the scripts are run. An example could clarify this. The example looks like:

    .logon oTDD001.s2.ms.****.com/TOM.VAN-MAANEN, pau26688
    .export report file=C:\Users\TOM.VAN-MAANEN\phi.txt
    .set retlimit 20
    SELECT	'"'||trim(Ident)||'";"'|| trim(Serial)||'";"'|| trim(Node)||'"' FROM	SAN_D_FAAPOC_01.TestUnicode;
    .export reset;
    .quit
    

    The first line of this script creates a connection to a Teradata machine. The second line allocates a file that will be used to write data to. The fourth line is standard example where records from a table are exported. The last lines finishes the export and finishes the export from a table.
    This scripts is called by a piped command where the script is sent to the bteq:

    C:\Users\TOM.VAN-MAANEN>bteq < bteq.txt
    BTEQ 13.10.00.01 Thu May 22 11:28:08 2014
    
    +---------+---------+---------+---------+---------+---------+---------+----
    .logon oTDD001.s2.ms.unilever.com/TOM.VAN-MAANEN,
    
     *** Logon successfully completed.
     *** Teradata Database Release is 14.00.06.05
     *** Teradata Database Version is 14.00.06.05
     *** Transaction Semantics are BTET.
     *** Session Character Set Name is 'ASCII'.
    
     *** Total elapsed time was 1 second.
    
    +---------+---------+---------+---------+---------+---------+---------+----
    .export report file=C:\Users\TOM.VAN-MAANEN\phi.txt
     *** To reset export, type .EXPORT RESET
    +---------+---------+---------+---------+---------+---------+---------+----
    .set retlimit 20
    +---------+---------+---------+---------+---------+---------+---------+----
    insert into SAN_D_FAAPOC_01.TestUnicode(ident,node,serial)
            values('Test├╣─ÖSummary','Test├╣─ÖSummary',' 19');
    
     *** Insert completed. One row added.
     *** Total elapsed time was 1 second.
    
    
    +---------+---------+---------+---------+---------+---------+---------+----
    SELECT '"'||trim(Ident)||'";"'|| trim(Serial)||'";"'|| trim(Node)||'"'
    FROM SAN_D_FAAPOC_01.TestUnicode;
    
     *** Query completed. 16 rows found. One column returned.
     *** Total elapsed time was 1 second.
    
    
    +---------+---------+---------+---------+---------+---------+---------+----
    .export reset;
     *** Output returned to console.
    +---------+---------+---------+---------+---------+---------+---------+----
    .quit
     *** You are now logged off from the DBC.
     *** Exiting BTEQ...
     *** RC (return code) = 0
    
    C:\Users\TOM.VAN-MAANEN>
    
  • Security and compliance

    Security and compliance has many different aspects. In the list below, I try to provide an overview on these aspects. We have seen:

    • Authentication. Is the person really the person that he says he is.
    • Principal Propagation. If someone from system A issues a command that system B will start, system B will need to know if that someone has the privilege to do so.
    • Encryption. Is the file or the table encrypted. This creates another layer of security. If someone gets access to these file or table without proper privileges, he is still not able to read the data without the encryption key.
    • Compliance. Are legal requirements followed?
    • Authorization. This indicates the privileges someone has.
    • Single Sign On. Some sets of applications only need one log on procedure. Once logged on, the other applications rely on the first log on procedure.
    • User management. The maintenance of the list of persons and system accounts and their privileges.
    • Logging. A document or file that contains a list of the events that have taken place.
    • Archiving. Storage of obsolete files.
    • Auditing. The process of verification of a proper working of the business process.
  • A check list for the assessment of a data warehouse

     

    Yet another checklist

    Regularly, one comes across an assignment whereby one has to assess a data warehouse. (at least in my type of work). I found a nice checklist that allows a quick overview on a data warehouse. It is composed of several sections, each one covering a certain area. Going through this list, then provides the reader with a blue print on how the data warehouse is doing.

     

    Requirements

    The first area is “requirements”. It is composed of 4 items:

    1. Do we have a concise architecture that shows the main components of the data warehouse? It should show what the major data blocks are and how the data blocks are related to the solution that is required from the business. This architecture can be created on one A4 that may be used in discussions on the data warehouse.
    2. What are the major security aspects? Who is given access?
    3. What functional requirements do we have? This could show a list of reports that are required.
    4. What non-functional requirements do we have? This covers timing issues, latency etc. Questions are raised on the performance of loading, reporting, extracting etc. Here is may be stated that the data should cover a ten year period, with most recent data being the data of last month.

    These items must be agreed upon by the business. They need to recognise the requirements,and they should have the idea that these lists offer a comprehensive overview.

     

    The sources

    Another area is a list of items on usage of the data warehouse as a source. These items are concentrated around the questions on whether the data warehouse is fit for purpose to supply the necessary data.

    1. (If the data warehouse is used as a source), do we have approval from the owner of the data warehouse? Data in the data warehouse can be used for a variety of purposes. One should have a formal approval for this usage: it should not interfere with other processes in the data warehouse.
    2. Is the purpose of the application that uses data from the data warehouse in the realm of reporting and/ or planning? A data warehouse is created for reporting purposes. The architecture reflects this. If applications use data from the data warehouse they should appreciate such architecture. The purpose of data usage should be in accordance with such architecture. As an example: a real time transaction system can not use the data from a data warehouse.
    3. Is the latency in the data warehouse compliant with the reporting requirement? It takes some time before data from a source system are reflected in the reports. The business requirements for the reports timeliness must be in accordance with these technical constraints.
    4. Does the reporting system need conformed data? A data warehouse is set up to provide a single version of the facts As an example one may think of a customer that is represented in a single version from the data warehouse, despite the fact that multiple versions can be stored in the source systems. The translation from multiple versions in the source systems to a single version in done in the data warehouse. This is an important purpose of this data warehouse. The reporting requirements should realise this mechanism. If their requirements do not need such a single version, then one may question as to whether the reports actually need to use the data warehouse as source. A different source might be more applicable. As an example: if the business request an overview  of purchases from one business process, one may question as to whether a data warehouse is the most appropriate source.
    5. The service levels of the reporting systems should be lower than the service levels of the data warehouse. The data within the data warehouse should only be used for purposes that are aligned with the stated service levels of the data warehouse. An example may clarify this. Suppose the data warehouse has a service level agreement that only allows for maintenance during office hours. One may not use the data warehouse as a source for an application that requires 7*24 support (such as an ATM application). Intuitively, it does make sense not to allow a data house to act as source for on-line banking. This item formally deals with this issue.
    6. Do we have an integrate usage of fact and dimension data from a data warehouse? Most likely, so-called fact data are stored with foreign keys that point to dimensions within the data warehouse. One needs to use both the facts and dimensions from the data warehouse. Most likely, it is almost impossible to use facts from the data warehouse in combination with dimensions from other sources.
    7. Does the reporting application require only dimensions that are generally used? In some cases, a reporting application requires dimensions that are only maintained in individual source systems. Most likely such local dimensions are not propagated into the data warehouse. It might even be that storage of such localised dimensions is not compliant with data warehouse architecture. Hence when these requirements exist, one my question as to whether the data warehouse is the most appropriate source.
    8. Do the technical means whereby data from the data warehouse are retrieved, comply with the general mechanisms employed? One would like to have a single mechanism whereby data are retrieved from the data warehouse. As an example: a general mechanism might be that data are pushed out as flat CSV files. If that general mechanism is employed, an individual reporting project should not deviate from it.
    9. Is the role of the data warehouse that of “System Of Record”? As an example, one may think of a data warehouse that has gotten the role of an overall general ledger as it acquires several accounting systems and it is used for financial reporting, It that case the data warehouse is used as a “System Of Record”. To elaborate this item, the definition of “System of Record”  is repeated here: “A system of record (SOR) or Source System of Record (SSoR) is .. the authoritative data source for a given data element or piece of information.

      ” Definition from Wikipedia. The most important word in this definition is authoritative. If the data get that role, we may have legal requirements that are related to this role.

     

    Allocations

    1. An approval for allocation must exist. Such approval is necessary to avoid performance issues that may result from allocation processes.  The idea is that allocation is used to allocate records over lower levels of detail with other tables in the data warehouse. This may have effects on performance, capacity etc. An approval from the owner of the data warehouse is therefore necessary.
    2. The allocation process can not be overly complicated. This is also directed at avoiding performance issues. As the data warehouse is a shared resource, each process must be limited to avoid performance and capacity bottlenecks. This then also holds for allocation processes.
    3. The allocation process must be decoupled from other processes. The idea is that the processes in the data warehouses should not depend on other processes in order to be able to take responsibility for the outcomes of such processes. Hence the allocation process should not rely on tables that are outside the data warehouse.
    4. Is the allocation process a scheduled / repeatable process? The idea is that all processes in the data warehouse should be scheduled and repeatable. No room exists for regular manual interventions as such processes may lead to non-traceable data; this then also holds for the allocations within the data warehouse.
    5. As the data warehouse is created to support reporting processes. Hence, the allocated data can only be used for reporting purposes.
    6. It is possible to retrieve allocation factors from an external source. In that case the allocation factors is a normal source that should comply to normal source requirements.
    7. It is possible to use allocated data from the data warehouse as a source for, say, reporting purposes. In that case the same rules as using the data warehouse as a source apply.
    8. It is possible that the allocated data get the role as “System Of Record”. In that case legal requirement pertain that are related to “System Of Record”.

     

    Data Acquisition

    1. Is the source identified? This refers to the situation that new data that are necessary for the data warehouse are known, identified and a source is known. The data source must also be investigated: a so-called profile must be created. This shows what the values were that were encountered.
    2. What is the impact of data capture on the source system? Is such impact in accordance with other service level agreements on this system?
    3. The decision to load new data must be considered against the possibility of re-use existing data in the data warehouse. It might well be that data that are required, are either already in the data warehouse or such data are already loaded in the staging area. Only if the data are not already in either of these environments, a new acquisition is necessary.
    4. Do we recognise special techniques that are needed to load dimension data? Dimension data are special data as most likely most dimension data exist both in the data warehouse and in the source system. The techniques that must be employed are directed at finding the differences between source and existing data in the data warehouse along with a subsequent update of such data in the data warehouse.
    5. Do we recognise special techniques that are needed to load fact data? Fact data stem from new events in the source system. Such new events need to be adequately captured and propagated into the data warehouse. It might be that “Change Data Capture” is employed here.

     

    ETL

    1. Do we have a dedicated staging area that allows to store the files that come from the sources? The staging area is an exact copy of the files / data structures that are sent by the sources. This is subsequently employed to update the data warehouse.
    2. Is the “System Of Record”  used to retrieve the data? The idea is that data must be retrieved from an authoritative source in order to be used in a data warehouse. As an alternative data from an exact copy can be used, as long as the data do not get changed  between the authoritative source and the copy environment. Doing so, we are sure that we only get reliable data in the data warehouse.
    3. Are the data retrieved via the fastest / best known loaders? Also here, an example may clarify it. Oracle tables may be loaded via SQL insert statements or by a direct loader like the SQL Loader. The decision on whether to use one loader or the other should be a thought over; this item requests such a decision process: the designer should know the different options to load a table and should have a well-informed decision.
    4. Is a standard naming convention being used in the ETL process? As the mappings, jobs, workflows etc all become part of one comprehensive ETL structure, one recognisable naming convention must be adhered to.
    5. Are standard blocks used for standard operations? As an example: Informatica knows so-called “mapplets”  that can be re-used for standard operations.
    6. The specific mappings are project specific. As each project has its specific mappings, we should have a specific mapping to capture this.
    7. Are general standards adhered to? As most organisations have a set of standards on ETL, such standards must be applied in the ETL procedures.
    8. Is error handling properly covered?
    9. Is process control in place?
    10. As far possible, a single tool needs to be used in ETL.
    11. Whenever a choice must be made between processing in the ETL tool or processing in the DBMS, such choice must be carefully made.

     

    Data Modelling

    1. Do we have a full mapping on every attribute from the data warehouse model back to the source? In most organisations, we have an Excel document where each row indicates how an attribute from the source is used to populate a data warehouse attribute.
    2. Do we have a document that explains the data model for the business? As the real data model might be too complicated, we should create a separate data model that leaves out unnecessary details. One might think of one A4 that provides a high level overview of the data model.
    3. If revisions have occurred on the data model for the data warehouse, are these revisions implemented in the high level overview as well? One may think of the situation that at some point in time, the high level overview and the data model are perfectly aligned. Each change in either of the two documents must later be aligned to the other document.
    4. If the organisation uses a standard data modeling tool, it must be used to capture the data model of the data warehouse. The usage of this tool must be in conformity with best practices.
    5. When the organisation uses other standard documents, such documents must have been used. This allows documentation that is recognisable for future maintenance.
    6. If the organisation has a central modeling agency, such an organisation must have been informed and engaged.
    7. If codes are used in the model, such usage must have been aligned with other code usage.
    8. If a logical data model is created alongside a physical data model, such data models must be aligned. In some tools, this alignment is supported. Both Sybase Powerdesigner and CA Erwin have a capability where changes in the logical data model are automatically propagated into the physical data model.
    9. If a project only implements part of the total model, such update must be aligned with the comprehensive data model. I could imagine that a project starts with a up-to-date copy of the data model. The project then continues by adding new entities/ tables with their attributes/ fields. If the project is finished, the new elements can be merged into the new model.
    10. The data definition language (DDL) that is used to implement the addition of new tables/fields is generated according to standards that are in use in the organisation. It might be that audit tables must be updated upon new the introduction of new tables; the generated DLL then needs to reflect this.
    11. A new table needs to be performant; some general rules may enhance performance. An example might be a check on having an index on primary and foreign keys in large tables. However other checks may be applicable such as having a primary index in Teradata tables.
    12. Is the standard security on new tables being implemented? I once worked in an organisation when each table had a view. Only the view was accessible by the end-user. This was done for security reasons. Hence is that organisation, a check was done on whether such a view was implemented for any new table.
    13. When a datamart is created, the security that is mandatory, must be adhered to. An example may clarify this. Assume that an organisation requires that tables in the data warehouse can only be accessed via views. In that case, the tables in a datamart can only loaded via a view. Such security needs to be adhered to.
    14. The access privileges need to be explicitly mentioned and these privs need to be compliant to general security policies in the organisation.
    15. Other structures such as triggers, stored procedures, database links etc. must be explicitly mentioned and they must be compliant to the organisation policy.
    16. Naming standards for new tables, attributes, views in the data warehouse are adhered to.
    17. Naming standards for the data mart are adhered to.
    18. If groupings like schemas are used, the grouping standards must be complied to. I might be that dimension tables are positioned in dedicated schemas. The new tables must adhere to this standards.
    19. Derived data can only be used if there is a good reason to have them included. This rule prevents addition of intermediate values that have no value for future usage. This rule is also directed at keeping the data warehouse clean and neat. Also, the derived data must be stored in appropriate locations.
    20. If tables are split, we should properly document such split. As an example: is a table is split according to regions, we should have such regions being reflected in table in the data warehouse.
    21. If Control Tables are used, such Control Tables must be created according to general architecture.
    22. All service accounts that are used to start the ETL flows are identified. No personal account may be used to kick off the ETL flows.

     

    Data Mart

    The set-up of the Data Mart is quite tool -dependent. The tool determines to a large extent the data model, as quite some data models are not supported.

    Generally speaking, most tools require a star-like model: one fact table with some dimension tables. Other data structures are not supported: a recursive relation is not supported; some tools do not support non-hierarchical tables; some tools do not support snow-flakes; some tools are not able to deal with large dimension tables; other tools are not able to handle many dimension tables whereas other tools are not able dimension tables with too many fields.

    Hence, many items in any check-list are related to limitations that are put on the data model in the Data Mart.

    1. Are recursive relations avoided?
    2. Are snowflakes avoided?
    3. Are unbalanced hierarchies avoided?
    4. Is the report related to one fact table only?
    5. Is the report related to dimension tables that do no transgress a certain threshold?
    6. Are the names of related attributes the same (as to avoid query cross-joins)?
    7. The number of dimensions should not be too large (recommendations mention 7 as an ideal number).

    Other check list items are related to the choice where logic is implemented. We might have three separate locations where to logic:

    • when data are stored in the data mart
    • when data are defined in a cube
    • when the final report is created

    The idea that each area has its advantages and we might use this:

    • when data are stored in the data mart, we might use the ETL tools that allows tp use power of the ETL tool or the DBMS power,
    • when data are defined in a cube, we might use the summary possibilities of the cube definition
    • when the final report is created, we might use the formatting possibilities

    This implies that a well thought off choice must be made.

     

    Tooling and infrastructure

    1. Is the set of tooling compliant with the general architecture? In many organisations, some tools are designated to be use for certain purposes: Informatica is meant for ETL; MicroStrategy for reporting etc. In general, an individual project may not deviate from such general architecture.
    2. Is the hardware compliant to the general architecture? In many organisations, a certain server is dedicated for web reporting; another is designated for file storage. In general, a project should use such designated components.
    3. In many organisations, a reference architecture is created. This reference architecture indicates which logical components exist and where such components are located. This is quite well understandable as a data warehouse is a shared resource that must be used by different projects. A new project then needs to know where his items must be stored and how such items must be integrated in the existing structure.
    4. If components are decommissioned, such components need to be enumerated. The decommissioning needs to be described and the alternatives need to be indicated.
    5. The design needs to contain a list of external interfaces. All relevant sources need to be indicated on an inventory.
    6. An assessment on future support needs to be given. The main question as to whether the solution can be maintained is addressed here.
    7. Likewise the costs of maintenance and monitoring  needs to be assessd.
    8. License costs need to be clear.

     

    Security

    1.  Do we have a concise document that shows whether the data are sensitive? This requirement shows in one overview what type of data we have and what data should be accessible to whom.
    2. Do we have a person who has responsibility for security within the project?
    3. When data are retrieved from a 3rd party, is that information stream compliant to security demands as stated by the organisation? As an example, one might think of FTP usage; if FTP usage is prohibited by an organisation, an individual project should refrain from setting up retrieving data via FTP.
    4. The design document should explicitly refer to organisation guidelines on security. This reference should be as explicitly as possible. Such reference demonstrates that an individual project is aware of such guidelines and complies to these.
    5. If sensitive data are used, a design should indicate how the general rules from the organisation on security are implemented in a data warehouse project.
    6. If the general rules on security do not cover all security arrangements within a project, the extension should be described explicitly.
    7. Do we have a mapping document that describes who may access which data?
    8. Which non-users system accounts do we have? Such users are needed for ETL flows and these users should be described along with privileges.
    9. Does the organisation check the implementation of security designs?
    10. If exceptions to policy are necessary, are these agreed upon by a central security department within the organisation?
    11. Are all exceptions to the policy explicitly shown in the design?
    12. Batch applications only use system account; no user accounts are used for this purpose.

     

    Usage of dimensions

    1. Are standard dimensions used whenever possible?
    2. If additional dimensions are needed that are not yet available as standard dimensions, will such additional dimensions be available for shared usage.
    3. Is a path foreseen whereby dimensions created within a project, can be promoted to standard dimensions?

     

    Data quality

    1. Do we have a data quality environment (tooling/ hard disk space etc.)?
    2. Does the qualitative environment have access to the full data volume?
    3. Do the users have access to the data quality tools?
    4. Is it possible to create the data quality reports?
    5. Do we have a set of data quality business rules that must be checked? An example might be that a certain event must always refer to a certain dimension. This can be translated that a foreign key can not be null. A rule can be created, saying that no records may exist that have a NULL as value in the foreign key. Finally a report can be created that shows the records that transgress such rule. This rule then requires that such a list of business rules exist.
    6. How many times are the data quality rules checked?
    7. Is the format of reporting on data quality rules been agreed upon?
    8. Who will be contacted when data quality issues are discovered?
    9. Is the implementation of data quality rules part of a release (or is a part of an on-going data quality programme)?
    10. Are the data quality reports scheduled?
    11. Is every data quality rule related to source system? After all, the source of an error in the data stems from a certain source. Hence, upon discovery, such transgression must lead to a call to a source in order to improve data quality.
    12. Do we have KPIs that enable us to  monitor data quality? As an example, one might think of a KPI that calculates the average number of wrong records. Such a KPI allows us to monitor the development over time of data quality.

     

    Unattended loading

    1. We need an automatic purge mechanism that moves data when such data pass the retention period. Such mechanism needs to be automated.
    2. We need an automated process that copies data from production environment to the development environment. It might well be that only a a subset is copied. This can be done to save space.
    3. We need quality tests to see if the loading process works correctly or not. To this end, we might need to check if we do not have duplicates in the target (due to double loading) or missing loading (due to records not picked up from the source). Such quality check must be automated.
    4. We need quality checks to see if totals from sources can be reconciled with totals from targets. Such tests are closely related to the previous item. The previous item calculated  numbers of records; this item addresses the content of records. This content needs to reconciled between different areas.
    5. Files that sent to the Staging Area and which are loaded into the data warehouse, are subsequently sent to the archive. This should also be an automated process.
    6. A purging mechanism needs to exist for the files that are captured in the archive. After a predefined period, such files can be purged from the archive. This retention period needs to be parameterised to allow for changes in this policy.
    7. Credentials should not be hard coded. Ideally such credentials need to be stored in centrally stored parameters. This allows an easy update of such credentials.
    8. If audit logs and/ or error logs are created, one needs to have a policy on the retention of such files. It might be that such policies already exist on programmatic level; if such policy already exists, each project needs to adhere to it.
    9. All jobs need to be scheduled; the loading process should be an automatic process that only needs manual intervention in case of errors.
    10. The jobs need to be created on a low granular level. Such jobs need to concentrated on modifying one table only. Separate jobs can be combined into a batch to combine actions that involve  updates on different tables.
    11. The tables that are loaded need to be checked as to whether their keys are still contributing to to good performance.
    12. The schedule needs to well documented to allow proper maintenance.

     

    Standards

    The final set of items refers to standard architectures in an organisations to which a project must adhere to. In most organisations, such architecture is translated into a set of documents/ checklists. We should have an explicit list where such documents are mentioned, along with a check as to whether the designs comply to this document and an accompanying list of deviations from the documents.

    In this list, we should also have a proof that an authoritative person has signed off the requirement of compliance.

     

  • Skeleton Functional Design

    Quite often, I have to write a functional design. Such a design can be a tedious job. Part of time is spent is spent on how to represent the findings. One would like to present a nice / concise report. The writing process itself is made easier if a template is available. To this end, I use this skeleton which gives me a head start in the writing process.