Redash Java SDK Setup - snowplow-archive/redash-java-sdk GitHub Wiki

This page refers to version 0.1.0+ of the Redash Java SDK.

Contents

1. Overview

The Redash Java SDK lets you manage your Redash servers programatically.

Ready? Let's get started.

Back to top

2. Integration options

2.1 Compatibility

The Redash Java SDK has been built and tested using JDK8 (JRE 1.8), so should work within any Java application built using JDK8 and upwards.

It has been tested with the following versions of Redash:

  • 3.0.0+b3134

Back to top

2.2 Dependencies

To minimize jar bloat, we have tried to keep external dependencies to a minimum. For the full list of dependencies, please see our Gradle build file.

Back to top

3. Setup

3.1 Hosting

The SDK is published to Snowplow's Bintray Maven repository, which should make it easy to add it as a dependency into your own Java app.

The current version of the Redash Java SDK is 0.1.0.

3.2 Maven

If you are using Maven for building your Java application, then add the following code into your HOME/.m2/settings.xml to be able to use this repository:

<?xml version="1.0" encoding="UTF-8" ?>
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
          xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
    
    <profiles>
        <profile>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-snowplow-snowplow-maven</id>
                    <name>bintray</name>
                    <url>https://snowplow.bintray.com/snowplow-maven</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-snowplow-snowplow-maven</id>
                    <name>bintray-plugins</name>
                    <url>https://snowplow.bintray.com/snowplow-maven</url>
                </pluginRepository>
            </pluginRepositories>
            <id>bintray</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>bintray</activeProfile>
    </activeProfiles>
</settings>

Then add into your project's pom.xml:

<dependency>
  <groupId>com.snowplowanalytics.redash</groupId>
  <artifactId>redash-java-sdk</artifactId>
  <version>0.1.0</version>
  <type>pom</type>
</dependency>

3.3 Gradle

If you are using Gradle in your own Java application, then add our Maven repository in your build.gradle file:

repositories {
    ...
    maven {
        url "https://snowplow.bintray.com/snowplow-maven"
    }
}

Then add into the same file:

dependencies {
    ...
    // Redash Java SDK
    compile 'com.snowplowanalytics.redash:redash-java-sdk:0.1.0'
}

3.4 SBT

The Redash Java SDK is also usable from Scala. Add this to your SBT config:

// Resolvers
val snowplowBintrayRepo = "Snowplow Bintray Repo" at "https://snowplow.bintray.com/snowplow-maven/"

// Dependency
val redashJavaSdk = "com.snowplowanalytics.redash"  % "redash-java-sdk"  % "0.1.0"

Done? Now read the Javadocs to start managing your Redash server.

⚠️ **GitHub.com Fallback** ⚠️