Compliance Query Command
This page is for running MettleCI ASSET QUERIES. If you're looking for the Compliance Results typically returned by MettleCI Workbench then please see the Compliance Test Command.
Purpose
The command line implementation of the Compliance Query functionality exposes the low-level mechanism to produce a report listing the results of the specified Asset Queries.
Syntax
Syntax : compliance query [options]
Description
-queries
location of all the query files
Required
-include-tags
Tags of asset queries to include (case insensitive), use ‘*’ to include all tags
-exclude-tags
Tags of asset queries rules to exclude (case insensitive)
-assets
location of all ISX assets to query
Required
-report
report name (.csv)
Required
-threads
number of threads of execution
Example
This example demonstrates how to export a set of ISX files and run Asset Queries 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 isx export ^
-domain myteam-svcs.corp.com:59445 ^
-username myuser -password mypassword ^
-server myteam-engn.corp.com ^
-project myproject ^
-jobname .*LD_S.*
Exporting [.*LD_S.*] from repository...
Exporting DataStage assets...
* Export 'test2-engn.datamigrators.io/myproject/Jobs/Load/LD_SUPPLIER.pjb' - COMPLETED
* Export 'test2-engn.datamigrators.io/myproject/Jobs/Load/LD_STOCK_HOLDING.pjb' - COMPLETED
* Export 'test2-engn.datamigrators.io/myproject/Jobs/Load/LD_STOCKITEM.pjb' - COMPLETED
* Export 'test2-engn.datamigrators.io/myproject/Jobs/Load/LD_SALE.pjb' - COMPLETED
Export complete
# ================================================================
# Run the specified asset queries against the exported ISX assets
# ================================================================
C:\> mettleci compliance query \
-assets ./Jobs \
-queries ./Queries \
-report compliance.csv \
MettleCI Command Line (build 122)
(C) 2018-2020 Data Migrators Pty Ltd
<SNIP>
# Done!
C:\>