Conntest is a command-line utility for validating connections to Snowplow-supported destinations.
To check your database connection, run:
conntest check --dsn your://database/uri --retry-times 0 --tags 'aTag=value;anotherTag=value'For Snowflake (success):-
conntest check --dsn snowflake://username:[email protected]/database --tags 'aTag=value'
{"id":"be863f45-9d16-4271-94f1-c019df7d8d49","name":"fabric:warehouse-connection-check","version":1,"emittedBy":"conntest","timestamp":"2024-04-08T11:50:05.816247+01:00","data":{"host":"snowplow.snowflakecomputing.com","complete":true,"messages":[],"tags":{"aTag":"value"},"attempts":1}}For Snowflake (failure):-
conntest check --dsn snowflake://lorem:[email protected]/lorem --tags 'aTag=value'
{"id":"9ef56c9b-8f30-4ef3-8e6a-0b063e938ce4","name":"fabric:warehouse-connection-check","version":1,"emittedBy":"conntest","timestamp":"2024-04-08T11:45:38.086054+01:00","data":{"host":"abcdefg-ab01234.snowflakecomputing.com","complete":false,"messages":["260008 (08004): failed to connect to db. verify account name is correct. HTTP: 403, URL: https://abcdefg-ab01234.snowflakecomputing.com:443/session/v1/login-request?databaseName=lorem\u0026requestId=227cfd45-7335-44e1-6495-bfc57a0ca842\u0026request_guid=5b8b3eff-ee45-4c48-7498-e6b2ba707082"],"tags":{"aTag":"value"},"attempts":1}}For BigQuery (success):-
conntest check --dsn bigquery://:@engineering-sandbox/testantonis_derived --retry-times 0 --tags 'aTag=value;anotherTag=value'
{"id":"8be8275c-1aa4-4907-8e28-c027dbe58ad7","name":"fabric:warehouse-connection-check","version":1,"emittedBy":"conntest","timestamp":"2024-04-08T11:36:50.593231+01:00","data":{"host":"engineering-sandbox","complete":true,"messages":[],"tags":{"aTag":"value","anotherTag":"value"},"attempts":0}}For BigQuery (failure):-
conntest check --dsn bigquery://:@engineering-sandbox/testantonis_invalid --retry-times 0 --tags 'aTag=value;anotherTag=value'
{"id":"e50cea6f-adc1-4399-af88-9e6d439f5f16","name":"fabric:warehouse-connection-check","version":1,"emittedBy":"conntest","timestamp":"2024-04-08T11:38:22.039055+01:00","data":{"host":"engineering-sandbox","complete":false,"messages":["googleapi: Error 404: Not found: Dataset engineering-sandbox:testantonis_invalid, notFound"],"tags":{"aTag":"value","anotherTag":"value"},"attempts":0}}- Go 1.24+
- Docker (for integration tests)
- Make
Assuming git, Go, and Make are installed:
host> git clone https://github.com/snowplow-devops/conntest
host> cd conntest
host> make test
host> make build# Build for local development
make build
# Build all cross-platform binaries
make all
# Build specific platforms
make cli-linux-amd64
make cli-linux-arm64
make cli-darwin-amd64
make cli-darwin-arm64# Run unit tests with coverage
make test
# Run integration tests
make integration-test# Format code
make format
# Lint code
make lint
# Tidy Go modules
make tidy
# Update dependencies
make update# Remove build artifacts
make cleanAll compiled assets are available under build/compiled.
Note: Always run make format before submitting any code.
Note: The make test command generates a code coverage file which can be found at build/coverage/coverage.html.
Conntest is copyright 2022-2025 Snowplow Analytics Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.