Breadcrumbs

Compliance Rules Reference

This page summarises the Compliance Rules currently shipping with MettleCI. Each Compliance Rule file has a .grm extension, referring to the Gremlin language in which it is written. The three-letter sub-extension before .grm refers to the type of DataStage asset to which the rule can be applied:

Compliance Rule Extension

Asset Type

.pjb.grm

Parallel job

.qjb.grm

Sequence job

.sjb.grm

Server job

.psc.grm

Parallel shared container

.ssc.grm

Server shared container

You can read more about the MettleCI compliance commands here.

The current set of sample Compliance Rules are detailed below:

Compliance Rule

Parallel Job

Server Job

Job Sequence

Description

(v2.0) Adjacent Transformers

Yes

Yes

-

Identified job designs with adjacent Transformer stages.

(v2.0) Aggregator Not Preceded by ‘Check’ Sort

Yes

-

-

Identifies Parallel Aggregator Stages not preceded by a ‘Check’ Sort Stage.

(v2.0) Audit Annotation

Yes

Yes

Yes

Identifies where sensitive information may potentially be present in DataStage Job and Sequence Annotations

(v2.0) CCMigrateTool Stages

Yes

Yes

-

Identifies the use of deprecated stages in Parallel Jobs and suggests an alternative

(v2.0) Column Name Contains Unsupported Characters

-

Yes

-

Identifies stage columns with names using characters not supported by the Parallel Engine.

(v2.0) CP4D Unsupported Stages

Yes

Yes

-

Identifies stages that are not yet supported by IBM Cloud Pak for Data

(v2.0) Custom Stages

Yes

Yes

-

This rule detects the use of Custom stages in Parallel Jobs

(v2.0) Data Sets not using 'Same' partitioning method

Yes

-

-

Identifies Data Sets not using the 'Same' partitioning method

(v2.0) Database Connector does not Auto-Generate SQL

Yes

Yes

-

Ensures a Database Connector uses Auto Generated SQL

(v2.0) Database Row Limit

Yes

Yes

Yes

Identifies Connectors Stages with a configured Database Row Limit

(v2.0) Database tables references are fully qualified

Yes

Yes

-

Identifies where database table references are fully-qualified

(v2.0) DataStage Flow Designer Stages

Yes

Yes

-

Lists the stages that are not yet supported by IBM Data Flow Designer

(v2.0) Date Format in Annotation

Yes

Yes

Yes

Identify whether the a ‘Job Description’ annotation contains instances of particular arbitrary text. This example rule looks for dates.

(v2.0) DB2 with No Non Recovery Load

Yes

Yes

-

Identify Db2 Stages using bulk load with Non Recovery Load set to No

(v2.0) DBConnector Supported Variants

Yes

Yes

-

Ensures that all Database Connectors and Stages must use valid variants

(v2.0) Debug Row Limit

Yes

-

-

Identifies row limits in debug stages (Peek, Sample, Tail)

(v2.0) Default Naming

Yes

Yes

Yes

Default Stage Names for Parallel Jobs, Server Jobs, and Job Sequences

(v2.0) Deprecated Stages

Yes

Yes

-

Identify deprecated stages and suggests the recommended alternative

(v2.0) Deprecated Transformer Functions

Yes

Yes

-

Identifies calls to deprecated functions in the Transformer Stage code generated by DataStage

(v2.0) Duplicate File References

Yes

Yes

-

Verifies that a file is only referenced once in a DataStage job (Sequential File, Complex Flat File and DataSet)

(v2.0) Duplicate Stage Names

Yes

Yes

-

Detect duplicate Stage names in a job

(v2.0) Encrypted DB Passwords

Yes

Yes

-

Ensures that all Connectors and Stages must use encrypted Passwords

(v2.0) File Reference Missing Required Parameter

Yes

Yes

-

Ensures that all File Stages must use variables for determining paths

(v2.0) File Row Limit

Yes

Yes

-

Identifies row limits in file-based stages (Sequential File, Complex Flat File)

(v2.0) Hardcoded DB Credentials

Yes

Yes

-

Ensures that all Database Connectors and Stages must use variables for location and credentials

(v2.0) Hardcoded File Paths

Yes

Yes

-

Ensures that all File Stages must use variables for determining paths

(v2.0) Job Using Custom Function

Yes

Yes

-

Here

(v2.0) Jobs With Before and After Routine

Yes

Yes

-

Here

(v2.0) DataStage SaaS Unsupported Stages

Yes

-

-

Detects the stages in Parallel Jobs that are not currently support by DataStage Saas

(v2.0) Asset using Java Integration Stage

Yes

-

-

Identifies the use of the Java Integration Stage which is not supported by DataStage SaaS.

(v2.0) Job Activity References Deleted Child Parameter

-

-

Yes

Identify Sequence Job activities with references to non-existent parameters.

(v2.0) Job Activity with Hardcoded Parameter Values

-

