0

I have a query for big query native table, currently I'm able to run and get the data and write to sync, but I need to run the same query periodically and fetch the results. My implementation looks something like this:

val sqlQuery = s"SELECT name, addresses FROM $datasetId.$tableId WHERE age >= 100"
val centenarians: Source[(String, Seq[Address]), Future[QueryResponse[(String, Seq[Address])]]] =
  BigQuery.query[(String, Seq[Address])](sqlQuery, useLegacySql = false)
Mathivanan
  • 371
  • 2
  • 16
  • There are a great many ways to do this, with different tradeoffs. What are the expectations (e.g. should the period start from when the previous query completes or when it starts (and if the latter, is it OK to start a second query before the first query completes?))? – Levi Ramsey Nov 06 '22 at 13:18
  • @LeviRamsey - I would like to query the data at fixed intervals like once in every hour. – Mathivanan Nov 06 '22 at 14:43

0 Answers0