> For the complete documentation index, see [llms.txt](https://docs.e6data.com/ingestion-engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.e6data.com/ingestion-engine/sql/sql.md).

# Overview

e6 Ingestion Engine pipelines are written in SQL. The dialect is based on [Apache DataFusion](https://arrow.apache.org/datafusion/) - a well-supported SQL engine built on [Apache Arrow](https://arrow.apache.org/) - and extended with streaming-specific constructs like windows, watermarks, and event-time joins.

If you've used other SQL engines (Postgres, DuckDB, Spark SQL, Flink SQL), most of what you already know carries over. The sections below cover the pieces that are either specific to e6 Ingestion Engine or particularly important for streaming.

Start with the [Quick Start](/ingestion-engine/sql/quick-start.md), then use the reference sections below in navigation order.

## Core reference

* [**DDL Statements**](/ingestion-engine/sql/sql-reference/ddl.md) - `CREATE TABLE` for connection tables, `CREATE VIEW`, and the `WITH` options used to configure connectors.
* [**Basic Queries**](/ingestion-engine/sql/sql-reference/basic-queries.md) - the basic query syntax, including projections, filtering, `UNNEST`, and subqueries.
* [**SQL Data Types**](/ingestion-engine/sql/sql-reference/data-types.md) - the primitive and complex types supported by e6 Ingestion Engine, and how they map to underlying Rust types.

## Streaming

* [**Joins**](/ingestion-engine/sql/streaming/joins.md) - stream-stream joins (windowed and interval), lookup joins against external systems, and the semantics of each.
* [**Stateful Queries**](/ingestion-engine/sql/streaming/stateful.md) - working with update streams (CDC-style data), including Debezium-formatted inputs and outputs.
* [**Streaming Windows**](/ingestion-engine/sql/streaming/windows.md) - tumbling, sliding, and session windows for time-bucketed aggregations.

## Functions

* [**Scalar Functions**](/ingestion-engine/sql/functions.md) - math, string, JSON, time, array, struct, regex, hashing, and more.
* [**Aggregate Functions**](/ingestion-engine/sql/aggregate-and-window-functions/aggregates.md) - `sum`, `count`, `avg`, `array_agg`, and other functions usable in `GROUP BY` queries.
* [**Window Functions**](/ingestion-engine/sql/aggregate-and-window-functions/window.md) - OVER-clause analytical functions like `row_number`, `rank`, and `lag`/`lead`.

For user-defined functions in Rust or Python, see the UDF docs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.e6data.com/ingestion-engine/sql/sql.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
