Query Your Dataset with SQL
Every Coactive dataset comes with SQL tables you can query to understand what’s in it. Use the queries on this page to check your dataset’s size, confirm a video was ingested, and see which videos have ad segments.
To run a query, open Queries in the app, select your dataset, paste the query, and run it.
New to SQL on Coactive? Start with Query Engine, which covers SHOW TABLES and DESCRIBE.
Available tables can vary by dataset, so if a query returns TABLE_OR_VIEW_NOT_FOUND, run SHOW TABLES to see what yours has.
Get your dataset size
Video count and total minutes
The SQL tables don’t store each video’s total runtime, so this query estimates it from the timestamp of the video’s last keyframe. A keyframe’s timestamp marks where that moment starts, so any footage after the last keyframe isn’t counted, and totals may run slightly under the runtime.
Video count only
Image count
Check whether a video was ingested
For live ingestion status and error codes, use Ingestion Observability: open your dataset and click View ingestions.
Use SQL to check specific files by path, or to look back further than the rolling 30 days of status Ingestion Observability keeps.
Look up videos by file path
See your most recently ingested videos
Count videos ingested in a date range
Find ad segments
Ad segments are used by segment-level packages in Context Studio. You add them with the Create ad segments API, and they’re stored in coactive_table_composite as rows where type = 'ad-segment'. Segment-level packages skip videos that have no ad segments.
