Required timestamps in queries
Liberator enforces a time-based predicate on all queries. Every query must include a valid, non-zero date or time range. Queries without one return an error and no data. Previously, a query with no time parameters could return an entire dataset. That behavior was removed to prevent unexpectedly large result sets and unnecessary load. Applies to Liberator 2.1 and later.Valid timestamps
A valid time scope must:- Cover a specific date, date range, or datetime range — not zero, null, or empty.
- Use
back_toandas_offor parameter-based queries (Liberator’s point-in-time window). See Understanding as_of and back_to. - Fall within the dataset’s available coverage (valid dates outside coverage return an empty result, not a timestamp error).
Correct examples
Incorrect examples
Raw sql queries
Every SELECT must include an explicit WHERE clause with a time-range predicate on muts or another configured time column. See Query parameters — Raw SQL.
What the error looks like
The API or client returns an error indicating a time-based predicate is required. This is expected enforcement, not a platform failure.Update existing queries
- Find affected calls — Search for
liberator.query()withoutback_to/as_of, or rawsqlwithout a timeWHERE. - Choose the right window — Daily jobs: parameterize to yesterday or today. Historical pulls: set explicit start and end dates.
- Add parameters — Use the examples above.
- Test — Run manually before re-enabling schedules.
FAQ
I used to pull a full dataset for reference. What now?Set
back_to and as_of to the dataset’s available range (ask your administrator or check dataset details in the admin portal).
Error but I provided dates?Confirm values are not null/empty,
back_to is not after as_of, and dates use YYYY-MM-DD or YYYY-MM-DD HH:MM:SS.
Valid dates but empty results?The timestamp is accepted; the range may fall outside dataset coverage. AI assistant queries?
Assistants must specify a time range. Timeless requests should prompt for dates; otherwise the query fails like any other.
Related
as_of and back_to
Point-in-time semantics for Liberator datasets
Query parameters
Full parameter reference including raw SQL rules

