For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get Started
Docs & GuidesAPI Reference
Docs & GuidesAPI Reference
  • Introduction
    • Overview
    • Why Coactive
    • Release Notes
  • Getting started
    • Accepted Media Formats
    • Cloud Storage Access (Beta)
  • Administration
    • User Roles (RBAC)
    • Ingestion Observability (Beta)
  • Core Features
    • Agentic Search
    • Intelligent Search
    • Concepts
    • Query Engine
  • Experimental
  • Deep Dives
    • Analyzing Concepts with SQL
    • Analyzing Dynamic Tags with SQL
    • The Power of Visual Data
    • Metadata Generation for Videos
    • Programmatically Retrieve SQL results
Get Started
LogoLogo
On this page
  • Getting Started with SQL on the Platform
  • Open the SQL platform
  • Display available tables
  • Retrieve Column Names from a Table
  • Understand Data Volume
Core Features

Query Engine

Was this page helpful?
Edit this page
Previous

Overview

Next
Built with

Getting Started with SQL on the Platform

Coactive enhances Visual Analytics with a SQL interface designed to interact with your visual data, enabling users to perform advanced queries on dynamic tags, concepts, and visual metadata.

This document explains the SQL interface used to query various tables within the Coactive platform. By the end of this guide, your team will be able to leverage Coactive’s SQL capabilities to perform advanced analytics and unlock deeper insights into your visual data.

Open the SQL platform

  1. Navigate to the Queries section from the platform;
  2. Select the Dataset you want to query and the embedding will automatically be selected.

Overview of the Coactive query engine

Display available tables

The first step when working with SQL is identifying which tables are available in the platform.

1SHOW TABLES;

This will list all the tables accessible within your dataset, helping you identify the data resources you can work with.

Overview of the Coactive query engine

Retrieve Column Names from a Table

To understand the structure of a specific table, use the DESCRIBE statement.

1DESCRIBE coactive_table;

This query will return all column names and their data types. For example, in coactive_table, you’ll find columns such as coactive_image_id, keyframe_index, path, concept columns, etc.

Understand Data Volume

To measure the size of your dataset and estimate query performance, you can count the total number of rows in a table. For larger datasets, it’s often helpful to use a Common Table Expression (CTE) to structure your queries:

1WITH row_count AS (
2 SELECT COUNT(*) AS total_rows
3 FROM coactive_table
4)
5SELECT
6 total_rows,
7 CONCAT('This table contains ', total_rows, ' rows.') AS summary
8FROM row_count;
  • WITH row_count AS: Creates a temporary table to store the total row count for better readability.
  • CONCAT: Constructs a human-readable summary to provide clarity on the data volume.

Expected Output:

Overview of the Coactive query engine