# Populate a sample event with an array into a Kafka topic

**URL:** https://ask.lenses.io/t/populate-a-sample-event-with-an-array-into-a-kafka-topic/67
**Category:** Lenses SQL
**Created:** [May 22, 2023, 4:54pm UTC](https://ask.lenses.io/t/populate-a-sample-event-with-an-array-into-a-kafka-topic/67 "2023-05-22T16:54:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wkolbenschlag](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/wkolbenschlag/32/174_2.png) [@wkolbenschlag](https://ask.lenses.io/u/wkolbenschlag)
#### Post date: [May 22, 2023, 4:54pm UTC](https://ask.lenses.io/t/populate-a-sample-event-with-an-array-into-a-kafka-topic/67/1 "2023-05-22T16:54:52Z")

</div>

Are there any examples or tutorials on having a streaming processor create a populate a topic containing an array?

---

<div class="post-metadata">

### Author: ![andrewstevenson](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/andrewstevenson/32/15_2.png) [@andrewstevenson](https://ask.lenses.io/u/andrewstevenson)
#### Post date: [May 23, 2023, 2:45pm UTC](https://ask.lenses.io/t/populate-a-sample-event-with-an-array-into-a-kafka-topic/67/2 "2023-05-23T14:45:05Z")

</div>

@wkolbenschlag You can use the SQL Studio to create a table (topic) and insert data or you can go to topic that has an array in its schema and use the [autogenerate message function](https://docs.lenses.io/5.2/guides/self-service/kafka-topics/insert-and-delete-events/).

```auto
CREATE TABLE batched_readings(
  meter_id int,
  readings int[]
) FORMAT(int, AVRO);

```

```auto
INSERT INTO batched_readings(_key, meter_id, readings) VALUES
(1, 1, [100, 92, 93, 101]),
(2, 2, [81, 82, 81]),
(3, 1, [95, 94, 93, 96]),
(4, 2, [80, 82])

```
