# Created stream via sql which is not emitting any data

**URL:** <https://forum.confluent.io/t/created-stream-via-sql-which-is-not-emitting-any-data/10844>\
**Category:** ksqlDB\
**Created:** [10 June 2024 17:16 UTC](https://forum.confluent.io/t/created-stream-via-sql-which-is-not-emitting-any-data/10844 "2024-06-10T17:16:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [10 June 2024 17:16 UTC](https://forum.confluent.io/t/created-stream-via-sql-which-is-not-emitting-any-data/10844/1 "2024-06-10T17:16:18Z")

</div>

Hi all,

can really do with some assistance with the below.

> [@How represent JSON with sub array](https://forum.confluent.io/t/how-represent-json-with-sub-array/10835/2):
>
> came up with the following: issue is i get nothing when I select from the stream, even if i set 'auto.offset.reset'='earliest'; even if i post new messages to the source topic. CREATE STREAM salesbasket ( InvoiceNumber VARCHAR key, SaleDateTime date, TerminalPoint VARCHAR, Net DOUBLE, Vat DOUBLE, Total DOUBLE, Store STRUCT\< Id VARCHAR, Name VARCHAR\>, Clerk STRUCT\< Id VARCHAR, Name VARCHAR\>, BasketItems ARRAY\< STRUCT\<i…

G

---

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [11 June 2024 10:18 UTC](https://forum.confluent.io/t/created-stream-via-sql-which-is-not-emitting-any-data/10844/3 "2024-06-11T10:18:07Z")

</div>

might have something…

did docker-compose logs ksqldb-server and got the below out.

the date is a string in the json, as everything is in json. via the schema-registry and stream create trying to tell it to intrepid it as a date… see example message above.

how can if fix/improve this.

> ksqldb-server | [2024-06-11 10:15:50,078] WARN stream-thread [\_confluent-ksql-default\_transient\_transient\_SALESPAYMENTS\_1499537375259749102\_1718024630759-e7d0b678-672f-4753-b060-1d81c0632f97-StreamThread-1] task [0\_0] Skipping record due to deserialization error. topic=[salespayments] partition=[0] offset=[208] (org.apache.kafka.streams.processor.internals.RecordDeserializer)  
> ksqldb-server | org.apache.kafka.common.errors.SerializationException: Failed to deserialize value from topic: salespayments. Can’t coerce string to type. targetType: DATE, path: $.PAYDATETIME

---

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [11 June 2024 10:23 UTC](https://forum.confluent.io/t/created-stream-via-sql-which-is-not-emitting-any-data/10844/4 "2024-06-11T10:23:16Z")

</div>

for sure…if i change my stream create to reference the PAYDATETIME as a varchar then it works… but this is not desired… i’d like to get the date as string cast to a date in streams, please.

G

---

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [11 June 2024 12:14 UTC](https://forum.confluent.io/t/created-stream-via-sql-which-is-not-emitting-any-data/10844/5 "2024-06-11T12:14:05Z")

</div>

so se there is a timestamp field… it’s also failing on the cast to date step…  
thinking its due to my string including the offset "+02:00’

G

---

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [11 June 2024 15:31 UTC](https://forum.confluent.io/t/created-stream-via-sql-which-is-not-emitting-any-data/10844/6 "2024-06-11T15:31:42Z")

</div>

Problem was the date field that streams was to cast to a date, which was a string, that included +GMT offset… caused the ksql stream to reject message.

G

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [18 June 2024 15:31 UTC](https://forum.confluent.io/t/created-stream-via-sql-which-is-not-emitting-any-data/10844/7 "2024-06-18T15:31:58Z")

</div>

Closed on 18 June 2024 15:31 UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
