Arrays
This page describes examples of using arrays in Lenses SQL Studio to query Kafka.
Create an array field
CREATE TABLE table(
_key INT,
, fialdA INT[] -- Simple array
, fieldB.fieldC STRING[]) -- Array in a subfield
, fieldD INT[][] -- Nested array
FORMAT(avro, avro);Select an array field
SELECT
fieldA[1]
, fieldB.fieldC[2].x
FROM table
WHERE fieldA[1] LIKE '%Lenses%'Query for array size
Last updated
Was this helpful?

