← Reports Academy

Build the solution · 1 / 5

Export a useful job list

Give production staff a stable CSV of job names and statuses.

YOUR TASK

Make this happen

2 steps
  1. Build a jobs CSV output with name and status columns, connected to the jobs source.

  2. Check the complete solution, then inspect any unmet requirements.

Read the starter files

main.cococo

report_document "weekly" {
  # TODO: add schemaVersion — see the task above.
  # TODO: add snapshotRetentionDays — see the task above.
  # TODO: add sources — see the task above.
  # TODO: add outputs — see the task above.
}

source.cococo

report_source "jobs" {
  name = "jobs"
  kind = "MICRO_SQL"
  query = "SELECT jobs.name, jobs.status FROM jobs ORDER BY jobs.name ASC LIMIT 100"
}

outputs.cococo

report_output "csv" {
  name = "jobs.csv"
  format = "CSV"
  storage = "DATABASE"
}

Reference: reports · getting-startedreports · sql-authoringreports · valuesreports · preparationreports · pdf-templatesreports · operationsreports · reference