SQL-based ingestion
Apache Druid supports SQL-based ingestion using the bundled druid-multi-stage-query extension. This extension adds a that allows running SQL INSERT and statements as batch tasks. As an experimental feature, the task engine also supports running SELECT queries as batch tasks.
Nearly all SELECT capabilities are available in the multi-stage query (MSQ) task engine, with certain exceptions listed on the Known issues page. This allows great flexibility to apply transformations, filters, JOINs, aggregations, and so on as part of and REPLACE ... SELECT
statements. This also allows in-database transformation: creating new tables based on queries of other tables.
Worker: Indexing service tasks of type
query_worker
that execute a query. There can be multiple worker tasks per query. Internally, the tasks process items in parallel using their processing pools (up to of execution parallelism within a worker task).Stage: A stage of query execution that is parallelized across worker tasks. Workers exchange data with each other between stages.
To add the extension to an existing cluster, add druid-multi-stage-query
to in your common.runtime.properties
file.
To use , you need READ permission on the resource named “EXTERNAL” of the resource type “EXTERNAL”. If you encounter a 403 error when trying to use EXTERN, verify that you have the correct permissions.
- to learn more about how SQL-based ingestion and multi-stage queries work.
- Check out the examples to see SQL-based ingestion in action.
- to get started in the web console.