Skip to content

import-validator

This command imports a validator JAR containing validator check implementations of custom rules into the dbLinter repository. The gen-java command can be used to create an initial Java Maven project. See dbLinter-Demo-Custom-Validator for an example.

This feature is only available with a Professional Subscription.

dblinter [<options>] import-validator [<args>]

See Options. Mandatory options are tenantName, userName and accessToken.

--<argument>=<value>

It is not possible to set arguments using environment variables. Beside that, in dbLinter, both arguments and options are treated in the same way. Therefore, they can be used in any order. For example, they can be used before or after the command name. We use options when the semantics are identical for each applicable command. Arguments are used when the semantics change for a command.

  • inputName
    This is the relative path to the JAR file that is to be imported. This argument is required. There is no default.

  • ownerName
    This is the name of the tenant who owns the validator. The default is the value of the tenantName option. This argument is applicable only when the access token has access permissions for multiple tenants.

  • parserVersion The IslandSQL parser version used to compile the validator. The default value is 0.23.1 for the CLI version 1.7.0. The parser is included in the language server, which will request the most compatible validators at runtime.

Terminal window
dbLinter import-validator \
--tenantName=Demo \
--userName=philipp.salvisberg+42@gmail.com \
--accessToken=*** \
--inputName=target/custom-validator-1.0.0-SNAPSHOT.jar \
--ownerName=Demo \
--parserVersion=0.23.1

The console output looks like this:

Importing validator ...
Validator imported successfully from target/custom-validator-1.0.0-SNAPSHOT.jar