DuckDB Community Extension

Situational Awareness,
Powered by SQL

tak-cot-sender lets you build, serialize, and transmit Cursor-on-Target (CoT) messages to any TAK Server directly from DuckDB SQL — no middleware, no boilerplate.

24+
SQL functions & macros
3
Transport protocols
10+
Compatible data sources
SQL tak-cot-sender in 5 lines
-- Load extension once
LOAD 'tak_cot_sender';

-- Configure & connect
SELECT tak_configure('tak.example.mil', 8089, 'tcp+tls');
SELECT tak_connect();

-- Send CoT from any SQL query
SELECT tak_send(
  cot_event(
    uid, cot_type('a','f','G-U-C'),
    lat, lon, altitude,
    9999999, 9999999,
    now(), now(), now() + INTERVAL '5 min'
  )
)
FROM units_table;

Capabilities

Everything you need for TAK integration

Six focused functional areas — from event construction to GIS translation — all expressed as composable SQL functions.

📐

CoT Event Construction

Build standards-compliant CoT events from SQL values. cot_event(), cot_type(), and cot_detail() handle all field validation including coordinate bounds and timestamp ordering.

📄

XML & Protobuf Serialization

Output to CoT base-schema XML or TAK-framed Protocol Buffers. Switch formats with a single call to tak_set_format() — no code changes needed.

🔒

mTLS / TLS Security

Connect over plain TCP, one-way TLS, or mutual TLS using PEM certificates stored in DuckDB. Full OpenSSL 3.x integration with detailed certificate error reporting.

Batch Transmission

tak_send_batch() sends arrays of CoT events in a single call, with per-row status and error reporting. Errors on individual rows never abort the rest of the batch.

🗺️

GIS / Geospatial Translation

Convert DuckDB GEOMETRY values — points, lines, polygons — directly to CoT events. Works seamlessly with the DuckDB spatial extension and duckdb_featureserv.

📋

Runtime Logging

An in-memory ring-buffer of up to 10,000 entries surfaces every send, error, and connection event through tak_log() — no external log viewer needed.


Architecture

SQL → CoT → TAK

tak-cot-sender is the last mile in your data pipeline. Pair it with any DuckDB data source — live APIs, files, databases, message queues — and your data reaches TAK clients in seconds.

📡 REST APIs
📂 Files / S3
🗄️ Databases
📻 Radio / MQTT
Data Sources
🦆 DuckDB SQL
SELECT, JOIN,
TRANSFORM
Query Engine
tak-cot-sender
cot_event()
tak_send()
This Extension
🌐 WebTAK
💻 WinTAK
📱 ATAK / iTAK
🖥️ TAK Server
TAK Clients

Extensible Ecosystem

Connect any data source

Real-time ingestion is out of scope by design — users configure it via existing DuckDB community extensions. This lets you pull data from virtually anywhere without changing your CoT pipeline.

Community extensions that pair naturally

SQL 30-second polling pipeline
-- Poll a REST API every 30s → forward to TAK
SELECT cronjob_create(
  'feed_tak', '*/30 * * * * *',
  $$
  SELECT tak_send(
    cot_event(
      device_id,
      cot_type('a','f','G-U-C'),
      latitude, longitude, altitude,
      9999999, 9999999,
      now(), now(),
      now() + INTERVAL '5 min'
    )
  )
  FROM read_json_auto(
    'https://api.example.mil/units'
  );
  $$
);

Installation

Get started in minutes

Build from source using CMake and vcpkg on Windows, Linux, or macOS. The extension links against OpenSSL 3.x for TLS and ships with full SQL smoke test coverage out of the box.

PowerShell Windows quick-start
# 1. Clone with submodules
git clone --recurse-submodules <repo-url>

# 2. Bootstrap vcpkg
.\vcpkg\bootstrap-vcpkg.bat

# 3. Configure
cmake -S . -B build/release -G "Visual Studio 18 2026" -A x64

# 4. Build
cmake --build build/release --config Release --target tak_cot_sender_loadable_extension
Full Installation Guide →

Ready to deploy?

Your data belongs on the common operating picture

From a single location ping to a full GIS feature layer, tak-cot-sender makes it a SQL query. Read the docs, watch the promo deck, or tune in to the podcast to learn more.

Get Started SQL Reference 🎙️ Podcast
🎯 TAK Clients Supported

ATAK · WinTAK · iTAK · WebTAK · any CoT-compatible endpoint

🔐 Security-First

TCP · TCP+TLS · mTLS with X.509 client certificates via OpenSSL 3.x

📡 Wire Formats

CoT XML (all clients) · TAK Protocol Buffers (ATAK/WinTAK) · automatic per-session format selection