LPQL vs SPL (Splunk query language)

7 min readUpdated June 29, 2026

If you know Splunk's SPL, LPQL will feel immediately familiar — that is by design. Both use the same pipe-based model: start with a search, then pipe results through commands like stats, eval and sort. The differences are under the hood: what engine runs the query, how broad the command set is, and how much the AI writes for you. This guide compares them.

The shared pipe model

Both languages read left to right: a search expression narrows the events, then each | pipe transforms the result. The mental model — filter, then shape, then aggregate, then sort/limit — is identical, which is what makes moving between them straightforward.

TaskSPL (Splunk)LPQL (LogPulse)
Filter by fieldsearch level=errorlevel=error
Time rangeearliest=-1hearliest=-1h
Count by field| stats count by host| stats count by host
Compute a field| eval dur=duration/1000| eval dur=duration/1000
Filter post-stats| where count > 100| where count > 100
Top values| top 10 host| top 10 host
Sort descending| sort -count| sort -count
Limit| head 20| head 20

LPQL also shares timechart, rare, dedup, table, fields, rename and rex, and a similar eval-function set (string, math, conditional, time, pattern).

Where they differ

  • Engine — LPQL compiles to optimised ClickHouse SQL (columnar speed, sub-200ms search); SPL runs on Splunk's proprietary engine.
  • Command breadth — SPL is older and vast, with hundreds of commands and deep ecosystem apps. LPQL focuses on a curated set (around two dozen pipe commands) that cover the everyday 80–90% of analysis.
  • Structured / JSON data — LPQL has first-class JSON-path navigation (a.b.c, a[k="v"].value) that maps naturally onto structured logs.
  • AI generation — in LogPulse you can ask in natural language and the AI Investigator writes and runs the LPQL for you, showing the query so you can verify.
  • Pricing model — the languages are free; the difference that usually drives migration is the platform economics underneath.

Migrating from SPL

Because the syntax overlaps so heavily, most everyday SPL searches translate to LPQL with little or no change — the filter-pipe-aggregate skeleton is the same. The work is mostly in the long tail of SPL-specific commands and macros that have no direct equivalent, where you reshape the query to the LPQL command set. Natural-language search lowers that cost further: you can describe the result and let the AI produce the LPQL.

Familiar on purpose

LPQL keeps the pipe-based syntax SPL users already know so teams are productive on day one, then adds ClickHouse speed and AI generation. This is an educational comparison — see the comparison overview for the platform-level picture.

LPQL in LogPulse

LPQL is the query language across LogPulse — search, detections, KPIs and MCP tools all build on it. You can write it directly, or use natural-language AI log search to generate it. See what is log management for where it fits, and the LPQL syntax reference for the full command set.

Frequently asked questions

Is LPQL like SPL?
Yes. LPQL uses the same pipe-based model as Splunk’s SPL: a search expression narrows events, then results are piped through commands like stats, eval, where, top, sort and head. The everyday syntax is nearly identical, which makes moving between them easy.
Can I migrate Splunk SPL queries to LPQL?
Most everyday SPL searches translate to LPQL with little or no change because the filter-pipe-aggregate skeleton is the same. The work is in the long tail of SPL-specific commands and macros with no direct equivalent. Natural-language search lowers that cost further by generating the LPQL for you.
What is different between LPQL and SPL?
LPQL compiles to optimised ClickHouse SQL for columnar speed, focuses on a curated set of around two dozen pipe commands (versus SPL’s vast command set), has first-class JSON-path navigation for structured logs, and can be generated from natural language by the AI Investigator.
Does LPQL support stats and eval like SPL?
Yes. LPQL includes stats, timechart, eval, where, table, top/rare, dedup, sort, head/tail, fields, rename and rex, plus a similar eval-function set (string, math, conditional, time and pattern functions).

Logging and monitoring, on one EU-hosted engine

Centralise, retain and monitor your logs with AI-assisted search and a risk-based SIEM — GDPR-compliant and hosted in the EU. Start free.

Start free

We use cookies to analyze site traffic and improve your experience. No cookies are placed without your consent. Privacy Policy