Runner
The runner is a small program that provides the bridge between DataConformance and your database. It receives instructions to run certain assertions and reports the results back.
Configuration
Only three configuration parameters are required. They are RunnerKey, DatabaseType and ConnectionString.
RunnerKey
The RunnerKey identifies and authenticates the runner against the API. It must be kept secret and not shared.
To get it:
- Click on Runners in the top navigation
- Click on your runner
- In form section RunnerKey click on the Show button
- Copy the shown key
If your runner key ever gets accidentally shared, click on the Rotate button in the same UI to invalidate the old and generate a new one.
DatabaseType and ConnectionString
The DatabaseType and ConnectionString parameters define which database driver is used and how to connect to the database. The required values are dependent on the database used.
PostgreSQL
To use PostgreSQL as your database of choice you set DatabaseType to the value postgres
.
The ConnectionString has to filled according to Npgsql Connection String Parameters.
For a local database with username and password authentication it may look like Host=localhost;Username=application;Password=pass123;Database=blog
.
Other databases
Support for other databases is coming soon. Contact support@dataconformance.com for info on when your database of choice will be supported.
Using the Docker image
The runner is available as a Docker container image from the official Docker Hub.
Warning
If you try to access a database running on localhost use one of the workarounds describe in this StackOverflow answer.
The simplest way to run it is by providing the configuration parameters as command line parameters:
Alternatively they can also be provided as environment variables. See the docker run reference for more details.
Both techniques can be mixed-and-matched.
Note
The --pull=always
is required to ensure you are using the latest runner version.
Without it your possibly outdated local version will be used indefinetly and you won't be able to use the newest features and fixes.