Permissions required:
View
SQL Processors
Show Topic
Manage
Query Topic
Insert Data
To support features like:
Lenses SQL Engine Streaming mode needs to have up-to-date schema information for all structured topics that are used as input in a given query. In this context, structured means topics that are using complex storage formats like AVRO or JSON.
AVRO
JSON
INSERT INTO daily-item-purchases-stats SELECT STREAM itemId , COUNT(*) as dailyPurchases , AVG(price / quantity) as average_per_unit FROM purchases WINDOW BY TUMBLE 1d GROUP BY itemId;
For the above query, for example, the purchases topic will need to have a value set to a structured format and a valid schema will need to already have been configured in Lenses. In such schema, fields itemId, price and quantity must be defined, the latter two being of a numerical type.
purchases
itemId
price
quantity
These requirements ensure the Engine will always in a position to know what kind of data it will be working with, guaranteeing at the same time that all obvious errors are caught before a query is submitted.
On this page