iweltag / quest4s   0.7.1

MIT License GitHub

REST client to connect with QuestDB based on Scala.

Scala versions: 2.13

quest4s

Quick Start

Detailed Documentation will follow soon.

val sttClientVersion = "3.9.0"
libraryDependencies += "de.iwelt" %% "quest4s" % "0.7.0"
libraryDependencies += "com.softwaremill.sttp.client3" %% "akka-http-backend" % sttClientVersion
libraryDependencies += "com.softwaremill.sttp.client3" %% "okhttp-backend"    % sttClientVersion
libraryDependencies += "com.softwaremill.sttp.client3" %% "pekko-http-backend" % sttClientVersion
lazy val questDbClient: QuestDbClient = QuestDbClient("http://localhost:9000", PekkoHttpBackend())

val file              = File("src/test/resources/import-test.csv")
questDbClient.importCsv(table, file)

val sqlQuery = s"Select * from YOUR_TABLE WHERE instrument = 'AAPL' and side = 'C';"
val exportedFile     = questDbClient.exportCsv(sqlQuery)

val executionResult = questDbClient.executeSql(sqlQuery)

Changelog

Testing

to run test locally you need to have docker installed and running

docker run --name questdb -p 9000:9000 -p 9009:9009 -p 8812:8812 -p 9003:9003  --detach questdb/questdb:latest;
sbt clean test;

Documentation

TBA