Setting Up Your Java and Scala Environment to Use the Telemetry Class

You can build and package handler code that uses the com.snowflake.telemetry.Telemetry class, then reference the handler on a stage. The Telemetry library is available through Maven and through an archive file that you can download from the Drivers and Libraries page in the Snowflake Developer site.

If you are using Maven to develop function or procedure handlers in Java or Scala, you can build a JAR file containing your code:

  1. In the pom.xml file for your project, add a dependency on the com.snowflake:telemetry package:

  2. Exclude the telemetry package from the JAR file that you build because it is already included in Snowflake.

    1. In the directory for your project, create a subdirectory named assembly/.

    2. In that directory, create an assembly descriptor file that specifies that you want to include dependencies in your JAR file.

      For an example, see jar-with-dependencies.

    3. In the assembly descriptor, add a <dependencySet> element that excludes the Snowpark library from your JAR file. For example:

      <assembly xmlns=""

      For information about the elements in an assembly descriptor, see Assembly Descriptor Format.

  3. In your pom.xml file, under the <project> » <build> » <plugins>, add a <plugin> element for the Maven Assembly Plugin.

    In addition, under <configuration> » <descriptors>, add a <descriptor> that points to the assembly descriptor file that you created in the previous steps.

    For example: