Back to Testcontainers Java

Trino Module

docs/modules/databases/trino.md

2.0.51.4 KB
Original Source

Trino Module

Testcontainers module for Trino

Usage example

You can start a Trino container instance from any Java application by using:

<!--codeinclude-->

Container creation inside_block:container

<!--/codeinclude-->

See Database containers for documentation and usage that is common to all database container types.

Testcontainers JDBC URL

jdbc:tc:trino:352:///defaultname

See JDBC for documentation.

Adding this module to your project dependencies

Add the following dependency to your pom.xml/build.gradle file:

=== "Gradle" groovy testImplementation "org.testcontainers:testcontainers-trino:{{latest_version}}"

=== "Maven" xml <dependency> <groupId>org.testcontainers</groupId> <artifactId>testcontainers-trino</artifactId> <version>{{latest_version}}</version> <scope>test</scope> </dependency>

!!! hint Adding this Testcontainers library JAR will not automatically add the Trino JDBC driver JAR to your project. You should ensure that your project has the Trino JDBC driver as a dependency, if you plan on using it. Refer to Trino project download page for instructions.