Required Columns

Introduction

Checks whether there is a set of required columns present in specific object types.

How does it work?

This test case uses the “ws-red-layers” parameter list as well. It iterates through all layers (=objects in RED) and checks whether all columns listed in the “Required Columns” field are present in the RED repo tables. The “Required Columns” field contains a comma separated list of column-names.

Depending on whether the actual layers object has a dedicated repo-table or it is in the shared table, the script uses the SQL query from the snippets “ws-red-required-columns-dedicated-repo” or “ws-red-required-columns-normal-repo”.

These SQL queries cross join the respective object-definition with the required columns and left outer joins them to the actual columns in the column-repo-table of the object. By filtering only the ones that couldn’t be joined, it returns a list of missing columns.

Configuration

All configurations are done in the parameter list WhereScape RED Layers (ws-red-layers).

Table of Contents