Hi Mohammed-Zaib,
I would suggest using QueryClient in the case of Scala. The approach you took is more suited/specialized to groovy
Here is a code snippet to use for inspiration,
package playground
import com.artisol.teneo.inquire.clientapi.QueryClient
import java.util
object helloFresh extends App {
val backendUrl: String = "https://domain.data.teneo.ai/teneo-inquire-query/rest"
var clientParameters: util.HashMap[String, Object] = new util.HashMap[String, Object]()
clientParameters.put("timeout", 1000.asInstanceOf[AnyRef])
clientParameters.put("esPageSize", 10.asInstanceOf[AnyRef])
val clientApi: QueryClient = QueryClient.create(backendUrl)
val user: String = "user"
val pass: String = "pass"
clientApi.login(user, pass)
val lds: String = ""
val tql: String = "some_tql_query"
val result = clientApi.executeQuery(lds, tql, clientParameters)
}
Please let me know if you have any other thoughts or questions.
Warm regards,