I would like to propose some improvements to the configuration of the Scruid library. The improvements are backward compatible with the current implementation. The only difference is that we can override any configuration parameter by defining an implicit instance of ing.wbaa.druid.DruidConfig.
Consider, for example, the following code:
import java.time.ZonedDateTime
import ing.wbaa.druid._
import scala.concurrent.duration._
import ing.wbaa.druid.definitions._
implicit val druidConf = DruidConfig(
datasource = "some_different_datasource",
responseParsingTimeout = 10.seconds
)
case class TimeseriesCount(count: Int)
val response = TimeSeriesQuery(
aggregations = List(
CountAggregation(name = "count")
),
granularity = GranularityType.Week,
intervals = List("2011-06-01/2017-06-01")
).execute()
val series: Map[ZonedDateTime, TimeseriesCount] = response.series[TimeseriesCount]
The implicit configuration overrides the settings of application.conf or reference.conf. This can be practical for scala/ammonite scripts or notebooks, in which we would like to quickly set the settings inside the script/notebook.
Hi,
I would like to propose some improvements to the configuration of the Scruid library. The improvements are backward compatible with the current implementation. The only difference is that we can override any configuration parameter by defining an implicit instance of
ing.wbaa.druid.DruidConfig
.Consider, for example, the following code:
The implicit configuration overrides the settings of application.conf or reference.conf. This can be practical for scala/ammonite scripts or notebooks, in which we would like to quickly set the settings inside the script/notebook.