-

Yes

Sequence Job with Hardcoded Parameter Values

(v2.0) Job Control Routines are present

Yes

Yes

-

Identifies Jobs with Job Control Routines defined

(v2.0) Job Does Not Contain DM Unit Test Parameter

Yes

Yes

Yes

Identifies Jobs or Sequences where the MettleCI Unit Testing parameter is not present

(v2.0) Job Naming

Yes

Yes

Yes

Checks the job name against a blocklist of known bad names (e.g. CopyOf*)

(v2.0) Job Parameter Missing Default Value

Yes

Yes

Yes

Identify Job parameters within a default value

(v2.0) Job Parameter Naming

Yes

Yes

Yes

Identifies where naming standards for Job Parameters and Parameter Sets are breached

(v2.0) Job Parameter Not in a Parameter Set

Yes

Yes

Yes

Identifies Job parameters which are not members of a parameter sets

(v2.0) Job Parameter Not Used in a Job

Yes

-

-

Identifies Job parameters which are not used within the job.

(v2.0) Job Sequence Handles Activities That Fail

-

-

Yes

Verifies that a job sequence automatically handles failed activities

(v2.0) Job Sequence Is Restartable

-

-

Yes

Identifies Job Sequences that are not restartable

(v2.0) Job Using ODBC Connector

Yes

-

-

Identifies job using an ODBC connector

(v2.0) Job Using Transformer Surrogate Key

Yes

-

-

Recommends considering replacing a Transformer Stage using a Surrogate Key with a Surrogate Key Generator stage.

(v2.0) Join Partition vs Join Key

Yes

-

-

Identifies Join stages where the join key does not match the partitioning key

(v2.0) Link Sort

Yes

-

-

Identifies link sorts

(v2.0) Log Column Values

Yes

Yes

-

Identify Stages configured to Log column values on first row error

(v2.0) Lookup Failure

Yes

-

-

Identifies Lookup Stages with Lookup set to Fail

(v2.0) One Dataflow

Yes

Yes

-

Verifies that there is only one data flow in a DataStage job

(v2.0) Oracle Connector not using Partition Read

Yes

-

-

Identify Oracle Stages not configured to use partitioned reads

(v2.0) Transformer Uses 'Abort after rows'

Yes

-

-

Detect an 'Abort after rows' greater than 0 setting in a Parallel Transformer.

(v2.0) Transformer Uses 'Rnd()' Function

Yes

-

-

Identify the use of a Rnd() function in Parallel Transformers.

(v2.0) Password Param Type not Encrypted

Yes

Yes

-

Identify unencrypted Job parameters used for storing passwords

(v2.0) Prohibited Stages

Yes

Yes

-

Verifies that a job does not contain one or more prohibited stages

(v2.0) Range Lookup

Yes

-

-

Checks that range lookups are correctly configured

(v2.0) Redundant Sort

Yes

Yes

-

Identifies redundant sorts within a job

(v2.0) Row Splitter with No Delimiter

Yes

-

Identifies Row Splitter Stage with output format delimited but no delimiter specified

(v2.0) Schema Files

Yes

-

-

Detect the use of Schema Files

(v2.0) SELECT * used in custom SQL

Yes

Yes

-

Identifies Connector Stages using customer SQL employing a ‘SELECT *’ clause

(v2.0) Sequence Reset If Required

-

-

Yes

Identifies where a Job Activity Execution Action is not Reset if required, then run

(v2.0) Sequential File Read Using Same Partitioning

Yes

-

-

Avoid Reading from Sequential Files Using the Same Partitioning Method

(v2.0) Sequential File With Reject Mode Not Set To Fail

Yes

-

-

Identifies Sequential Files with a Reject Mode not set to fail

(v2.0) Sort Post Join Stage

Yes

Yes

-

Identifies potentially redundant sorting (a sort stage or link sort) situated immediately after a Join stage

(v2.0) SQL in DB Connectors

Yes

Yes

-

Identify the use of hardcoded SQL in Database Connectors or Enterprise Database Stages.

(v2.0) Stage Naming

Yes

Yes

Yes

Stage Naming Standards for Parallel and Server Jobs and Job Sequences

(v2.0) Stages Not Supporting Lineage

Yes

Yes

-

This rule detects the use of stages in Parallel Jobs that don't support automatic lineage

(v2.0) System Time Dependency

Yes

-

-

Identifies the use of system time in the job

(v2.0) Too Many Stages

Yes

Yes

-

Identifies whether a Job has too many Stages

(v2.0) Transformer With Unreferenced Stage Variable

Yes

Yes

-

Identifies Transformer Stage with an unreferenced Stage Variable (including Loop Variables)

(v2.0) Unique Sort

Yes

Yes

-

Identifies unique sorts

(v2.0) Using DB2 Sequence to Generate Surrogate Key

Yes

Yes

-

Identifies where a Db2 Sequence is used to provide a surrogate key value.