Skip to content

Generate an sqlite database with created elements

Depends on https://gitlab.com/arkindex/base-worker/-/issues/40

Structure of the table elements:

  • id
  • parent_id (nullable)
  • name
  • type
  • polygon (nullable)
  • worker_version_id (nullable)

Here is the API we should be able to run in create_elements:

cache = LocalDB("/data/TASK_ID/db.sqlite")
cache.create_table("elements")  # do nothing if table exists
cache.insert("elements", [
  (id, name, type, ...)
])
Edited by Bastien Abadie