Document toolboxDocument toolbox

Compliance Test Command

This page is for running MettleCI COMPLIANCE RULES.  If you're looking for the Asset Queries typically used in a MettleCI Report Card then please see the Compliance Query Command.

The ‘tags’ feature documented on this page is available in MettleCI releases greater than v1.1

Purpose

The command line implementation of the Compliance Test functionality enables the production of a Compliance Results report of the specified assets against the specified set of MettleCI Compliance Rules.

For more information on using the -project-cache parameter see our detailed explanation.

Syntax

Example

This example demonstrates how to export a set of ISX files and run Compliance against them. Note that asset paths specification in the export command uses the same wildcard rules as the istool command.

# ============================== # Export the required ISX assets # ============================== C:\MettleCI\cli\> mettleci isx export ^ -domain myteam-svcs.corp.com:59445 ^ -username myuser -password mypassword ^ -server myteam-engn.corp.com ^ -project myproject ^ -location C:\shared\myproject\export ^ -include-binaries ^ -project-cache C:\shared\myproject\cache Analyzing test2-engn.datamigrators.io/myproject Attempting to identify changes with 4 working threads. Inspecting DataStage assets for changes... <SNIP> Change identification complete Inspecting ParameterSet definition changes... ParameterSet definition change identification complete Deleting assets... <SNIP> Deletion complete Exporting DataStage assets... <SNIP> Export complete Attempting to identify last change with 4 working threads. Inspecting DataStage assets for last change... <SNIP> Last change identification complete # ================================================================== # Run the specified compliance rules against the exported ISX assets # ================================================================== $> mettleci compliance test -rules compliance_rules -assets datastage -report compliance_report_warn.xml -junit -project-cache ./project-cache -test-suite warnings -ignore-test-failures -include-job-in-test-name MettleCI Command Line (build 122) (C) 2018-2020 Data Migrators Pty Ltd rules configuration discovered new rule discovered - 'Adjacent Transformers' (PARALLEL_JOB) new rule discovered - 'CCMigrateTool Stages' (PARALLEL_JOB) new rule discovered - 'CCMigrateTool Stages' (SERVER_JOB) new rule discovered - 'Database Row Limit' (PARALLEL_JOB) new rule discovered - 'Database Row Limit' (SERVER_JOB) new rule discovered - 'Debug Row Limit' (PARALLEL_JOB) <SNIP> new rule discovered - 'One Dataflow' (SERVER_JOB) new rule discovered - 'Range Lookup' (PARALLEL_JOB) new rule discovered - 'Too Many Stages' (PARALLEL_JOB) new rule discovered - 'Too Many Stages' (SERVER_JOB) new rule discovered - 'Unique Sort' (PARALLEL_JOB) [1/3] TestJob_0921 (PARALLEL_JOB) [2/3] TestJob_0930 (PARALLEL_JOB) [3/3] TestJob (PARALLEL_JOB) # Done! $>


This example produces an output file compliance.csv in the current directory which looks like this (formatted here for clarity):

asset

assetType

test

duration

result

message

asset

assetType

test

duration

result

message

TestJob_0921

PARALLEL_JOB

Adjacent Transformers

0.046

Success

 

---< rows redacted for brevity >---

TestJob_0921

PARALLEL_JOB

Debug Row Limit

0.016

Success

 

TestJob_0921

PARALLEL_JOB

Default Naming

0.015

Failure

PxRowGenerator 'Row_Generator_0' uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
CTransformerStage 'Transformer_2' uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
Link DSLink3 uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
Link DSLink4 uses DataStage's default naming. Please provide a meaningful name meeting naming standards."

TestJob_0921

PARALLEL_JOB

Hardcoded File Paths

0.016

Success

 

---< rows redacted for brevity >---

TestJob_0930

PARALLEL_JOB

Debug Row Limit

0

Success

 

TestJob_0930

PARALLEL_JOB

Default Naming

0

Failure

PxRowGenerator 'Row_Generator_0' uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
CTransformerStage 'Transformer_2' uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
Link DSLink3 uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
Link DSLink4 uses DataStage's default naming. Please provide a meaningful name meeting naming standards."

TestJob_0930

PARALLEL_JOB

Hardcoded File Paths

0.016

Success

 

---< rows redacted for brevity >---

TestJob

PARALLEL_JOB

Debug Row Limit

0

Success

 

TestJob

PARALLEL_JOB

Default Naming

0

Failure

PxRowGenerator 'Row_Generator_0' uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
CTransformerStage 'Transformer_2' uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
Link DSLink3 uses DataStage's default naming. Please provide a meaningful name meeting naming standards.
Link DSLink4 uses DataStage's default naming. Please provide a meaningful name meeting naming standards."

TestJob

PARALLEL_JOB

Hardcoded File Paths

0

Success

 

---< rows redacted for brevity >---

TestJob

PARALLEL_JOB

Unique Sort

0

Success

 

See Also

© 2015-2024 Data Migrators Pty Ltd.