This is a sample Java project demonstrating the use of Java with the Kotlin Looker SDK. This particular project uses Maven for building and running a very simple Java class.
See Looker documentation on how to create these.
Currently Looker does not publish the Kotlin Looker SDK jar so you need to do the following steps and copy the resultant jar into the lib
folder of this project. Build the Kotlin Looker SDK jar as follows
- clone this repo.
cd {repolocation}/kotlin
./gradlew jar
- copy
./build/libs/looker-kotlin-sdk.jar
to thelib
directory of this project.
Once the looker-kotlin-sdk.jar
has been copied into this project, you can run the example class.
- cd to the root of this example project.
- Create a
.env
in the root of this project. A sample .env_sample file is provided. You will need to populate the .env file with the Looker client id and secret obtained earlier. ./mvnw compile
./mvnw exec:java
The run should print out:
User name is {user name associated with Looker client id}
Note the example uses a .env
file to configure the SDK. The example class copies these values into java system properties. The Looker INI file is also supported but an example is not provided. Please see the SDK Kotlin tests for examples of using the Looker INI.