Query data objectgs
Query data objects in Cloneable by using plain SQL
Writing SQL Queries in Cloneable
This guide explains how to write SQL queries to search and filter your data objects in Cloneable.
The Basics
Your data in Cloneable is stored in two main tables:
data_objects: Contains your objectsdata_object_fields: Contains the field values for those objects
Writing Simple Queries
Structure of a Basic Query
SELECT do.*
FROM data_objects do
WHERE condition;Using Dynamic Inputs
Use the @ symbol to create placeholders that you can fill in later:
SELECT do.*
FROM data_objects do
WHERE do.createdAt > @my_date;Common Examples
1. Find Objects Created After a Specific Date
2. Find Objects Based on a Field Value
3. Find Objects with Specific Status
Important Naming Rules
Dynamic Input Names:
Use lowercase letters and underscores:
@my_input,@temperature_minKeep names short but descriptive:
@start_date,@min_valueExamples:
Good:
@min_temp,@start_dateBad:
@MinTemp,@START_DATE
Field Names:
Must match exactly what's in your object template
Case sensitive
Examples:
If your field is named "temperature", use
"temperature"(not "Temperature")If your field is named "transitTime", use
"transitTime"(not "transit_time")
Tips for Success
Test your queries with simple conditions first
Double-check field names - they must match exactly
Remember to wrap text values in quotes
Use descriptive names for your dynamic inputs with the @ symbol
Examples of Complete Queries
Find High-Value Items
Find Recent Active Items
Find Items by Location
Last updated

