v.19.15New Feature

Add Table Function Input for Reading Incoming Data in INSERT SELECT Query

Add table function input for reading incoming data in INSERT SELECT query. #5450 (palasonic1) #6832 (Anton Popov)
Introduces the input table function to read incoming data directly within INSERT SELECT queries in ClickHouse.

Why it matters

This feature allows users to access the data being inserted in an INSERT SELECT statement as a table function. It enables advanced data manipulation and querying of the input data stream, improving flexibility and functionality when processing data during inserts.

How to use it

Use the input table function inside a SELECT query within an INSERT SELECT statement. For example:
INSERT INTO target_table
SELECT * FROM input()
WHERE some_condition;

This reads the incoming data via input() and allows filtering or transformation before inserting.